Change a storage account (platform administrators)
const url = 'https://files.centralcodestation.com/api/v1/platform/storage-accounts/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","settings":{"bucket":"example","region":"example","endpoint":"example","force_path_style":true,"public_base_url":"example","root":"example"},"credentials":{"access_key_id":"example","secret_access_key":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://files.centralcodestation.com/api/v1/platform/storage-accounts/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "settings": { "bucket": "example", "region": "example", "endpoint": "example", "force_path_style": true, "public_base_url": "example", "root": "example" }, "credentials": { "access_key_id": "example", "secret_access_key": "example" } }'Rename it, rotate its credentials, or change its location while nothing uses it. A change of credentials or location is probed before it is saved. Audited.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A storage account id (ULID), or default for the platform storage of this environment.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Merged into the current settings; the location changes only while nothing uses the account.
object
Bucket accounts: the bucket.
Bucket accounts: the region (auto for stores without regions).
Bucket accounts: the endpoint of the object store; null is the platform’s default provider.
Bucket accounts: path-style addressing (most self-run object stores need it).
Bucket accounts: the public base URL of public copies (a CDN in front of the bucket); null is the bucket’s own URL.
Directory accounts (adapter: filesystem): the root directory, inside one of the roots the operator allowed.
New credentials (rotation).
object
Write-only: encrypted at rest, never returned.
Example generated
{ "name": "example", "settings": { "bucket": "example", "region": "example", "endpoint": "example", "force_path_style": true, "public_base_url": "example", "root": "example" }, "credentials": { "access_key_id": "example", "secret_access_key": "example" }}Responses
Section titled “Responses”Success.
object
default (the platform storage of this environment) or a ULID.
The kind of account: a bucket account, filesystem for a directory account; local and memory are development only.
How the account’s objects are delivered.
object
Bucket accounts: the bucket.
Bucket accounts: the region (auto for stores without regions).
Bucket accounts: the endpoint of the object store; null is the platform’s default provider.
Bucket accounts: path-style addressing (most self-run object stores need it).
Bucket accounts: the public base URL of public copies (a CDN in front of the bucket); null is the bucket’s own URL.
Directory accounts (adapter: filesystem): the root directory, inside one of the roots the operator allowed.
Credentials are stored (encrypted, never returned).
The last four characters of the access key id.
Why the last verification failed.
Tenants assigned to the account.
Example
{ "status": "verified"}Error. error is one of: invalid_request.
object
Stable snake_case error code.
Example
{ "status_code": 400, "error": "invalid_request", "message": "The request is malformed: a required field is missing, a value has the wrong type or format, or a field the route does not accept was sent", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}Error. error is one of: invalid_token.
object
Stable snake_case error code.
Example
{ "status_code": 401, "error": "invalid_token", "message": "The bearer token is missing, malformed, expired, signed by an unknown key, or has the wrong audience (`aud` must be `files-api`).", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}Error. error is one of: insufficient_scope, client_context_mismatch, files_access_not_granted, platform_admin_required.
object
Stable snake_case error code.
Example
{ "status_code": 403, "error": "insufficient_scope", "message": "A user token lacks `files:access`, a machine token carries none of `files:manage`, `files:read`, `files:config.manage`, or the route needs a scope the token does not carry.", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}Error. error is one of: not_found, storage_account_not_found.
object
Stable snake_case error code.
Example
{ "status_code": 404, "error": "not_found", "message": "An id in the path is malformed, or the route does not exist.", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}Error. error is one of: storage_account_in_use.
object
Stable snake_case error code.
Example
{ "status_code": 409, "error": "storage_account_in_use", "message": "The storage account still holds objects, is assigned to a tenant or takes part in a migration, so it cannot be removed or have its location changed.", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}Error. error is one of: storage_account_verification_failed, storage_adapter_not_allowed.
object
Stable snake_case error code.
Example
{ "status_code": 422, "error": "storage_account_verification_failed", "message": "The write, read and delete probe against the storage account failed; nothing was saved.", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}Error. error is one of: rate_limited.
object
Stable snake_case error code.
Example
{ "status_code": 429, "error": "rate_limited", "message": "Too many requests in the current window; `retry_after` (and the `Retry-After` header) says when to retry.", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}Error. error is one of: identity_unavailable.
object
Stable snake_case error code.
Example
{ "status_code": 503, "error": "identity_unavailable", "message": "The service could not reach the Identity Server and has no fresh cached answer.", "path": "/api/v1/tenants/fitness-co/applications/fitness-app/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "timestamp": "2026-10-22T09:12:33.120Z"}default
Section titled “default”Error: see error for the code.
object
Stable snake_case error code.
Example
{ "status_code": 403, "error": "invalid_request", "message": "This client is not bound to this tenant/application", "path": "/api/v1/tenants/t1/applications/a1/files/01J9Z6S9Q5F5R6Y2W2GZ3B3K4D"}