Create

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

Authentication

AuthorizationBearer
Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).

Query parameters

projectstringOptionalDefaults to main
The name of the project to create the external storage policy in.

Request

This endpoint expects an object.
namestringRequired

The name of the external storage policy. Must be snake_case, start with a lowercase letter and be unique within the project.

endpoint_urlstringRequired

The S3-compatible endpoint URL that artifacts are uploaded to. Must be a publicly routable HTTPS URL without embedded credentials.

bucketstringRequired
The bucket that artifacts are uploaded to.
access_key_idstringRequired
Access key ID used to authenticate with the endpoint. Stored encrypted and never returned.
secret_access_keystringRequired
Secret access key used to authenticate with the endpoint. Stored encrypted and never returned.
regionstring or nullOptional

The region of the bucket. Set to null when the endpoint doesn’t require a region.

key_prefixstring or nullOptional
Prefix prepended to every object key.
addressing_styleenumOptionalDefaults to auto
How bucket names are addressed in requests to the endpoint.

Response

Success response
idstring
The ID of the created external storage policy.
namestring
The name of the created external storage policy.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error