Skip to main content
POST
Register a storage connection

Authorizations

Authorization
string
header
required

An Agent credential (nits_…), or a person token (nitp_…) on a deployment that enables them. GET /api/v1/session names the principal a credential proves.

Body

application/json
bucket
string
required
Required string length: 1 - 63
credentialHandle
string
required
Pattern: ^sch_[a-z0-9][a-z0-9_-]{0,59}$
idempotencyKey
string
required
Required string length: 1 - 200
name
string
required
Required string length: 1 - 200
pathStyle
boolean
required
prefix
string
required
Maximum string length: 1024
region
string
required
Required string length: 1 - 64
endpoint
string

Omit for Amazon S3, Cloudflare R2 or Google Cloud Storage HMAC to use the selected provider's fixed template. A supplied endpoint must match that template exactly. Required for custom and S3-compatible connections and requests without a provider. Approved custom hosts, including arbitrary endpoints paired with sealed customer credential handles, require the exact endpoint hostname to be approved for the requesting account and pathStyle: true. Custom approval, creation, credential-handle rebinding and worker credential binding remain disabled until worker connect-time address checks ship. NITSOR_STORAGE_CUSTOM_HOSTS must remain unset or off; any other value, including resolver-verified, is refused. After that guard is removed, admission requires approval and pathStyle: true. Legacy requests using operator-provisioned handles retain S3-compatible behavior. An absolute https URL with no embedded username or password; the credentials come from the provisioned credential handle credentialHandle names (an id starting sch_). localhost, names ending .localhost, private, loopback or link-local IP address literals, and IPv6 literals that carry an IPv4 address (mapped, NAT64, 6to4) are refused on the literal hostname given; connection and signing-time requests validate that literal and its policy, not the address a later DNS resolution or worker connects to, and follow no redirect. Custom worker traffic remains disabled pending its own connect-time address checks. A deployment accepts http only when its operator sets NITSOR_STORAGE_HTTP_ENDPOINTS=local-development.

Maximum string length: 2048
provider
object

Response

Register a storage connection

accountId
string
required
Minimum string length: 1
bucket
string
required
Minimum string length: 1
connectionId
string
required
Minimum string length: 1
createdAt
string<date-time>
required

RFC 3339 timestamp in UTC: the offset is Z or +00:00; any other offset is refused.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|[+-]00:00))$
credential
object
required
endpoint
string
required
Minimum string length: 1
name
string
required
Minimum string length: 1
pathStyle
boolean
required
prefix
string
required
region
string
required
Minimum string length: 1
provider
object