Create a storage destination
POST
/api/admin/storage-destinations
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/storage-destinations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "audit-archive", "display_name": "Audit Archive", "description": "R2 bucket for audit log archives.", "provider": "r2", "config": { "bindingRef": "AUDIT_ARCHIVE" }, "status": "active" }'Create a platform storage destination. Provider config must reference credential bindings rather than embedding secret values.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Create a platform storage destination. Secret values must be supplied through the credential object, not embedded in config.
Media type application/json
object
Example
{ "name": "audit-archive", "display_name": "Audit Archive", "description": "R2 bucket for audit log archives.", "provider": "r2", "config": { "bindingRef": "AUDIT_ARCHIVE" }, "status": "active"}Responses
Section titled “ Responses ”Storage destination mutation result.
Media type application/json
object
Example
{ "item": { "id": "sd_123", "scope_type": "platform", "scope_id": "platform", "name": "audit-archive", "display_name": "Audit Archive", "description": "R2 bucket for audit log archives.", "provider": "r2", "config": { "bindingRef": "AUDIT_ARCHIVE" }, "managed_by": "admin", "read_only": false, "has_credential": false, "credential_key_version": null, "credential_updated_at": null, "credential_updated_by": null, "status": "active", "created_by": "admin_123", "updated_by": "admin_123", "created_at": 1770000000000, "updated_at": 1770000000000 }, "audit_id": "audit_123"}default
Section titled “default ”Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}