---
title: "Create"
method: POST
path: "/external_storage_policies"
tags: ["externalStoragePolicies"]
---

# Create

`POST /external_storage_policies`

Creates a new external storage policy in a project. Agents referencing the policy deliver their conversation artifacts to the configured S3-compatible bucket.

## Query parameters

- `project` string

## Headers

- `Authorization` string, required

## Request body

- CreateExternalStoragePolicyRequest
  - `name` string, required — The name of the external storage policy. Must be snake_case, start with a lowercase letter and be unique within the project.
  - `endpoint_url` string, required — The S3-compatible endpoint URL that artifacts are uploaded to. Must be a publicly routable HTTPS URL without embedded credentials.
  - `bucket` string, required — The bucket that artifacts are uploaded to.
  - `region` string, nullable — The region of the bucket. Set to `null` when the endpoint doesn't require a region.
  - `key_prefix` string, nullable — Prefix prepended to every object key.
  - `addressing_style` 'auto' | 'virtual' | 'path' — How bucket names are addressed in requests to the endpoint.
  - `access_key_id` string, required — Access key ID used to authenticate with the endpoint. Stored encrypted and never returned.
  - `secret_access_key` string, required — Secret access key used to authenticate with the endpoint. Stored encrypted and never returned.

## Response `201`

Success response

- ExternalStoragePoliciesCreateResponse201
  - `id` string, required — The ID of the created external storage policy.
  - `name` string, required — The name of the created external storage policy.

## Other responses

- `400` — Invalid parameters
- `401` — Unauthorized (authentication missing or invalid)
- `404` — Project not found
- `409` — External storage policy name already exists
- `500` — Internal server error

---

[API](https://skmtc.net/phonic/apis/api-reference.md) · [All operations](https://skmtc.net/phonic/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phonic/api-reference/revisions/dd8166a70626/schema)
