Skip to main content

Set the project's storage mode for a surface

PUT 

/program/api/v2/storage/features/:surface

Binds one surface to a storage mode. Field applicability by mode:

  • managed — nothing else is required or accepted. The project's NF-provisioned bucket is used; the customer supplies no bucket, region, endpoint, credentials or path.
  • byo — connectionId is required and must name a connection that is neither unknown nor soft-deleted.
  • public_url — assets only; connectionId is refused.

paths applies to the assets surface in byo mode only. Exactly one entry may carry isWriteTarget: true; marking a new write target clears the previous one.

Where objects are written. A surface's output lands beneath its configured path on the bound connection, in a fixed layout:

  • archive, snapshots and clips produce output per stream and namespace it by stream: <configured path>/<stream id>/<object>. A recording for stream a4f2c118 with the path recordings/ lands beneath recordings/a4f2c118/.
  • assets are not per stream. An uploaded asset is written directly beneath the write target with a service-generated name and no stream segment: with the write target sponsors/2026/, beneath sponsors/2026/.

Rejected with 400 when the request contradicts the mode: byo without a connectionId, public_url on a surface other than assets, connectionId supplied for managed or public_url, a connectionId that is unknown or soft-deleted, or more than one path marked as the write target.

Rejected with 422 when the mode is not offered by this deployment for this surface — read GET /storage/features first, and do not offer a mode whose offeredByDeployment is false.

Binding to a connection whose credentials read but cannot write succeeds here, because nothing can observe write access without writing. The first upload through this surface then fails with 403 connection_read_only, naming the missing s3:PutObject permission, and that failure sets readOnly: true on the connection.

Error codes (errorCode in the error body):

  • 409 connection_not_writable — the connection is known not to accept writes (an upload through it was refused for lack of s3:PutObject).
  • 409 storage_provisioning_in_progress — managed storage is still being set up; retry in a few seconds.
  • 410 storage_tearing_down — managed storage is being removed for this project.
  • 422 storage_mode_not_offered — the deployment does not offer this mode for this surface.
  • 503 managed_storage_unavailable — managed storage is not configured on this deployment.
  • 503 storage_provisioning_failed — managed storage could not be set up; contact support if it persists.
Generate JWT

Request​

Responses​

The surface's updated storage configuration

Validation failure — byo without a connectionId, public_url on a non-assets surface, connectionId supplied for a mode that refuses it, an unknown or soft-deleted connectionId, or more than one write-target path.

Forbidden — no project access, or storage_mode_not_entitled: mode: managed for a project NativeFrame has not enabled managed storage for. Enabling it is an internal action ("contact us"); once enabled, the project switches surfaces freely. Read entitledForProject on GET /storage/features before offering it.

Conflict — connection_not_writable, or storage_provisioning_in_progress (retry shortly).

Gone — storage_tearing_down: managed storage is being removed for this project.

This deployment does not offer the requested mode for this surface

Internal Server Error

Unavailable — managed_storage_unavailable on this deployment, or storage_provisioning_failed.