Share.Ninja API (1.0.0)

Download OpenAPI specification:

Errors

Every error response is one envelope:

{ "code": "not_found", "status": "link_not_found", "error": null }

code is the category (bad_request, unauthorized, payment_required, forbidden, not_found, conflict, gone, rate_limited, payload_too_large, internal, unsupported) or a domain code with its own typed details, such as storage_quota_exceeded. status names the exact condition. error is an optional diagnostic text and details an optional typed payload. The complete list of codes, statuses and details shapes is the x-error-catalog on the ErrorResponse schema. Handle an unknown code by its HTTP status.

Rate limiting

Requests are limited per client IP before authentication and per actor after it. A rejected request answers 429 with status rate_limit_exceeded and the headers Retry-After, RateLimit-Remaining and RateLimit-Reset.

CSRF

A state-changing request (POST, PUT, PATCH, DELETE) authorized by the session cookie must carry the X-CSRF-Token header with the value of the csrf_token cookie. The server sets both cookies together, starting with POST /auth/agents. A missing or invalid token answers 403 with status csrf_required or csrf_invalid. Bearer requests need no token. Operations marked x-csrf-exempt (register, token refresh, login start, challenge verify, token revoke, the SSO exchanges) never require it, so a stale cookie cannot block a re-login.

Realtime

State changes are also pushed over one server-to-client WebSocket; REST stays the source of truth. Connect with GET /ws/connect?ticket=… (browser, ticket from POST /auth/agents) or GET /ws/action with a Bearer token (native). Subscriptions are managed over REST (POST /events/subscriptions), belong to the caller rather than the socket, and survive reconnects. Topics are user:<user_id>, user:* (the caller's own user), workspace:* (every workspace the caller belongs to), link:<url_token> and link:* (every link the caller owns); the caller's own agent:<agent_id> inbox is always delivered.

Every frame is one WSMessage variant: a flat object whose dotted type selects the shape, with id, topic and timestamp beside the variant's own fields. Frames are stored server-side: reconnect with last_seen_id to receive what was missed, then the live stream continues. Past the retention window re-read the resource over REST. Each subscriber receives a frame once, even when it is published to several topics.

Idempotency

POST /links/{url_token}/acl/grant repeated with the same body answers status: unchanged; a different level or key for the same subject answers status: updated. Billing mutations take an Idempotency-Key header: the same key with the same request replays the original operation, the same key with a different request answers 409. Deciding a vault join request that is already decided returns its original outcome.

Cloud transfers

Cloud access is per-file presigned URLs; there is no credential to refresh. To renew an expired URL or add files, call POST /links/{url_token}/transfer/presign. A large file uses the multipart flow: transfer/multipart/begin, transfer/multipart/parts (repeatable), then transfer/multipart/complete or transfer/multipart/abort; list-uploads and list-parts resume an interrupted upload.

Login and step-up

POST /auth/sessions with an email always answers a challenge listing the account's sign-in methods, in the same shape for known and unknown addresses. Verify any one of them with POST /auth/challenges/{token}; with two-step verification on, a password or email-code sign-in is followed by any one other factor from the list the response carries, while a passkey completes the login on its own. A code by email or SMS is sent on request (POST /auth/challenges/{token}/code), not by the call that lists it. A sensitive operation called without a fresh factor answers 403 challenge_required with a challenge bound to that call; verify it and retry with the token in the X-Auth-Challenge header.

Mass session revoke

POST /auth/sessions/revoke-all ends the user's other sessions at once, sparing the calling one; when the calling device is in the vault's trust circle, every other device leaves the circle in the same call. Account suspension, vault recovery and vault reset end them all. The explaining frame (session.revoked_all, auth.user_suspended) is delivered before the socket closes and is replayed on reconnect. Treat an unknown reason or category as the generic case.

Auth

Device registration, login, sessions and tokens. POST /auth/agents registers the device and returns an access token, a refresh token and a WebSocket ticket. Login starts with POST /auth/sessions and completes through POST /auth/challenges/{token}, one factor per call; the resulting access token carries both the agent and the user. Third-party access uses the OAuth authorization-code flow (/auth/authorize, POST /auth/token). SSO with Google and Apple runs through /auth/sso/{provider} on the web and POST /auth/sso/{provider}/token with a native ID token. Refresh tokens rotate on every refresh. Factor types: password, email_code, webauthn, totp, sms, device_push; two-step verification and recovery codes live under /users/me/auth/.

Register a device

Registers the calling device and issues its session. device_public_key is the device identity and its trust-circle key: the same key refreshes the same agent, a different key creates a new one.

Returns agent_id, name and a one-time WebSocket ticket valid for 30 seconds — connect to GET /ws/connect?ticket=… at once. With response_mode=token the session comes back as access_token and refresh_token, otherwise as cookies. name and nearby_visibility are stored when sent and untouched when omitted; a new device starts at everyone. Sign in with POST /auth/sessions.

query Parameters
response_mode
string
Default: "cookie"
Enum: "cookie" "token"
Example: response_mode=token

Where the issued tokens go. cookie, the default, sets them as cookies for a browser; token returns them in the response body for a native or CLI client.

Request Body schema: application/json
required
name
string <= 255 characters

Device name shown in the interface. Auto-generated when empty.

client_build
string <= 64 characters

Build version of the client application

protocol_version
integer >= 0

Version of the API the client understands, one number shared by every client, independent of client_build. Absent means 0. Version 1 is the transfer session mode, read, write and readwrite in requests and events; a version 0 device's socket receives upload and download in the direction of link.transfer_* frames. A version below the server's minimum is refused with client_outdated, and the client asks the user to update.

object

Device metadata. product_id, device_os and device_os_version are shown in the sessions and devices lists; the rest is diagnostic.

device_public_key
required
string <byte> <= 64 characters

X25519 public key that identifies the device and serves as its trust-circle key. Raw key bytes in base64, exactly 32 bytes after decoding; a register without it is refused.

nearby_visibility
string (NearbyVisibility)
Enum: "everyone" "nobody"

Who may discover this device in nearby lists.

  • everyone — the device appears in the nearby list of every peer sharing its bucket. Default for a newly registered device.
  • nobody — the device is absent from every peer's nearby list. It still receives its own full nearby list, still sends share offers, and still accepts offers addressed to its agent_id: the switch governs discovery, not delivery.

An agent is identified by device plus network, so a device registering from a different network starts at everyone again; a client that wants the mode to follow the device sends it on every POST /auth/agents, like the name.

instance_id
string^[-a-zA-Z0-9_]{1,64}$

Opaque id of the client runtime this register runs in; a web client makes a fresh one per tab. A link bound to it is served only while a socket of that instance is live. Native clients omit it.

Responses

Request samples

Content type
application/json
{
  • "name": "My MacBook",
  • "client_build": "1.2.3",
  • "protocol_version": 1,
  • "device_info": {
    },
  • "device_public_key": "q8Gk1GMnfN3WjLKBHaOvhB0tXRuQbVJLBqFz5mFqHQA=",
  • "nearby_visibility": "everyone",
  • "instance_id": "tab-9f2c4b1a"
}

Response samples

Content type
application/json
{
  • "agent_id": "agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  • "access_token": "string",
  • "refresh_token": "string",
  • "token_type": "Bearer",
  • "expires_in": 900,
  • "name": "Crimson Falcon",
  • "ticket": "x7KPqRsT2uVwXyZ9aBcDeFgHiJkLmNoP1234567890AB",
  • "ticket_expires_in": 30,
  • "encryption_public_key": "string",
  • "signing_public_key": "string",
  • "encrypted_identity_key": "string",
  • "vault_status": "not_initialized"
}

OAuth 2.0 token endpoint

Exchanges a refresh token, or an authorization code from the consent flow, for a new access token. The grant type selects the body shape; see TokenRequest.

A refresh token is rotated on every use: the response carries a new one and the token sent stops working. Replaying an already-rotated token past the grace window answers 401 refresh_token_reused and revokes the session, so the client must authenticate again.

Device tokens are issued by POST /auth/agents and user tokens by POST /auth/challenges/{token}; this endpoint only renews them.

query Parameters
response_mode
string
Default: "cookie"
Enum: "cookie" "token"
Example: response_mode=token

Where the issued tokens go. cookie, the default, sets them as cookies for a browser; token returns them in the response body for a native or CLI client.

Request Body schema: application/json
required
grant_type
required
string

Must be "refresh_token"

refresh_token
required
string

The refresh token to exchange

Responses

Request samples

Content type
application/json
Example
{
  • "grant_type": "refresh_token",
  • "refresh_token": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6"
}

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNyXzEyMzQ1Njc4IiwibW9kZSI6InVzZXIiLCJleHAiOjE3MDI2NTYwMDB9.signature",
  • "token_type": "Bearer",
  • "expires_in": 900,
  • "refresh_token": "b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a1",
  • "scope": "user"
}

Revoke a refresh token

Revokes a refresh token per RFC 7009, ending the session it belongs to. Answers 204 whether or not the token was valid, so the response cannot be used to probe a token.

Request Body schema: application/json
required
token
required
string

The refresh token to revoke

token_type_hint
string
Value: "refresh_token"

Responses

Request samples

Content type
application/json
{
  • "token": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
  • "token_type_hint": "refresh_token"
}

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

Log out and clear the session

Revokes the refresh token taken from the body, or from the refresh_token cookie when the body carries none, and clears the session cookies.

Request Body schema: application/json
refresh_token
string

Refresh token to revoke. The cookie is used when it is absent.

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6"
}

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

Read consent request details

Returns the details of an authorization request so the client can render the consent screen. There is no client registration: code_challenge is required, and the matching verifier is checked when the code is exchanged.

query Parameters
redirect_uri
required
string
Example: redirect_uri=https://app.example.com/callback

Where to redirect after consent

code_challenge
required
string [ 43 .. 44 ] characters ^[A-Za-z0-9_-]{43}=?$
Example: code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM

PKCE code challenge — S256, base64url of the SHA-256 hash, 43 characters, a trailing = tolerated

code_challenge_method
string
Default: "S256"
Value: "S256"
Example: code_challenge_method=S256
scope
string
Example: scope=user

Requested scopes, space-separated

state
string
Example: state=xyz123

Opaque value returned unchanged in the redirect

agent_id
string
Example: agent_id=agt_9f1c2d3e-4b5a-4c6d-8e7f-0a1b2c3d4e5f

The requesting client's own device. When set, the code and the session its exchange mints belong to this device rather than to the one that approves the consent. Echoed back so the consent page can pass it to the POST, together with the device's registered card (display_name, product_id, device) so the page can show which app is asking. Must name a registered device; 400 otherwise.

Responses

Response samples

Content type
application/json
{
  • "scope": "user",
  • "scopes": [
    ],
  • "state": "xyz123",
  • "agent_id": "agt_9f1c2d3e-4b5a-4c6d-8e7f-0a1b2c3d4e5f",
  • "display_name": "My MacBook",
  • "product_id": "com.shareninja.desktop",
  • "device": {
    },
  • "device_public_key": "q8Gk1GMnfN3WjLKBHaOvhB0tXRuQbVJLBqFz5mFqHQA="
}

Submit OAuth consent

Records the user's consent decision and returns the redirect URL carrying the authorization code, which POST /auth/token exchanges together with the PKCE verifier. Requires a signed-in user.

The code belongs to the device named by agent_id when it is given — the requesting client's own device, in the same app as the approving session — and to the approving device otherwise; the exchanged session is minted for that device.

An approving device that is in the account's trust circle may send encrypted_identity_key for the device named by agent_id. The exchange then adds that device to the trust circle, and its next POST /auth/agents returns vault_status: active with the wrapped key, so it sends no join request. The key is kept with the code and discarded with it when the code is not exchanged.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
redirect_uri
required
string
code_challenge
required
string [ 43 .. 44 ] characters ^[A-Za-z0-9_-]{43}=?$

PKCE code challenge — S256, base64url of the SHA-256 hash, 43 characters, a trailing = tolerated

code_challenge_method
string
Default: "S256"
Value: "S256"
scope
string
state
string
approve
required
boolean

true approves the request, false denies it

agent_id
string

The requesting client's own device, echoed from the GET. When set, the code and the exchanged session belong to it rather than to the approving device.

encrypted_identity_key
string <byte> <= 1024 characters

Identity private key wrapped to the device_public_key the GET returned (hybrid encryption). Accepted only together with agent_id and only from a device in the trust circle (approver_not_trusted otherwise). Under the 61-decoded-byte floor it is refused as validation_failed.

Responses

Request samples

Content type
application/json
{
  • "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
  • "code_challenge_method": "S256",
  • "scope": "user",
  • "state": "xyz123",
  • "approve": true,
  • "agent_id": "agt_9f1c2d3e-4b5a-4c6d-8e7f-0a1b2c3d4e5f",
  • "encrypted_identity_key": "string"
}

Response samples

Content type
application/json

List active sessions Deprecated

Deprecated: use GET /users/me/devices, which returns the same sessions attached to their device cards.

Returns the authenticated user's sessions that are not revoked. Each carries its id for selective revocation, the address and user agent it was created with, when it was created and last used, and whether it is the calling session.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Start login or signup

Starts authentication for an email address. An address with no account is signed up by this very call; there is no separate registration step.

With invite_token, an unknown address signs up under the invite's address inside the invite's workspace; the code goes to that address. A known address signs in as usual and the invite is not spent.

The response always carries a challenge listing the account's sign-in methods, in a shape identical for a known and an unknown address, so registered addresses cannot be enumerated. No session is issued here, and no email code is sent unless email_code is the only method: otherwise request it with POST /auth/challenges/{token}/code once the user picks it. An account that removed its email_code factor lists no such entry; a lost password is reset through POST /auth/recovery.

Verify one method with POST /auth/challenges/{token}; the response completes the login or lists the second step.

Request Body schema: application/json
required
email
required
string <email> <= 320 characters

Account email address

remember_me
boolean
Default: false

When true, the issued session gets the deployment's extended lifetime.

accept_terms
boolean
Deprecated

Accepted and ignored. Signup is implicit: an unknown email is signed up by this very call.

display_name
string or null <= 255 characters

Display name for a new account. Derived from the email when absent, and ignored for an account that already exists.

invite_token
string or null [ 6 .. 128 ] characters

Invite token from an /invite/{token} link. Signing up with it creates the account inside the invited workspace, under the address the invite was issued to.

time_zone
string <= 64 characters

IANA name of the time zone the client is in, such as Europe/Berlin. A new account keeps it as its own; an existing one is not changed. A name the IANA database does not hold answers 400.

Responses

Request samples

Content type
application/json
Example

Send the email address to start the flow

{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
Example

The user picks the password or the email code; the code is only mailed if requested with POST /auth/challenges/{token}/code

{
  • "challenge": {
    }
}

Log out of the current session

Revokes the caller's own session together with its refresh tokens, and clears the session cookies.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Revoke a specific session

Revokes the named session and its refresh tokens, signing out the device that holds it.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
session_id
required
string
Example: 018f7b2e-3c4d-7a1b-9e6f-2a5c8d1e4b7a

Identifier of the session to revoke

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Revoke all other sessions

Revokes every other session of the current user: every other signed-in device is signed out, while the calling session stays signed in and keeps its credential.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Request a step-up challenge

Always answers 403 challenge_required: a challenge is never minted out of band.

To confirm a sensitive operation, call that operation without confirmation. Its 403 challenge_required refusal carries a challenge bound to that exact call; verify it with POST /auth/challenges/{token} and retry the operation with the token in the X-Auth-Challenge header.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
{
  • "token": "ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5",
  • "expires_at": "2025-05-20T10:35:00Z",
  • "sign_in_methods": [
    ]
}

Verify an authentication challenge

Verifies one entry of the challenge named by token: a sign-in method first, then — when the response lists second_factors — one of those. The call needs a registered device: its access credential names the device the session is minted on.

For a login or signup, the step that completes it issues the session. With response_mode=token it comes back as access_token and refresh_token, otherwise it is set as cookies.

For a step-up, complete: true means the path token is now spendable: retry the operation with it in the X-Auth-Challenge header.

A wrong credential, or a factor_id the account does not have, answers 401 invalid_credentials and counts against the attempt limit.

A recovery with two-step verification on whose second step nothing is left to answer is refused with 409 no_second_factor.

path Parameters
token
required
string
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token to verify

query Parameters
response_mode
string
Default: "cookie"
Enum: "cookie" "token"
Example: response_mode=token

Where the issued tokens go. cookie, the default, sets them as cookies for a browser; token returns them in the response body for a native or CLI client.

Request Body schema: application/json
required
factor_id
required
string

The id of the challenge entry being verified. The email_code and recovery_code entries carry their type as the id.

required
PasswordCredentials (object) or CodeCredentials (object) or WebAuthnCredentials (object) or RecoveryCodeCredentials (object)

Credentials for the entry named by factor_id

Responses

Request samples

Content type
application/json
Example
{
  • "factor_id": "totp_abc123def456xyz7",
  • "credentials": {
    }
}

Response samples

Content type
application/json
Example
{
  • "complete": true,
  • "access_token": "abc123xyz789...",
  • "user": {
    }
}

Send the code for a challenge entry

Sends the code for one code-delivering entry of the challenge named by token — the email_code entry by email, an sms entry by text — a fresh one on every call, so it also resends. Each send draws on the address's code budget. An entry the challenge does not list at its current step, or one that delivers no code, answers factor_not_allowed.

path Parameters
token
required
string
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token to send the code for

Request Body schema: application/json
required
factor_id
required
string

The id of an email_code or sms entry the challenge lists at its current step.

Responses

Request samples

Content type
application/json
Example
{
  • "factor_id": "email_code"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Start a password recovery

Starts a password recovery for an email address and mails its code at once. The response is a challenge whose only entry is email_code, in a shape identical for a known and an unknown address; an unknown one gets no mail. Verify the code with POST /auth/challenges/{token}: with two-step verification on, the second step follows as for a login, without the password: any other confirmed factor or a recovery code. With nothing left to answer it, verify refuses the recovery (no_second_factor). A completed recovery issues no session; it answers complete with the token that POST /auth/recovery/{token}/password spends.

Request Body schema: application/json
required
email
required
string <email> <= 320 characters

Account email address

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "token": "ch_rec123abc456def789",
  • "expires_at": "2025-05-20T10:35:00Z",
  • "sign_in_methods": [
    ]
}

Set a new password after a recovery

Sets the account's password from a completed recovery challenge, replacing the existing one, and ends every session of the account. The token is spent by this call. An unknown, unverified or already spent token answers invalid_challenge_token; one past its time, challenge_expired. A completed recovery opens no session: the client signs in with the new password.

path Parameters
token
required
string
Example: ch_rec123abc456def789

The recovery challenge token, verified

Request Body schema: application/json
required
password
required
string

The new password, in the same form AuthFactorCreateRequest takes it: 8 to 128 characters, or password_too_short / password_too_long.

Responses

Request samples

Content type
application/json
{
  • "password": "a]3N$k9Lm#pQ2wX"
}

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

List available SSO providers

Returns the SSO providers enabled for this deployment, each with the label to show on its sign-in button.

Responses

Response samples

Content type
application/json
{
  • "providers": [
    ]
}

Start SSO authentication flow

Returns the provider's authorization URL for the client to open, and sets the state cookie the callback checks. The provider then redirects to /auth/sso/{provider}/callback with an authorization code.

The call must carry the calling device's access credential — the SSO login binds to that device — and answers 401 without one. An expired access token is still accepted here, because the round trip through the provider can outlast its 15-minute lifetime.

path Parameters
provider
required
string
Enum: "google" "apple"

SSO provider name

query Parameters
redirect_uri
string

Where to return once SSO completes: a path on this origin, a native app scheme, or an allow-listed URL.

Responses

Response samples

Content type
application/json
{
  • "auth_url": "string"
}

Complete SSO redirect callback

Completes the provider's redirect: checks state against the state cookie, exchanges the code with the provider, and establishes the session on the device the flow started from. Session cookies are set either way; with response_mode=token the profile is returned as JSON instead of the redirect.

path Parameters
provider
required
string
Enum: "google" "apple"
query Parameters
code
required
string

Authorization code from the provider

state
required
string

State value, checked against the state cookie

response_mode
string
Default: "cookie"
Enum: "cookie" "token"
Example: response_mode=token

Where the issued tokens go. cookie, the default, sets them as cookies for a browser; token returns them in the response body for a native or CLI client.

Responses

Response samples

Content type
application/json
{
  • "user": {
    },
  • "is_new_user": false
}

Complete SSO callback by form post

Completes the flow for a provider that posts the callback as form data instead of redirecting with query parameters, which is how Apple Sign-In returns. Otherwise it behaves like the GET callback.

path Parameters
provider
required
string
Value: "apple"
Request Body schema: application/x-www-form-urlencoded
required
code
string

Authorization code

state
string

State value, checked against the state cookie

id_token
string

ID token, which Apple supplies directly

user
string

JSON-encoded user info, sent on the first sign-in only

Responses

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

Authenticate with a provider ID token

Exchanges an ID token that a native app obtained from the Google or Apple sign-in SDK for a session, creating the account when the identity is new. The session is set as cookies and the body returns the profile with is_new_user. The call must carry the calling device's access credential; the session binds to that device.

An identity linked to no account whose verified address already belongs to one is refused with 409 email_already_in_use.

path Parameters
provider
required
string
Enum: "google" "apple"
query Parameters
response_mode
string
Default: "cookie"
Enum: "cookie" "token"
Example: response_mode=token

Where the issued tokens go. cookie, the default, sets them as cookies for a browser; token returns them in the response body for a native or CLI client.

Request Body schema: application/json
required
id_token
required
string

ID token from the SSO provider

authorization_code
string

Authorization code the provider SDK returned next to the id_token. The server redeems it for the provider's refresh token, which it revokes when the account is deleted. Required for Sign in with Apple: without it the identity cannot be revoked at Apple on deletion.

display_name
string <= 255 characters

Display name for a new account

accept_terms
boolean
Deprecated
Default: false

Accepted and ignored. Signup is implicit for an unknown identity.

Responses

Request samples

Content type
application/json
{
  • "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ...",
  • "display_name": "John Doe",
  • "accept_terms": true
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "is_new_user": false
}

List authentication factors

Returns every authentication factor on the caller's account with its type and confirmation state, alongside available_types: the types the account may enroll now — what this deployment accepts, and email_code only while the account has none. A factor takes part in login once confirmed.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "available_types": [
    ]
}

Enroll an authentication factor

Creates a factor on the caller's account and returns what is needed to finish setup. A verified challenge in X-Auth-Challenge is required, unless this session confirmed another factor change within the deployment's step-up window.

The factor takes no part in login until it is confirmed. A password arrives confirmed, creating it being the proof, replaces the account's existing one and signs every other session of the account out — the one that set it stays; email_code arrives confirmed too, the address being the account's own. TOTP returns the shared secret and provisioning URI once, here; sms sends a code; webauthn returns registration options. Confirm those with POST /users/me/auth/factors/{factor_id}/confirm.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
required
type
required
string
Enum: "totp" "email_code" "sms" "password" "webauthn"

Factor type to create

phone_number
string

Phone number in E.164 format. Required when type is sms.

password
string

The password, 8 to 128 characters; required when type is password.

TOTPCreateMetadata (object) or EmailCodeCreateMetadata (object)

Type-specific parameters, for totp and email_code

Responses

Request samples

Content type
application/json
Example
{
  • "type": "totp",
  • "metadata": {
    }
}

Response samples

Content type
application/json
Example
{
  • "factor": {
    },
  • "enrollment": {
    }
}

Get an authentication factor

Returns one factor of the caller's own account: its type, confirmation state and what may be changed about it. A factor id belonging to another account reads as factor_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
factor_id
required
string
Example: totp_abc123def456xyz7

Public identifier of the factor

Responses

Response samples

Content type
application/json
{
  • "id": "totp_a1b2c3d4e5f6g7h8",
  • "type": "totp",
  • "is_confirmed": true,
  • "capabilities": {
    },
  • "created_at": "2025-05-20T08:00:00Z",
  • "last_used_at": "2025-05-21T10:20:00Z",
  • "metadata": { }
}

Remove an authentication factor

Deletes one of the caller's own factors. A verified challenge in X-Auth-Challenge is required; without one the call answers 403 challenge_required with a challenge bound to this deletion, unless this session confirmed another factor change within the deployment's step-up window with a factor other than this one.

The account's last sign-in method — password, passkey or email code — will not go (cannot_delete_last_sign_in_method). A deletion that leaves the account with a single confirmed factor while two-step verification is on switches it off, voids the recovery codes and says so in the response.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
factor_id
required
string
Example: totp_abc123def456xyz7

Public identifier of the factor to remove

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Responses

Response samples

Content type
application/json
{
  • "two_step_disabled": false
}

Confirm an enrolled factor

Proves a newly enrolled factor works and marks it confirmed. Send the code from the authenticator app, the email or the SMS as {"code": "123456"}, or the browser's registration result as webauthn_response. A password factor is confirmed when it is created, so it does not use this call.

A confirmed factor takes part in login from then on, at the step its type decides. A wrong credential answers invalid_code, and a factor that is already confirmed answers factor_already_confirmed.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
factor_id
required
string
Example: totp_abc123def456xyz7

Public identifier of the factor to confirm

Request Body schema: application/json

The proof the factor works: a code for totp, email_code and sms, the registration result for webauthn.

code
string [ 6 .. 8 ] characters

6 to 8 digit verification code, for totp, email_code and sms

object (WebAuthnAttestationResponse)

The PublicKeyCredential from navigator.credentials.create(), forwarded verbatim as the WebAuthn specification defines it.

Responses

Request samples

Content type
application/json
Example
{
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "factor": {
    },
  • "enrollment": {
    },
  • "access_token": "string"
}

Switch two-step verification on

Turns two-step verification on for the caller's account and returns its recovery codes, shown this once. From now on a sign-in by password or email code is followed by any other confirmed factor of the account; a passkey or SSO sign-in completes on its own.

Needs at least two confirmed factors (second_factor_required) and a verified challenge in X-Auth-Challenge, unless this session confirmed another factor change within the deployment's step-up window. Already on answers two_step_already_enabled.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "codes": [
    ],
  • "generated_at": "2025-05-20T08:00:00Z"
}

Switch two-step verification off

Turns two-step verification off and voids the recovery codes; the factors stay enrolled. A verified challenge in X-Auth-Challenge is required, unless this session confirmed another factor change within the deployment's step-up window. Already off answers two_step_not_enabled.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Recovery codes status

How many recovery codes are left unused. Zero, with no generated_at, while two-step verification is off.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
{
  • "remaining": 7,
  • "generated_at": "2025-05-20T08:00:00Z"
}

Regenerate recovery codes

Issues a fresh set of recovery codes, shown this once, and voids the previous set. Needs two-step verification on (two_step_not_enabled) and a verified challenge in X-Auth-Challenge, unless this session confirmed another factor change within the last five minutes.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "codes": [
    ],
  • "generated_at": "2025-05-20T08:00:00Z"
}

Users

Account profile, email change, avatar, preferred region, devices and authentication factors.

Update the current user profile

Updates the caller's own profile and returns it in full. display_name renames the account. avatar carries a base64 data URL to upload a new image, an empty string to drop the uploaded one, and is left out to keep the current one. A request that changes neither is rejected.

The email address is changed through POST /users/me/email/change, not here. An image larger than 5 MB answers 413 avatar_too_large; an unsupported format or one outside the accepted pixel range answers 400.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
display_name
string [ 1 .. 255 ] characters
avatar
string or null

The image as a base64 data URL, in JPEG, PNG, WebP or GIF, at most 5 MB decoded and 64×64 to 4096×4096 pixels. An empty string deletes it; omitted or null keeps the current one.

language
string [ 1 .. 64 ] characters

The user's language as a tag, such as de or pt-BR. A value that is not a language tag answers 400. A language the server has no emails in is kept and mailed in English.

time_zone
string [ 1 .. 64 ] characters

IANA name of the user's time zone, such as Europe/Berlin. A name the IANA database does not hold answers 400.

download_digest_period
string (DownloadDigestPeriod)
Enum: "hourly" "daily" "weekly"

How often the user is mailed the digest of their links' downloads (everything after a link's first opening, which is mailed on its own): hourly — as soon as there is something to tell and the previous digest is an hour old; daily / weekly — after 08:00 in the user's time zone for the previous day or the previous Monday-to-Sunday week. Only periods with downloads are mailed. A new account starts at hourly.

Responses

Request samples

Content type
application/json
{
  • "display_name": "Patricia Manager"
}

Response samples

Content type
application/json
{
  • "user_id": "usr_pat1234567890123456",
  • "email": "pat@example.com",
  • "display_name": "Patricia Manager",
  • "avatar_source": "uploaded",
  • "avatar_updated_at": "2025-04-01T09:02:11Z",
  • "created_at": "2024-06-02T14:12:09Z",
  • "updated_at": "2025-04-01T09:02:11Z",
  • "two_step_enabled": false,
  • "workspaces": [
    ]
}

Delete the current user

Deletes the caller's account together with the workspaces it owns and everything anchored to them, and ends every session on every device. Irreversible.

Billing settles first: every subscription must already be inactive at the provider and no billing operation may be left pending, so scheduling a cancellation is not enough. An account that has not settled answers 409 billing_cancellation_required; a workspace the caller still owns and cannot take along answers 409 user_owns_workspaces, so hand it over before retrying.

An identity linked through Sign in with Apple is revoked at Apple before the account goes; if Apple refuses, the deletion fails and can be retried.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Get user avatar

Redirects to a short-lived signed URL of the user's uploaded avatar, served as uploaded (no server-side resize: size is accepted for forward compatibility and ignored). Any authenticated caller — a session or a device — may fetch any user's avatar by id: a user id is random and not guessable, and the avatar is what the user chose to be seen by. avatar_not_found when the user has no uploaded avatar (an unknown id reads the same). The avatar_url in the profile points here and carries a version parameter that changes with every upload, so a cached image is busted by the next one.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
user_id
required
string
Example: usr_pat1234567890123456

Public identifier of the user whose avatar is requested.

query Parameters
size
integer
Default: 128
Enum: 64 128 256

Requested pixel size. Accepted and ignored; the image is served as uploaded.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Unified device overview for the account

Returns the account's device inventory: one card per device, with the caller's live sessions on it, its Vault trust standing (trusted, pending or none) and whether it is online. A device is listed while it has a live session of the caller, a trust-circle membership or a pending join request. Another device's pending request is shown only to a caller whose device is in the trust circle.

The response also carries vault_state and, once a recovery key is stored, recovery. Read-only: revoking a session or trust and deciding a join request stay on their own endpoints. Requires a user session.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
Example

Four cards covering the full surface: the current trusted laptop with a live session; another machine's browser with a session but no trust standing; a phone asking to join (pending block with the request's snapshot); a trusted but logged-out device with no live sessions and minimal registration data.

{
  • "vault_state": "active",
  • "recovery": {
    },
  • "items": [
    ]
}

Request an email address change

Starts an email change: a 6-digit code goes to the new address, and the response says where it was sent and when it expires. Nothing changes on the account until POST /users/me/email/confirm verifies that code, before expires_at.

A verified challenge in X-Auth-Challenge is required; without one the call answers 403 challenge_required. A change already awaiting confirmation answers email_change_pending. An address another account holds is claimed like any other: the answer is the same, no code is sent and the change cannot be confirmed; the holder of the address is notified instead.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Request Body schema: application/json
required
new_email
required
string <email> <= 320 characters

The address the account moves to once the code is confirmed.

Responses

Request samples

Content type
application/json
{
  • "new_email": "newemail@example.com"
}

Response samples

Content type
application/json
{
  • "status": "pending_verification",
  • "verification_sent_to": "newemail@example.com",
  • "expires_at": "2026-02-17T12:30:00Z"
}

Confirm an email address change

Confirms the pending email change with the 6-digit code sent to the new address. The account's address becomes the new one, every other session of the user is revoked while the calling one stays, and the response reports how many were ended.

A wrong code answers invalid_code and counts against the deployment's attempt limit, after which no further attempt is accepted (too_many_attempts). Past its window the change answers email_change_expired; with nothing pending, 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
code
required
string = 6 characters

The 6-digit code sent to the new address.

Responses

Request samples

Content type
application/json
{
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "email": "newemail@example.com",
  • "sessions_revoked": 3
}

Workspaces

Workspaces, invites, members and roles. Workspaces form a tree; every user gets one at signup. Members hold roles that grant permission scopes.

List the caller's workspaces

Returns the workspace the user is a member of and, when their role cascades, every descendant they manage through it, each with the user's role and effective permissions. A self_managed descendant is a barrier and is left out. Ordered by join date, oldest first.

Authorizations:
SessionCookieAuthAccessTokenAuth
query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

Create a workspace

Creates a child workspace and returns it. parent_workspace_id names the parent, any workspace the caller manages; omitted, the parent is the caller's own workspace. The caller does not become a member of the child: an account belongs to exactly one workspace, and people enter the child by invite. autonomy defaults to inherited; self_billed and self_managed are refused here, since the new node would have no owner to pay or manage it. Requires workspace:write on the parent and a Teams plan on whatever bills it, otherwise 403 plan_upgrade_required.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
required
name
required
string [ 1 .. 255 ] characters

Human-readable workspace name

description
string or null <= 1024 characters

What the workspace is for.

parent_workspace_id
string or null

Workspace to nest the new one under. Omit or null for a root workspace.

autonomy
string
Enum: "inherited" "self_billed" "self_managed"

Omitted, a nested workspace is inherited; a root is always self_managed.

Responses

Request samples

Content type
application/json
{
  • "name": "Product Ops",
  • "description": "Shared space for the product operations crew"
}

Response samples

Content type
application/json
{
  • "workspace": {
    }
}

Preview a workspace invite

The same preview as GET /invite/{token}, with the token in the query.

Authorizations:
NoneSessionCookieAuthAccessTokenAuth
query Parameters
code
required
string [ 6 .. 128 ] characters
Example: code=t3Kc7QhX0v9mJd2sYw8LpN4uRbF6gHkA1eZiVoCxWqE

The invite token to preview

Responses

Response samples

Content type
application/json
{
  • "workspace_name": "Core Workspace",
  • "workspace_description": "Primary collaboration space for the core product group.",
  • "inviter_name": "Casey Ops",
  • "role": "member",
  • "member_count": 5,
  • "acceptance": {
    },
  • "membership": {
    }
}

Preview a workspace invite

Returns what the invite leads to: the workspace, the inviter, the role on offer and the current member count. The token is the authorization, so the holder can preview without a session. An unknown token answers 404 invite_not_found, an expired or revoked one 410. A spent token answers its addressee inside the workspace with the preview and their membership, the addressee who has since left it 409 invite_redeemed, and anyone else 404 invite_not_found.

With a session the response also carries acceptance: whether the invite was sent to the caller's address, what would stop POST /invite/{token}/accept right now, and how many links and bytes the caller's workspace holds, which that call asks a decision about.

An address without an account signs up with the token (invite_token in POST /auth/sessions); an account that already holds the address accepts.

Authorizations:
NoneSessionCookieAuthAccessTokenAuth
path Parameters
token
required
string [ 6 .. 128 ] characters
Example: t3Kc7QhX0v9mJd2sYw8LpN4uRbF6gHkA1eZiVoCxWqE

Invite token taken from the invite link.

Responses

Response samples

Content type
application/json
{
  • "workspace_name": "Core Workspace",
  • "workspace_description": "Primary collaboration space for the core product group.",
  • "inviter_name": "Casey Ops",
  • "role": "member",
  • "member_count": 5,
  • "acceptance": {
    }
}

Accept a workspace invite with an existing account

Moves the caller's account into the invite's workspace with the invite's role and spends the invite. The invite must have been sent to the caller's address; any other token answers 404 invite_not_found, exactly like an unknown one. The caller must be alone in their own root workspace, which is deleted by the move; a member of another workspace leaves it first.

What still hangs off the root is refused, and nothing changes: other members (workspace_has_members), child workspaces (has_children), a subscription that has not ended (workspace_has_subscription), a billing operation still settling (billing_operation_unresolved). The invite's workspace must have a seat left (workspace_at_capacity) and a plan that admits members (plan_upgrade_required).

Live links of the root need a decision in links: move carries them, with their stored files, into the new workspace, where its members see them by role and the bytes count against its payer at once; delete deletes them. With live links and no links the call answers workspace_has_active_links; the preview says how many there are. The move keeps every link's expiry, region, keys and P2P source.

The caller's sockets are closed, as on removal, and reconnect with the new membership; the session itself stays. A repeat with the same Idempotency-Key answers the original outcome. Once spent, the token answers the account inside the workspace with its membership again, and the addressee who has since left it 409 invite_redeemed.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
token
required
string [ 6 .. 128 ] characters
Example: t3Kc7QhX0v9mJd2sYw8LpN4uRbF6gHkA1eZiVoCxWqE

Invite token taken from the invite link.

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
optional
links
string
Enum: "move" "delete"

move carries the links and their stored files into the invite's workspace; delete deletes them.

Responses

Request samples

Content type
application/json
{
  • "links": "move"
}

Response samples

Content type
application/json
{
  • "workspace_id": "ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f",
  • "parent_workspace_id": null,
  • "name": "Core Workspace",
  • "description": "Main workspace for the product group",
  • "member_count": 5,
  • "role": "owner",
  • "effective_permissions": [
    ],
  • "autonomy": "inherited",
  • "joined_at": "2024-08-11T08:05:44Z",
  • "billing_root_workspace_id": "ws_a1b2c3d4e5f6g7h8"
}

Get workspace details

Returns one workspace. The caller must be a member; a workspace the caller cannot reach is answered 404, so its existence is never revealed.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace

Responses

Response samples

Content type
application/json
{
  • "workspace_id": "ws_7c3a1e5d-9f2b-4d6e-8a1c-3e5b9d7f2a4c",
  • "parent_workspace_id": null,
  • "name": "Core Workspace",
  • "description": "Primary collaboration space for the core product group.",
  • "autonomy": "inherited",
  • "created_at": "2025-05-20T10:25:00Z",
  • "updated_at": "2025-05-20T10:25:00Z",
  • "preferred_region": "eu",
  • "storage_bytes": 10737418240,
  • "links_count": 42
}

Update workspace details

Changes the name, the description, the autonomy, or the parent (a move). Name and description take workspace:write; autonomy and parent take workspace:own, and a move needs it on both parents. A root keeps self_managed and cannot be moved; leaving inherited needs an owner member inside the node. A node that comes under another payer — moved, or back to inherited — must fit its seats with everyone inside, otherwise 409 workspace_at_capacity. A node that stops paying for itself writes off its open payment forms and cancels its subscription at period end first; a billing operation still unresolved on it, or a completed form whose payment has not landed, is 409 billing_operation_unresolved, an unreachable payment provider 503 billing_unavailable. Returns the updated workspace.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace to update

Request Body schema: application/json
required
name
string [ 1 .. 255 ] characters

New name for the workspace

description
string or null <= 1024 characters

New description. Send null to clear it.

autonomy
string
Enum: "inherited" "self_billed" "self_managed"

New autonomy of the workspace; a root cannot leave self_managed.

parent_workspace_id
string

Workspace to move this one under; a root cannot be moved.

Responses

Request samples

Content type
application/json
{
  • "name": "Renamed Workspace",
  • "description": "Updated description"
}

Response samples

Content type
application/json
{
  • "workspace_id": "ws_7c3a1e5d-9f2b-4d6e-8a1c-3e5b9d7f2a4c",
  • "parent_workspace_id": null,
  • "name": "Core Workspace",
  • "description": "Primary collaboration space for the core product group.",
  • "autonomy": "inherited",
  • "created_at": "2025-05-20T10:25:00Z",
  • "updated_at": "2025-05-20T10:25:00Z",
  • "preferred_region": "eu",
  • "storage_bytes": 10737418240,
  • "links_count": 42
}

Delete a workspace

Deletes a workspace: every invite it issued stops working, its roles go with it. Requires workspace:own. Only an empty leaf goes: the caller's own workspace cannot be deleted, and a workspace that still has child workspaces, members or live links answers 409.

A subscription the workspace holds ends at once; the unused share of its paid period is refunded to the card, and the owners are told with billing.refund_issued once the provider confirms. GET /workspaces/{workspace_id}/billing shows period_end and refund_on_delete_minor beforehand. A billing operation still settling answers 409 billing_operation_unresolved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace to delete

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Get the workspace preferred region

Returns the workspace's preferred cloud region and the regions it may choose from. While the preference is set, new links in the workspace are stored there; otherwise a new link is placed by the uploader's country, or in the deployment's default region.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_9f63b7a0d6f54cb5

Workspace public ID

Responses

Response samples

Content type
application/json
{
  • "preferred_region": "eu",
  • "available_regions": [
    ]
}

Set the workspace preferred region

Sets the cloud region new links in the workspace are stored in. Send preferred_region: null to clear it: a new link is then placed by the uploader's country, or in the deployment's default region. Requires the workspace:write scope or owner rights. A region this deployment does not declare answers 400 invalid_region.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_9f63b7a0d6f54cb5

Workspace public ID

Request Body schema: application/json
required
preferred_region
required
string or null

Cloud region for the workspace's new links. Null clears the preference: a new link is then placed by the uploader's country, or in the deployment's default region.

Responses

Request samples

Content type
application/json
Example
{
  • "preferred_region": "us"
}

Response samples

Content type
application/json
{
  • "preferred_region": "us",
  • "available_regions": [
    ]
}

List workspace invites

Returns the workspace's live invites: id, the address each was sent to, the role it grants when spent and its expiry. The invite token itself travels only in the mail; reads show its tail as code_hint.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f

Identifier of the workspace whose invites should be returned

query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

Create a workspace invite

Invites one person, by address, into the workspace. The invite is mailed to recipient_email and spent once: an address without an account signs up under it with the token, whatever the recipient types; an address that already has an account is told to sign in and accept. The response and the mail are the same either way. A live invite to the same address from this workspace is replaced by the new one. An address that belongs to a member of this workspace is refused with 409 workspace_member_exists.

The invite's role is what the new member gets; it is never owner, which comes only by handing the workspace over, and an invite naming it answers 400 validation_failed. expires_at sets when the invite stops working; omitted, the server's default lifetime applies.

Every invite is a mail from the server, so the application bounds them: no more live invites than free seats (409 workspace_at_capacity), the same address not again too soon (429 invite_resend_too_soon), and only so many a day (429 invite_daily_limit_reached); a refused invite is neither created nor mailed.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f

Identifier of the workspace for which the invite will be created

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
required
recipient_email
required
string <email>

Address to mail the invite to; the account joins under it.

role
string or null

Role the invite grants, one of the application's roles other than owner; omitted, the application's default.

expires_at
string or null <date-time>

When the invite stops working. Omitted, the server's default lifetime applies.

Responses

Request samples

Content type
application/json
{
  • "recipient_email": "casey@example.com",
  • "role": "member",
  • "expires_at": "2025-06-20T09:00:00Z"
}

Response samples

Content type
application/json
{
  • "invite_id": "inv_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f",
  • "workspace_id": "ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f",
  • "code_hint": "...OPS",
  • "recipient_email": "casey@example.com",
  • "role": "member",
  • "effective_permissions": [
    ],
  • "created_by_user_id": "usr_6f1a9c3e-8b2d-4f7a-9c1e-5d3b7a2f8e4c",
  • "created_at": "2025-05-20T09:00:00Z",
  • "expires_at": "2025-06-20T09:00:00Z"
}

Revoke a workspace invite

Revokes an invite. Its token stops working immediately, so the recipient can neither sign up with it nor accept it.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f

Identifier of the workspace that issued the invite

invite_id
required
string
Example: inv_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f

Identifier of the invite to revoke

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

List workspace members

Returns the workspace's members, each with their id, email and display name, their role and effective permissions, the date they joined and who invited them. Ordered by join date. Requires at least the workspace:read scope.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace whose members should be returned

query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

Get workspace member statistics

Returns per-member activity for the workspace: links created, upload and download counts and storage used. Only links owned by this workspace are counted. Requires the workspace:read scope or owner rights.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get a workspace member

Returns one member of the workspace with their role and effective permissions. The caller must be a member of the workspace.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace

user_id
required
string
Example: usr_a1b2c3d4e5f6g7h8i9j0

Identifier of the user whose membership to retrieve

Responses

Response samples

Content type
application/json
{
  • "user_id": "usr_a4e7c2d9-3b1f-4e6a-8d5c-2f9b7e1a6c3d",
  • "email": "casey@example.com",
  • "display_name": "Casey Ops",
  • "role": "member",
  • "effective_permissions": [
    ],
  • "joined_at": "2024-08-15T10:45:00Z",
  • "invited_by_user_id": "usr_c8d2f5a1-7e3b-4c9d-a6f2-1b4e8d7c5a9f",
  • "cascade_to_children": false,
  • "identity_public_key": "MCowBQYDK2VuAyEAq8Gk1GMnfN3WjLKBHaOvhB0tXRuQbVJLBqFz5mFqHQA=",
  • "identity_key_attestation": {
    }
}

Update a workspace member

Changes a member's role (member, admin or a custom one); the result is returned as the updated membership. A member's permissions are their role's — there are no per-member extras. Ownership is not given here: a member becomes an owner only by the hand-over (workspaceMemberOwnership), and naming owner for one who does not hold it answers 400 validation_failed; an owner keeps owner to change only cascade_to_children.

Requires the workspace:write scope or owner rights. The caller cannot grant more than they hold themselves, and only an owner may change another owner. The workspace must keep at least one owner, so downgrading the last one answers 403 workspace_must_have_at_least_one_owner; the billing owner of a workspace paying for itself stays an owner until the billing or the workspace is handed over, 409 billing_owner_must_hand_over.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace that contains the member

user_id
required
string
Example: usr_a1b2c3d4e5f6g7h8i9j0

Identifier of the user whose membership will be updated

Request Body schema: application/json
required
role
required
string

Role to give the user; the application's role names. owner only keeps an owner's role — a member is made an owner by handing the workspace over.

cascade_to_children
boolean

When true, the member's permissions also apply in every child workspace.

Responses

Request samples

Content type
application/json
{
  • "role": "member"
}

Response samples

Content type
application/json
{
  • "user_id": "usr_a4e7c2d9-3b1f-4e6a-8d5c-2f9b7e1a6c3d",
  • "email": "casey@example.com",
  • "display_name": "Casey Ops",
  • "role": "member",
  • "effective_permissions": [
    ],
  • "joined_at": "2024-08-15T10:45:00Z",
  • "invited_by_user_id": "usr_c8d2f5a1-7e3b-4c9d-a6f2-1b4e8d7c5a9f",
  • "cascade_to_children": false,
  • "identity_public_key": "MCowBQYDK2VuAyEAq8Gk1GMnfN3WjLKBHaOvhB0tXRuQbVJLBqFz5mFqHQA=",
  • "identity_key_attestation": {
    }
}

Remove a workspace member

Removes a user from the workspace; their access ends immediately. Requires the workspace:write scope or owner rights, except that a member may always remove themselves. Only an owner may remove another owner, and the last owner cannot be removed — hand ownership over first (workspaceMemberOwnership). The one exception is an owner above taking out the last owner of a child that holds nobody else; a self_managed child keeps its last owner, and so does a child paying for itself that has children. A childless one paying for itself inherits its payer again, its open payment forms written off and its subscription cancelled at period end: a billing operation still unresolved on it, or a completed form whose payment has not landed, is 409 billing_operation_unresolved, an unreachable payment provider 503 billing_unavailable. Otherwise the billing owner of a workspace paying for itself stays until the billing or the workspace is handed over: 409 billing_owner_must_hand_over.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace that contains the member

user_id
required
string
Example: usr_a1b2c3d4e5f6g7h8i9j0

Identifier of the user whose membership will be removed

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

Hand a workspace's ownership to a member

Makes the member an owner of the workspace; the only way ownership changes hands. The caller is an owner of the workspace and names in the body what they keep: stay_as a role — owner makes the member an owner beside them — or leave to leave the workspace once the member owns it. A workspace with no owner of its own gets its first from an owner above, who sends neither and whose own roles do not change; a workspace that has an owner is not handed over from above.

The member is one who does not own the workspace yet, otherwise 400 validation_failed, as is a body naming both or neither of stay_as and leave from an owner of the workspace. A caller who may not manage its members answers 403 forbidden; one who manages them without owning it, or owns it from above while it has an owner, 403 only_owners_can_perform_this_action.

With consent the roles do not change yet: the member is offered the ownership on these same terms and answers 202 with the offer, replacing any earlier offer of the workspace. The roles change once the member accepts.

Needs a login session and a fresh factor in X-Auth-Challenge on every call. Returns the member's new membership.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace whose ownership changes hands

user_id
required
string
Example: usr_a1b2c3d4e5f6g7h8i9j0

Identifier of the member who becomes an owner

header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Request Body schema: application/json
required
stay_as
string

The role the caller keeps in the workspace: owner makes the member an owner beside them, any other role hands ownership over.

leave
boolean

When true, the caller leaves the workspace once the member owns it.

consent
boolean

When true, nothing changes yet: the member is offered the ownership and the roles change only once they accept. Without it the roles change at once.

Responses

Request samples

Content type
application/json
{
  • "stay_as": "admin"
}

Response samples

Content type
application/json
{
  • "user_id": "usr_a4e7c2d9-3b1f-4e6a-8d5c-2f9b7e1a6c3d",
  • "email": "casey@example.com",
  • "display_name": "Casey Ops",
  • "role": "member",
  • "effective_permissions": [
    ],
  • "joined_at": "2024-08-15T10:45:00Z",
  • "invited_by_user_id": "usr_c8d2f5a1-7e3b-4c9d-a6f2-1b4e8d7c5a9f",
  • "cascade_to_children": false,
  • "identity_public_key": "MCowBQYDK2VuAyEAq8Gk1GMnfN3WjLKBHaOvhB0tXRuQbVJLBqFz5mFqHQA=",
  • "identity_key_attestation": {
    }
}

Read a workspace's pending ownership offer

The workspace's live ownership offer, made with consent on workspaceMemberOwnership; whoever may read the workspace's members sees it. An expired, answered, revoked or replaced offer, or one whose member or maker left the workspace, is gone: 404 ownership_offer_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace

Responses

Response samples

Content type
application/json
{
  • "offer_id": "oof_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f",
  • "workspace_id": "ws_a1b2c3d4e5f6g7h8",
  • "user_id": "usr_a1b2c3d4e5f6g7h8i9j0",
  • "offered_by": "usr_k1l2m3n4o5p6q7r8s9t0",
  • "stay_as": "admin",
  • "leave": false,
  • "created_at": "2026-10-14T10:00:00Z",
  • "expires_at": "2026-10-21T10:00:00Z"
}

Revoke a workspace's pending ownership offer

Withdraws the live ownership offer before the member answers it. An owner of the workspace revokes it, inside it or above it; one who manages its members without owning it answers 403 only_owners_can_perform_this_action. With offer_id only that offer is revoked: one replaced meanwhile, or an id that names none, answers 404 ownership_offer_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace

query Parameters
offer_id
string
Example: offer_id=oof_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f

The offer to revoke; without it, whichever offer is live.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Accept the ownership offered to the caller

The member the live offer names takes it: they become an owner, and the offering owner keeps the role the offer names or leaves the workspace, as if they handed it over at this moment, re-decided on the maker's rights now. Anyone the live offer does not name — a member or a stranger — hears 404 ownership_offer_not_found, as if there were none; so does an offer_id the live offer does not carry, so an offer replaced while the answer was on its way is not taken. An offer that no longer holds — its maker owns the workspace no longer or is suspended, the session it was made in was cut off as untrusted (revoked by its owner or an operator, its device removed or suspended, its token stolen), the caller owns it already or the role it names is gone — is dropped as revoked and answers 409 ownership_offer_stale.

Needs a login session. Returns the caller's new membership.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace

Request Body schema: application/json
optional
offer_id
string

The offer being answered.

Responses

Request samples

Content type
application/json
{
  • "offer_id": "oof_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f"
}

Response samples

Content type
application/json
{
  • "user_id": "usr_a4e7c2d9-3b1f-4e6a-8d5c-2f9b7e1a6c3d",
  • "email": "casey@example.com",
  • "display_name": "Casey Ops",
  • "role": "member",
  • "effective_permissions": [
    ],
  • "joined_at": "2024-08-15T10:45:00Z",
  • "invited_by_user_id": "usr_c8d2f5a1-7e3b-4c9d-a6f2-1b4e8d7c5a9f",
  • "cascade_to_children": false,
  • "identity_public_key": "MCowBQYDK2VuAyEAq8Gk1GMnfN3WjLKBHaOvhB0tXRuQbVJLBqFz5mFqHQA=",
  • "identity_key_attestation": {
    }
}

Decline the ownership offered to the caller

The member the live offer names turns it down; nothing changes and the offer is gone. Anyone the live offer does not name hears 404 ownership_offer_not_found, as if there were none; so does an offer_id the live offer does not carry.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the workspace

Request Body schema: application/json
optional
offer_id
string

The offer being answered.

Responses

Request samples

Content type
application/json
{
  • "offer_id": "oof_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

List workspace roles

Returns the roles a workspace offers: the preset ones (owner, admin, member), which cannot be changed or deleted, and any custom roles defined for this workspace with their own permission sets.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f

Workspace public ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a custom role

Creates a custom role in the workspace and returns it. role_key must match [a-z][a-z0-9_]* and be unique within the workspace.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string

Workspace public ID

Request Body schema: application/json
required
role_key
required
string^[a-z][a-z0-9_]*$

Unique identifier for the role within the workspace

display_name
required
string

Human-readable name

permissions
required
Array of strings

Permission scopes granted to this role

Responses

Request samples

Content type
application/json
{
  • "role_key": "reviewer",
  • "display_name": "Code Reviewer",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "role_id": "role_123",
  • "workspace_id": "ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f",
  • "role_key": "reviewer",
  • "display_name": "Code Reviewer",
  • "permissions": [
    ],
  • "is_preset": false,
  • "created_at": "2025-01-15T10:30:00Z"
}

Get role details

Returns one role of the workspace with its permission set.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string

Workspace public ID

role_id
required
string
Example: role_123

Role ID (role_{id} format)

Responses

Response samples

Content type
application/json
{
  • "role_id": "role_123",
  • "workspace_id": "ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f",
  • "role_key": "reviewer",
  • "display_name": "Code Reviewer",
  • "permissions": [
    ],
  • "is_preset": false,
  • "created_at": "2025-01-15T10:30:00Z"
}

Update a custom role

Changes a custom role's display name or replaces its permission set. Preset roles cannot be changed.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string

Workspace public ID

role_id
required
string

Role ID

Request Body schema: application/json
required
display_name
string

New display name

permissions
Array of strings

New permission set (replaces existing)

Responses

Request samples

Content type
application/json
{
  • "display_name": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "role_id": "role_123",
  • "workspace_id": "ws_2b9e4f7a-1c3d-4a8b-9f6e-7d2c5b1a3e9f",
  • "role_key": "reviewer",
  • "display_name": "Code Reviewer",
  • "permissions": [
    ],
  • "is_preset": false,
  • "created_at": "2025-01-15T10:30:00Z"
}

Delete a custom role

Deletes a custom role; members holding it lose the permissions it carried. Preset roles cannot be deleted.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string

Workspace public ID

role_id
required
string

Role ID

Responses

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

List child workspaces

Returns the workspaces nested directly under the given one. Only immediate children come back; walk deeper by calling this again for each child.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Identifier of the parent workspace whose children should be listed

query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

Get workspace usage

Returns the workspace's current usage counters: storage, transfer bytes this month and active links. The counters cover the whole billing subtree the workspace belongs to, while storage_bytes_workspace reports this workspace alone. Add ?breakdown=true for per-workspace storage across that subtree. Requires the workspace:read permission; a workspace the caller cannot reach is answered 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_coreworkspace1

Workspace identifier

query Parameters
breakdown
boolean
Default: false
Example: breakdown=true

When true, the response also carries breakdown_by_child: storage per workspace across the billing subtree.

Responses

Response samples

Content type
application/json
{
  • "principal_id": "ws_coreworkspace1",
  • "counters": {
    },
  • "storage_bytes_workspace": 5368709120,
  • "updated_at": "2025-02-03T10:30:00Z"
}

Get workspace limits

Returns the limits in force for the workspace once tier defaults, workspace overrides and feature flags have been applied, together with the tier it sits on and how many overrides it carries. A limit of null means unlimited. Requires the workspace:read permission; a workspace the caller cannot reach is answered 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_coreworkspace1

Workspace identifier

Responses

Response samples

Content type
application/json
{
  • "limits": {
    },
  • "tier_slug": "enterprise",
  • "tier_name": "Enterprise Plan",
  • "override_count": 1,
  • "features": {
    }
}

Get the workspace avatar

Redirects to the workspace's avatar image in one of the sizes 64, 128 or 256 pixels, 128 by default. A workspace with no uploaded avatar answers 404. The response carries cache headers, and the redirect URL changes whenever the avatar does, so a cached copy is never served for a new image.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_coreworkspace1

Workspace identifier

query Parameters
size
integer
Default: 128
Enum: 64 128 256

Avatar size in pixels

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Upload the workspace avatar

Uploads or replaces the workspace's avatar, sent as a base64 data URL, and returns the updated workspace. Accepted formats are JPEG, PNG, WebP and GIF; the decoded image may not exceed the deployment's size cap, 5 MB by default. Requires the workspace:write scope.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_coreworkspace1

Workspace identifier

Request Body schema: application/json
required
avatar
required
string

The image as a data URL, data:image/<type>;base64,<data>, where type is jpeg, png, webp or gif.

Responses

Request samples

Content type
application/json
{
  • "avatar": "data:image/png;base64,iVBORw0KGgo..."
}

Response samples

Content type
application/json
{
  • "workspace_id": "ws_7c3a1e5d-9f2b-4d6e-8a1c-3e5b9d7f2a4c",
  • "parent_workspace_id": null,
  • "name": "Core Workspace",
  • "description": "Primary collaboration space for the core product group.",
  • "autonomy": "inherited",
  • "created_at": "2025-05-20T10:25:00Z",
  • "updated_at": "2025-05-20T10:25:00Z",
  • "preferred_region": "eu",
  • "storage_bytes": 10737418240,
  • "links_count": 42
}

Delete the workspace avatar

Removes the workspace's avatar. Requires the workspace:write scope.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_coreworkspace1

Workspace identifier

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Vault

End-to-end encryption keys: the identity key pair, the trust circle of devices, share keys wrapped per recipient, recovery, and claims for anonymous sharing. Clients read GET /vault/config on startup for the active cipher suite.

Get vault crypto configuration

Returns the cipher suite configuration for vault end-to-end encryption. Clients read it on startup and follow three rules: encrypt new blobs with latest_suite_version, decrypt any suite they know, and treat an unknown version as a hard error rather than falling back.

Authorizations:
AccessTokenAuthSessionCookieAuth

Responses

Response samples

Content type
application/json
{
  • "min_suite_version": 1,
  • "latest_suite_version": 1
}

List trusted devices Deprecated

Superseded by GET /users/me/devices, where trusted devices are the cards with trust.status: trusted. Returns the devices in the caller's trust circle. Only a device inside the circle may read the roster.

Authorizations:
AccessTokenAuthSessionCookieAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Register first device

Registers the calling device as the first device of the trust circle and stores the user's identity keypair. Needs a login session, not trust circle membership. A user that already has an identity key answers 409 vault_already_initialized.

Authorizations:
AccessTokenAuthSessionCookieAuth
Request Body schema: application/json
required
device_public_key
required
string <byte> <= 64 characters

X25519 device public key (base64) — exactly 32 bytes after decoding

encrypted_identity_key
required
string <byte> <= 1024 characters

Identity private key wrapped to the device public key (hybrid encryption). A blob under 61 decoded bytes — suite byte, ephemeral public key, IV and GCM tag — is refused as validation_failed.

identity_public_key
required
string <byte> <= 64 characters

Identity X25519 public key (base64) — exactly 32 bytes after decoding

encrypted_identity_key_for_recovery
string <byte> <= 1024 characters

Identity private key encrypted with the recovery master key. Optional; can be set later with PUT /vault/recovery. Under 28 decoded bytes (IV and GCM tag) it is refused as validation_failed.

Responses

Request samples

Content type
application/json
{
  • "device_public_key": "string",
  • "encrypted_identity_key": "string",
  • "identity_public_key": "string",
  • "encrypted_identity_key_for_recovery": "string"
}

Response samples

Content type
application/json
{
  • "agent_id": "agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  • "device_name": "MacBook Pro",
  • "device_fingerprint": "a1b2c3d4",
  • "device_public_key": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_seen_at": "2019-08-24T14:15:22Z",
  • "is_current": true,
  • "display_name": "string",
  • "device": {
    }
}

Request to join trust circle

Submits a join request from the calling device. No body: the device's public key and name are the calling agent's own, already known from its registration. Needs a login session, not trust circle membership; the vault must already be initialized. Every trusted device receives a vault.device_join_requested frame, and the response lists the same devices as approvers, so the asking device can show where to confirm.

Asking again is safe and is the way out of a stale ask: the account keeps one live request per device, so a repeat returns the standing request with the same request_id and the deadline pushed out. A device that switched accounts asks each vault independently.

Authorizations:
AccessTokenAuthSessionCookieAuth

Responses

Response samples

Content type
application/json
{
  • "request_id": "string",
  • "device_fingerprint": "string",
  • "status": "pending",
  • "expires_at": "2019-08-24T14:15:22Z",
  • "approvers": [
    ]
}

List pending join requests Deprecated

Superseded by GET /users/me/devices, where pending requests are the cards with trust.status: pending, carrying the request snapshot and the device key needed to approve. Returns the join requests awaiting a decision in the caller's trust circle. Only a device inside the circle may read them and decide them.

Authorizations:
AccessTokenAuthSessionCookieAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Approve device join request

Approves a pending join request. The caller must itself be a trusted device and supplies encrypted_identity_key — the identity private key wrapped to the requesting device's public key. The requester receives vault.device_approved carrying that wrap; the remaining trusted devices receive vault.device_approved_broadcast so their device lists refresh.

A request another trusted device already decided answers 409 join_request_already_decided; one already rejected or expired answers 410.

Authorizations:
AccessTokenAuthSessionCookieAuth
path Parameters
agent_id
required
string (AgentID) [ 8 .. 256 ] characters ^agt_[A-Za-z0-9_-]+$
Example: agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

Unique agent identifier, prefixed with agt_. Returned by POST /auth/agents as agent_id and carried in the access token's claims, so no separate header is needed.

Request Body schema: application/json
required
encrypted_identity_key
required
string <byte> <= 1024 characters

Identity private key wrapped to the new device's public key (hybrid encryption). Under the 61-decoded-byte floor it is refused as validation_failed.

Responses

Request samples

Content type
application/json
{
  • "encrypted_identity_key": "string"
}

Response samples

Content type
application/json
{
  • "agent_id": "agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  • "device_name": "MacBook Pro",
  • "device_fingerprint": "a1b2c3d4",
  • "device_public_key": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_seen_at": "2019-08-24T14:15:22Z",
  • "is_current": true,
  • "display_name": "string",
  • "device": {
    }
}

Reject device join request

Rejects a pending join request. The caller must itself be a trusted device. The rejected device receives vault.device_rejected by direct push; the user's trusted devices receive vault.device_rejected_broadcast so their pending lists drop the request. The optional reason travels only to the rejected device, as written, and is recorded in the audit log.

Authorizations:
AccessTokenAuthSessionCookieAuth
path Parameters
agent_id
required
string (AgentID) [ 8 .. 256 ] characters ^agt_[A-Za-z0-9_-]+$
Example: agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

Unique agent identifier, prefixed with agt_. Returned by POST /auth/agents as agent_id and carried in the access token's claims, so no separate header is needed.

Request Body schema: application/json
optional
reason
string [ 1 .. 500 ] characters

Free-text rejection reason chosen by the rejecting device's user.

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

Revoke device from trust circle

Removes a device from the trust circle and deletes its wrapped copy of the identity key. The revoked device receives vault.device_self_revoked, loses its subscriptions, its sessions and its socket; every remaining trusted device receives vault.device_revoked. The caller must itself be a trusted device and cannot revoke the one holding the current session (409 cannot_revoke_current_device).

Authorizations:
AccessTokenAuthSessionCookieAuth
path Parameters
agent_id
required
string (AgentID) [ 8 .. 256 ] characters ^agt_[A-Za-z0-9_-]+$
Example: agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

Unique agent identifier, prefixed with agt_. Returned by POST /auth/agents as agent_id and carried in the access token's claims, so no separate header is needed.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Get recovery key status

Reports whether a recovery-encrypted identity key exists for the user. Never returns the blob itself — that is POST /vault/recovery/recover.

Any login session of the user may ask, trusted or not: a device that lost the trust circle needs this answer to know whether recovery is an option or reset is the only way back.

Authorizations:
AccessTokenAuthSessionCookieAuth

Responses

Response samples

Content type
application/json
{
  • "configured": true,
  • "updated_at": "2019-08-24T14:15:22Z"
}

Upsert recovery key

Stores the recovery-encrypted identity key, replacing any existing one for the caller. Requires trust circle membership. The same payload covers both first setup and regeneration; the caller does not need to know which case applies.

Authorizations:
AccessTokenAuthSessionCookieAuth
Request Body schema: application/json
required
encrypted_identity_key_for_recovery
required
string <byte> <= 1024 characters

Identity private key encrypted with the recovery master key (symmetric AES-256-GCM). Under 28 decoded bytes (IV and GCM tag) it is refused as validation_failed.

Responses

Request samples

Content type
application/json
{
  • "encrypted_identity_key_for_recovery": "string"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Start vault recovery

Returns the recovery-encrypted identity key. Needs a login session, not trust circle membership. Decrypt it with the recovery key, re-encrypt the identity private key under the new device's public key, then call POST /vault/recovery/complete to finish. A user that never stored a recovery key answers 404 recovery_not_set_up.

Authorizations:
AccessTokenAuthSessionCookieAuth
Request Body schema: application/json
required
device_public_key
required
string <byte> <= 64 characters

New device's X25519 public key — exactly 32 bytes after decoding

Responses

Request samples

Content type
application/json
{
  • "device_public_key": "string"
}

Response samples

Content type
application/json
{
  • "encrypted_identity_key_for_recovery": "string"
}

Complete vault recovery

Finishes the flow started by POST /vault/recovery/recover: submit the identity key decrypted with the recovery words and re-encrypted under the new device's public key. The submitted identity_public_key must match the user's stored one; every device in the circle is then revoked, losing its sessions and sockets, and the calling device is enrolled as the sole trusted one. The identity is unchanged, so wrapped share keys survive.

Needs a login session and a fresh factor in X-Auth-Challenge, not trust circle membership. A caller already in the circle answers 409 device_already_trusted.

Authorizations:
AccessTokenAuthSessionCookieAuth
header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Request Body schema: application/json
required
device_public_key
required
string <byte> <= 64 characters

X25519 public key of the new device (base64) — exactly 32 bytes after decoding.

encrypted_identity_key
required
string <byte> <= 1024 characters

Identity private key, decrypted with the recovery words and re-encrypted under device_public_key (base64); under the 61-decoded-byte floor it is refused as validation_failed.

identity_public_key
required
string <byte> <= 64 characters

Identity X25519 public key — exactly 32 bytes after decoding. Must match the user's stored one; it binds the call to the right vault.

Responses

Request samples

Content type
application/json
{
  • "device_public_key": "string",
  • "encrypted_identity_key": "string",
  • "identity_public_key": "string"
}

Response samples

Content type
application/json
{
  • "agent_id": "agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  • "device_name": "MacBook Pro",
  • "device_fingerprint": "a1b2c3d4",
  • "device_public_key": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_seen_at": "2019-08-24T14:15:22Z",
  • "is_current": true,
  • "display_name": "string",
  • "device": {
    }
}

Reset the vault

The way out when both the trust circle and the recovery key are lost. One transaction swaps in the submitted identity, empties the circle, discards the caller's wrapped share keys, deletes every link the account owns, replaces the recovery key with the submitted wrap or deletes it when none is sent, and enrols the caller as the sole trusted device; the replaced devices lose their sessions and sockets.

Each deleted link is taken down like any other: subscribers hear link.deleted, and its recipients lose access. Links a device created before signing in belong to the device and stay. Grants and workspace membership survive, so the holder of a link someone else shares with the caller can re-wrap its key through the pending-key bridge.

Needs a fresh factor in X-Auth-Challenge; re-submitting the stored identity_public_key is refused as validation_failed.

Authorizations:
AccessTokenAuthSessionCookieAuth
header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Request Body schema: application/json
required
device_public_key
required
string <byte> <= 64 characters

X25519 public key of the new device (base64) — exactly 32 bytes after decoding.

identity_public_key
required
string <byte> <= 64 characters

New identity X25519 public key (base64) — exactly 32 bytes after decoding. Must differ from the stored one, which is device recovery rather than a reset.

encrypted_identity_key
required
string <byte> <= 1024 characters

New identity private key wrapped to device_public_key (base64); under the 61-decoded-byte floor it is refused as validation_failed.

encrypted_identity_key_for_recovery
string <byte> <= 1024 characters

New identity private key encrypted with a new recovery master key (base64). Optional: without it the stored recovery key is deleted. Under 28 decoded bytes it is refused as validation_failed.

Responses

Request samples

Content type
application/json
{
  • "device_public_key": "string",
  • "identity_public_key": "string",
  • "encrypted_identity_key": "string",
  • "encrypted_identity_key_for_recovery": "string"
}

Response samples

Content type
application/json
{
  • "agent_id": "agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  • "device_name": "MacBook Pro",
  • "device_fingerprint": "a1b2c3d4",
  • "device_public_key": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_seen_at": "2019-08-24T14:15:22Z",
  • "is_current": true,
  • "display_name": "string",
  • "device": {
    }
}

Deliver wrapped share keys

Writes wrapped share keys into the vault key-store for one or more (link, recipient) pairs — all rows or none. Key delivery only: no scopes and no ACL changes. Any key holder able to read the link may deliver, and delivery never widens access: a row is written only for a recipient that already reaches the link, and a keyless target answers 404 pending_key_not_found.

The key-store is insert-only. The first delivery for a pair wins, a replay with identical bytes counts as delivered, and different bytes answer 409 vault_key_conflict and roll the whole batch back.

Once the link's workspace has its key, a user recipient that reads its links must have an attested identity key there (identity_key_attestation on the member row), whoever delivers; otherwise 409 tmk_attestation_required. Recipients outside the workspace are unaffected.

Authorizations:
AccessTokenAuthSessionCookieAuth
Request Body schema: application/json
required
required
Array of objects (VaultKeyBatchItem) [ 1 .. 100 ] items

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "delivered": 0
}

Reset own wrapped share key

Deletes the caller's own key-store row for the link and re-queues the caller as authorized-but-keyless, so an online key holder delivers a fresh wrap. This is the repair path for a key that fails to decrypt. Only the caller's own row can be reset; another recipient's key is not reachable through any endpoint.

Authorizations:
AccessTokenAuthSessionCookieAuth
path Parameters
url_token
required
string

Link URL token

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

List pending share key requests

Returns the pending key requests for links the caller holds a key for, as owner or as a recipient with a key-store row — the catch-up companion to the vault.share_key_needed frame, for a holder that was offline when the request was queued. Fulfil them with POST /vault/keys/batch.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
workspace_id
string

Optional filter: only pending keys for links owned by this workspace. Omitted → all pending keys the caller can fulfil.

cursor
string

Cursor from previous response for pagination

limit
integer [ 1 .. 100 ]
Default: 100

Maximum number of items to return

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "cursor": "string"
}

List own workspace key grants

Returns the caller's grants of the workspace key (TMK), one per generation the caller holds. A link carrying tmk_generation is unwrapped with the grant of that generation. active_generation is the workspace key's active generation and is absent while the workspace has no key: an empty list with it means the caller's grants are on their way from a holder, without it that the workspace waits for POST /vault/tmk/init (vault.tmk.init_needed). A caller outside the workspace gets 404, a member whose role does not read its links 403.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
workspace_id
required
string
Example: workspace_id=ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of the workspace whose key the call is about

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "active_generation": 1
}

Issue workspace key grants to a member

Writes one member's grants of the workspace key — the answer to vault.tmk.grant_needed. The grants cover every live generation the member lacks that the caller holds, and may repeat ones the member holds; a grant already stored is kept as it is. Generations the caller does not hold wait for their holders. The recipient must be a member reading the workspace's links whose identity key is still identity_public_key, and gets vault.tmk.grant_issued.

A member whose key has no attestation yet needs one in attestation, made by the caller for the key it wraps to, under a live generation the caller holds; it is stored and the workspace gets vault.tmk.member_verified. A member who already holds every generation is attested the same way, with grants that only repeat. A member attested under a generation the caller holds keeps the stored attestation and the one sent is ignored; one attested under a generation the caller does not hold needs the caller's own, which replaces it. The server does not check the MAC, only its length and generation; the attestation records which key the team wrapped to, not a person's check of it.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
workspace_id
required
string
Example: workspace_id=ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of the workspace whose key the call is about

Request Body schema: application/json
required
user_id
required
string

Public ID of the member receiving the grants

identity_public_key
required
string <byte>

The member's identity public key the grants were wrapped to (base64)

required
Array of objects (VaultTmkGrant) non-empty
object (VaultTmkAttestation)

A holder's vouch for a member's identity key: HMAC-SHA256 over UTF-8(workspace_id) || 0x00 || UTF-8(user_id) || 0x00 || identity_public_key under HKDF-SHA256(TMK_generation, salt '', info 'vault:attest-v1'). Only a holder of that generation can make or check it; the server stores it as sent.

Responses

Request samples

Content type
application/json
{
  • "user_id": "usr_a1b2c3d4e5f6g7h8i9j0",
  • "identity_public_key": "string",
  • "grants": [
    ],
  • "attestation": {
    }
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Drop own workspace key grants

Deletes the caller's grants of the workspace key, for a grant the caller cannot unwrap. The holders are then asked again with vault.tmk.grant_needed, as on joining. A caller outside the workspace gets 404, a member whose role does not read its links 403.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
workspace_id
required
string
Example: workspace_id=ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of the workspace whose key the call is about

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Initialize the workspace key

Creates generation 1 of the workspace key with one grant, the caller's own, carrying the caller's attestation of their own key. An admin with a vault calls it on vault.tmk.init_needed; when two race, the second gets 409 tmk_already_initialized and its grants come from the first. Every other member that reads the workspace's links and has an identity key is then pending, as on joining, and the caller gets vault.tmk.grant_needed for each. Emits vault.tmk.initialized on the workspace topic.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
workspace_id
required
string
Example: workspace_id=ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of the workspace whose key the call is about

Request Body schema: application/json
required
required
Array of objects (VaultTmkMemberGrant) non-empty

Responses

Request samples

Content type
application/json
{
  • "grants": [
    ]
}

Response samples

Content type
application/json
{
  • "generation": 1
}

Rotate the workspace key

Creates the next generation of the workspace key — the answer to vault.tmk.rotation_needed, though an admin may rotate at any time. The caller must hold the active generation, unless nobody holds it any more. The grants go to members whose key is already attested, plus the caller, each with the attestation re-made under the new generation in attestation_mac; the stored attestations are replaced by these. Every other member that reads the workspace's links and has an identity key is then pending, as on joining. New links go under the new generation; older generations stay readable to the members who hold them. Settles the rotation owed and emits vault.tmk.rotated. When two admins rotate at once one wins and the other gets tmk_stale_generation.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
workspace_id
required
string
Example: workspace_id=ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of the workspace whose key the call is about

Request Body schema: application/json
required
new_generation
required
integer >= 2

The active generation plus one

required
Array of objects (VaultTmkMemberGrant) non-empty

Responses

Request samples

Content type
application/json
{
  • "new_generation": 3,
  • "grants": [
    ]
}

Response samples

Content type
application/json
{
  • "generation": 1
}

List members waiting for workspace key grants

Lists the members that read the workspace's links and have an identity key but lack grants for some live generations — the catch-up companion to vault.tmk.grant_needed, for a holder that was offline. Answer each with POST /vault/tmk/grants. Each item carries the member's stored attestation, absent while the key is unverified. A caller outside the workspace gets 404, a member whose role does not read its links 403.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
workspace_id
required
string
Example: workspace_id=ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of the workspace whose key the call is about

cursor
string

Cursor from the previous response

limit
integer [ 1 .. 100 ]

Maximum number of members to return; 100 when omitted

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "cursor": "string"
}

Create claim token for anonymous sharing

Attaches a claim to a link, so that whoever holds the raw claim token can unwrap the link's share key. The client generates the claim token locally, derives an encryption key from it with HKDF, encrypts the share key with that, and sends only claim_token_hash and encrypted_share_key; the server never sees the raw token.

An agent session is enough — no user login is required. The server checks that url_token exists and caps expires_at at 30 days.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
url_token
required
string

URL token of the link to attach the claim to

claim_token_hash
required
string <byte> [ 1 .. 64 ] characters

SHA256(claim_token), base64-encoded — the server stores only the hash

encrypted_share_key
required
string <byte> [ 1 .. 1024 ] characters

Share key encrypted with the AES key derived from HKDF(claim_token), base64

expires_at
string <date-time>

Requested expiry. Capped at 30 days from now; absent means the cap.

Responses

Request samples

Content type
application/json
{
  • "url_token": "k7mstq3w",
  • "claim_token_hash": "string",
  • "encrypted_share_key": "string",
  • "expires_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "expires_at": "2019-08-24T14:15:22Z"
}

Get share by claim token hash

Returns the claim's encrypted share key. The client sends SHA256 of its raw claim token as the path parameter and decrypts the returned key locally with HKDF(claim_token); the server only ever sees the hash. An agent session is enough — no user login is required. An expired or unknown claim answers 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
claim_token_hash
required
string [ 1 .. 64 ] characters

SHA256(claim_token), base64url-encoded (the server base64url-decodes it)

Responses

Response samples

Content type
application/json
{
  • "url_token": "string",
  • "encrypted_share_key": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "expires_at": "2019-08-24T14:15:22Z"
}

Bind anonymous claim to logged-in user

Turns an anonymous claim into a permanent grant for the calling user: the client re-encrypts the share key under its own identity public key, and the server writes the read grant and the key-store row together. Requires a login session and an initialized vault.

The claim is spent by the call — only an unclaimed, unexpired claim can be bound, and one already bound answers 409 claim_already_exists.

Authorizations:
AccessTokenAuthSessionCookieAuth
path Parameters
claim_token_hash
required
string [ 1 .. 64 ] characters

SHA256(claim_token), base64url-encoded (the server base64url-decodes it)

Request Body schema: application/json
required
encrypted_share_key
required
string <byte> <= 1024 characters

Share key re-encrypted under the user's identity public key (base64)

Responses

Request samples

Content type
application/json
{
  • "encrypted_share_key": "string"
}

Response samples

Content type
application/json
{
  • "url_token": "string",
  • "status": "claimed"
}

Create a link

Creates an ephemeral link with the datasources it asks for: p2p_storage for direct WebRTC transfer between agents, cloud_storage for object storage reached through per-file presigned URLs.

A registered caller passes workspace_id, which decides the storage pool, billing and admin controls; an anonymous agent omits it and owns the link on the Anonymous tier.

validity is the lifetime in seconds, 0 meaning no expiry; on a cloud link it is clamped to the owner tier's retention, which an omitted validity takes. 206 means a requested datasource was not provisioned.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
workspace_id
string

Public ID of the workspace that owns the link: its storage pool, billing, ACL-targetable members and admin controls. An anonymous agent omits it and owns the link itself.

description
string <= 1024 characters

Share description

type
string <= 64 characters

Client-defined kind of the link (nearby, live, gmail, gdrive, ...), fixed at creation. The server stores it as an opaque label; clients decide how each kind is listed. Omitted, the link has no kind.

validity
integer >= 0

Link validity in seconds; 0 means the link never expires. Capped at the owner tier's retention maximum; absent, the link gets that maximum.

cloud_storage
boolean
Default: false

Provision cloud storage for the link

p2p_storage
boolean
Default: true

Allow direct P2P transfer for the link

instance_id
string^[-a-zA-Z0-9_]{1,64}$

Runtime instance that serves this link's P2P bytes, as registered with POST /auth/agents. P2P availability then follows that instance rather than the whole agent. Requires p2p_storage: true.

public
boolean
Default: true

Let anyone holding the link download from it

provider
string

Cloud provider alias

estimated_bytes
integer <int64> >= 0

Declared total upload size in bytes for the link, shown to clients as Link.size.estimated_bytes. Not checked against the storage cap.

encrypted_metadata
string <byte> <= 65536 characters

Opaque base64 blob encrypted by the client with the link share key. Stored as-is and never interpreted by the server.

encrypted_share_key
string <byte> <= 1024 characters

The link's share key wrapped with the owner's identity public key, base64; it comes back on GET /links/{url_token}. Optional — the owner may deliver its own key later with POST /vault/keys/batch.

Array of objects (LinkAclGrantRequest) <= 100 items

ACL entries the link is born with, applied in the same transaction as the link exactly as PUT /links/{url_token}/acl would: people and agents with their wrapped keys, the link's own workspace with the key wrapped under the workspace key. A refused entry refuses the whole create with that entry's status. A subject may appear once.

download_limit
integer <int64> >= 1

Ceiling on download sessions for the link; 1 makes it single-use. Paid tiers only: a Free or Anonymous owner answers 402 link_options_upgrade_required.

notify_on_open
boolean

Email the owner about openings: the first on its own, the rest in the owner's digest. Off unless sent. Paid tiers only: a Free or Anonymous owner answers 402 link_options_upgrade_required.

notify_on_download
boolean

Put the files downloaded and their bytes into the owner's mails about this link; on its own it still feeds the digest. Off unless sent. Paid tiers only, the same 402.

Responses

Request samples

Content type
application/json
{
  • "workspace_id": "ws_abc123",
  • "description": "string",
  • "type": "nearby",
  • "validity": 3600,
  • "cloud_storage": false,
  • "p2p_storage": true,
  • "instance_id": "tab-9f2c4b1a",
  • "public": true,
  • "provider": "wasabi",
  • "estimated_bytes": 104857600,
  • "encrypted_metadata": "string",
  • "encrypted_share_key": "string",
  • "acl": [
    ],
  • "download_limit": 1,
  • "notify_on_open": true,
  • "notify_on_download": true
}

Response samples

Content type
application/json
{
  • "url_token": "oth5mu1D",
  • "url": "/oth5mu1D/",
  • "retention_clamped": true,
  • "requested_retention_sec": 0,
  • "max_allowed_retention_sec": 0
}

Get link details

Returns the link's metadata, its datasources and the caller's effective_permissions. Requires link:read, held through ownership or an ACL grant. The write token is returned to the link owner only.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string
Example: oth5mu1D

Link URL token

query Parameters
claim_token_hash
string [ 1 .. 64 ] characters

SHA256 of a claim token, base64url-encoded; the server never sees the raw token.

When the claim refers to this link, encrypted_share_key comes from the claim, wrapped with HKDF(claim_token) rather than the caller's identity public key, which saves a call to GET /vault/claims/{claim_token_hash}. It grants no access: a caller without link:read still gets 403 or 404.

A claim that is unknown, expired or refers to another link is ignored, and encrypted_share_key falls back to the caller's own grant or is absent.

Responses

Response samples

Content type
application/json
{
  • "url_token": "oth5mu1D",
  • "url": "/oth5mu1D/",
  • "description": "string",
  • "type": "nearby",
  • "encrypted_metadata": "string",
  • "encrypted_share_key": "string",
  • "tmk_generation": 1,
  • "tmk_encrypted_share_key": "string",
  • "user": {
    },
  • "agent": {
    },
  • "workspace_id": "ws_a1b2c3d4e5f6g7h8",
  • "effective_permissions": [
    ],
  • "created_at": "2024-01-15T10:30:00Z",
  • "invalidate_at": "2024-01-16T10:30:00Z",
  • "deleted_at": "2024-01-17T10:30:00Z",
  • "size": {
    },
  • "download_count": 42,
  • "download_limit": 1,
  • "notify_on_open": true,
  • "notify_on_download": true,
  • "cloud": true,
  • "p2p": false
}

Update link settings

Updates the link's description, encrypted metadata, validity, declared size or datasources. Requires link:manage.

Datasource flags are additive: cloud_storage: true adds a cloud datasource when the link has none, and no datasource is ever removed. Setting validity restarts the lifetime from now.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
description
string <= 1024 characters
encrypted_metadata
string <byte> <= 65536 characters

Opaque base64 blob encrypted by the client with the link share key. Stored as-is and never interpreted by the server.

validity
integer >= 0

Link validity in seconds from now; 0 means the link never expires. Capped at the link's created_at plus the owner tier's retention maximum, so a patch cannot extend a link past the window it was born with.

cloud_storage
boolean
p2p_storage
boolean
provider
string
estimated_bytes
integer <int64> >= 0

Re-declared total upload size in bytes, shown to clients as size.estimated_bytes. Not checked against the storage cap.

download_limit
integer <int64> >= 0

Ceiling on download sessions; 0 removes the limit. Setting a limit needs a paid tier on the owner, else 402 link_options_upgrade_required; removing one never does. A limit at or under download_count closes the link to new downloads at once.

notify_on_open
boolean

Email the owner about openings: the first on its own, the rest in the owner's digest. Turning it on needs a paid tier on the owner, else 402 link_options_upgrade_required; turning it off never does.

notify_on_download
boolean

Put the files downloaded and their bytes into the owner's mails about this link; on its own it still feeds the digest. Turning it on needs the paid tier the same way.

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "encrypted_metadata": "string",
  • "validity": 0,
  • "cloud_storage": true,
  • "p2p_storage": true,
  • "provider": "string",
  • "estimated_bytes": 104857600,
  • "download_limit": 1,
  • "notify_on_open": true,
  • "notify_on_download": true
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Delete a link

Removes the link and its datasources. Requires link:manage. Cloud storage under the link's prefix is cleaned up afterwards, and the link can be brought back with POST /links/{url_token}/restore while it is still inside its undo window.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Restore a deleted link

Reverses a delete while the link is still inside its undo window: the link comes back with the bytes it still holds, reappears in the owner's list and is announced again as link.created. Bytes already purged are not restored. Requires link:manage, the same permission as the delete it undoes.

A caller who may not manage the link, an unknown token, a link that was never deleted and one whose bytes are already gone all answer 404 link_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Report a link for abuse

Files an abuse report on a link from anyone holding its token; no session is required. A signed-in reporter is identified by their account, an anonymous one by their IP.

Attachments are evidence the reporter chose to show from content already decrypted on their side. link_key is the reporter's explicit permission to open the link's content for this report and only ever arrives in that field: the fragment of url is stripped before storage.

A repeat report by the same reporter on the same link accumulates into the existing one and answers its id.

Authorizations:
NoneSessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
url
required
string [ 1 .. 2048 ] characters

The share URL the reporter used. Its fragment, which may carry the link key, is stripped before storage.

description
string <= 4000 characters

The reporter's own words about the abuse.

contact_email
string <= 320 characters

Email for follow-up. Deleted together with the report once it is handled.

link_key
string <= 512 characters

The link's share key, attached deliberately as permission to open the content for this report. Useful only on a link with a cloud datasource.

Array of objects <= 4 items

Evidence pieces, at most 4, at most 8 MiB decoded in total.

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "contact_email": "string",
  • "link_key": "string",
  • "attachments": [
    ]
}

Response samples

Content type
application/json
{
  • "report_id": "0198a9e2-5b1a-7c3e-9f00-2a4b6c8d0e1f"
}

List link downloads

Returns the link's downloads, newest first: one entry per download session that opened a file, with the device that took it, when, and the bytes it moved. The list is the owner's figure like download_count: it reaches the owner and a management grant holder, anyone else reads 404. A Free or Anonymous owner answers 402 link_options_upgrade_required; the downloads are recorded all the same and show once the tier is paid.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

offset
integer >= 0
Example: offset=950

Absolute number of items to skip from the start of the list, for page-number UIs: offset = (page - 1) * limit, page count from page_info.total_count. Mutually exclusive with cursor (sending both is validation_failed). Capped by a server-side ceiling (default 10000); deeper requests are validation_failed — narrow with filters instead. Prefer cursor for sequential paging: it is cheaper and stable against concurrent inserts.

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    }
}

List link ACL entries

Returns every ACL entry on the link: who holds which permissions. Entries carry no key material — the caller's own wrapped share key comes from GET /links/{url_token}, and nobody else's is ever returned. Requires link:read.

The ETag response header carries the link's ACL version; pass it as If-Match on linksAclGrant, linksAclRevoke and linksAclSet.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Set the link's whole ACL

Replaces the link's named grants with the list sent, in one transaction. A subject only in the list is granted as linksAclGrant would, with its wrapped key or, for a user without one, a key request to the link's key holders; the link's own workspace as team:<ws> with the key wrapped under the workspace key puts the link under it. A subject whose level differs gets the level sent and keeps its key. A subject missing from the list is revoked as linksAclRevoke would, its wrapped key with it — the own workspace missing takes the link out from under the workspace key. The owner's and creator's access does not come from the ACL and is untouched; an empty list revokes every grant.

The call applies all of it or nothing: any refused item fails the whole request. When anything changed the ACL version moves by one; an identical list changes nothing. Requires link:manage and the link's key without its URL, as for a grant.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

header Parameters
If-Match
string

The link's ACL ETag as last seen by the client. When present and stale the call answers 412 acl_version_mismatch; when absent the change is unconditional.

Request Body schema: application/json
required
required
Array of objects (LinkAclGrantRequest) <= 100 items

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Grant link access

Puts one ACL entry on the link: the subject, its level, and the key it opens the link with. A user or agent subject carries encrypted_share_key wrapped to its identity; the link's own workspace as team:<ws> carries it wrapped under the workspace key with tmk_generation, which is what puts the link under the workspace key for every member; any and user:* carry no key. Requires link:manage and the link's key without its URL.

A new subject answers status: granted, an identical repeat unchanged, a changed level or key updated. If-Match with the ACL ETag answers 412 acl_version_mismatch instead of racing a concurrent change.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

header Parameters
If-Match
string

The link's ACL ETag as last seen by the client. When present and stale the call answers 412 acl_version_mismatch; when absent the change is unconditional.

Request Body schema: application/json
required
subject
required
string (SubjectSelector) <= 128 characters

ACL subject selector — one string naming who a grant addresses:

  • any — anyone, including anonymous callers
  • user:* — any authenticated user
  • user:<id> — one user
  • agent:<id> — one agent
  • team:<ws> — a workspace's members; the link's own workspace means the link is under the workspace key, so the entry carries the key wrapped under it

team:* is rejected; use any for a world grant.

scopes
required
Array of strings (LinkPermission)
Items Enum: "link:read" "link:write" "link:manage"

Access levels to grant. The server stores only the highest level requested. The link's own workspace holds link:read only.

encrypted_share_key
string <byte> <= 1024 characters

The link's share key wrapped for the subject (base64): to a user's or agent's identity public key, or under the workspace key for the link's own workspace, which then requires it. The recipient reads it back from GET /links/{url_token}.

identity_public_key
string <byte> <= 64 characters

The user recipient's identity public key encrypted_share_key was wrapped to (base64). When sent and no longer current, the grant answers 409 identity_key_mismatch.

tmk_generation
integer >= 1

For the link's own workspace only: the active generation of the workspace key encrypted_share_key is wrapped under. Another generation, or a workspace with no key, answers 412 tmk_stale_generation.

Responses

Request samples

Content type
application/json
{
  • "subject": "user:usr_a1b2c3d4e5f6g7h8i9j0",
  • "scopes": [
    ],
  • "encrypted_share_key": "string",
  • "identity_public_key": "string",
  • "tmk_generation": 1
}

Response samples

Content type
application/json
Example
{
  • "status": "granted"
}

Revoke link access

Removes a subject's ACL entry from the link. Requires link:manage. Revoking a user subject also deletes that recipient's wrapped share key; after revoking a workspace subject, member keys that no longer have access are removed by a later sweep.

If-Match with the link's ACL ETag works as on linksAclGrant, answering 412 acl_version_mismatch when stale.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

header Parameters
If-Match
string

The link's ACL ETag as last seen by the client. When present and stale the call answers 412 acl_version_mismatch; when absent the change is unconditional.

Request Body schema: application/json
required
subject
required
string (SubjectSelector) <= 128 characters

ACL subject selector — one string naming who a grant addresses:

  • any — anyone, including anonymous callers
  • user:* — any authenticated user
  • user:<id> — one user
  • agent:<id> — one agent
  • team:<ws> — a workspace's members; the link's own workspace means the link is under the workspace key, so the entry carries the key wrapped under it

team:* is rejected; use any for a world grant.

Responses

Request samples

Content type
application/json
{
  • "subject": "user:usr_a1b2c3d4e5f6g7h8i9j0"
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

Grant access on several links at once

Grants access for a list of (link, subject) pairs: one link to many recipients, one recipient to many links, or any mix. Each item is decided and written exactly as POST /links/{url_token}/acl/grant would with the same body, including the requirement to hold the link's key without its URL.

Items are applied in request order, each in its own transaction, so one item's failure never rolls back another and every granted item moves its link's ACL version (the ETag) by one. A request the server completes answers 200: granted, unchanged and failed count the outcomes, and results holds one entry per item in request order. A failed entry carries the same ErrorResponse the single grant would have answered for that item, so a link the caller cannot reach reads link_not_found. A server fault stops the batch with a 5xx and keeps the items applied before it. Sending the same request again is safe either way: what was granted comes back unchanged.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
required
Array of objects (LinkAclGrantBatchItem) [ 1 .. 100 ] items

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "granted": 1,
  • "unchanged": 0,
  • "failed": 1,
  • "results": [
    ]
}

Start upload transfer session Deprecated

Opens an upload transfer session. The cloud datasource comes back with a presigned PUT URL per file named in the body, or a HEAD URL where the file's method is head.

Each declared size is reserved against the link owner's storage cap until storage holds an object of that size at the path, or until the URLs issued for it expire; re-presigning a path keeps its largest live size. A file without size, or a presign outside an open upload session, reserves nothing but is refused like any other while the owner is past the cap. Sizes that do not fit answer 409 storage_quota_exceeded, also on a link that has a P2P side; sizes in one request past the whole cap answer 403 size_limit_exceeded.

A session idle for 5 minutes is abandoned; later calls answer 404 transfer_not_found, and linksUploadUpdate keeps it alive.

Deprecated: use POST /links/{url_token}/transfer/start with mode: write. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
optional

Files to presign when the session opens; the cloud datasource then carries a PUT URL per file in presigned_files, a HEAD URL where method is head. Omit the body to mint nothing up front and presign on demand instead.

presigned
boolean
Default: false

Ignored — presigned is the only access form the server issues.

Array of objects (TransferFileRequest)

Files to presign up front: a PUT each on upload, a GET each on download, a HEAD where method asks for one. Optional — omit it and mint URLs on demand with /presign, which takes the same shape, method / if_match / if_none_match included.

Responses

Request samples

Content type
application/json
{
  • "presigned": false,
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "datasources": [
    ]
}

Update upload progress Deprecated

Reports upload progress on an open session and keeps it alive: repeating unchanged stats stops an idle session from being abandoned.

Deprecated: use POST /links/{url_token}/transfer/update. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID

object (TransferStats)

Aggregate transfer statistics

Array of objects (TransferDatasourceStat)

Per-datasource transfer statistics

Array of objects (TransferFileStat)

Per-file progress. Only clients using /upload/files and /download/files populate it; a flat client omits it and keeps sending aggregate stats.

object

Additional transfer metadata (client-specific)

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "stats": {
    },
  • "datasources": [
    ],
  • "files": [
    ],
  • "info": { }
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Re-mint presigned upload URLs Deprecated

Mints fresh presigned PUT URLs for the named files on an open upload session, to renew a URL that expired mid-transfer or to add files after the start; a file with method head gets a HEAD URL, which reserves no quota. A path outside the link's prefix — absolute, leading-slash, holding .., a backslash or a control byte, or empty — answers invalid_request.

A file may carry if_match or if_none_match; the matching header then joins the signature and comes back in PresignedFile.headers to be sent verbatim.

Issuance is as on linksUploadStart, and re-presigning a path at the same size is free. Outside an open upload session, or without size, a file reserves nothing, but the request is still refused with 409 storage_quota_exceeded while the owner is past the cap.

Deprecated: use POST /links/{url_token}/transfer/presign. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
required
Array of objects (TransferFileRequest)

Responses

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{}

Begin a multipart upload Deprecated

Starts a multipart upload for one large file and returns its upload_id. Mint part URLs with /multipart/parts, then finish with /multipart/complete or /multipart/abort. The path is validated under the link's prefix, else invalid_request.

Issuance is as on linksUploadStart: the declared size is reserved against the owner's storage cap, and beginning the same path again keeps its largest live size.

Deprecated: use POST /links/{url_token}/transfer/multipart/begin. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix; a path outside it is invalid_request.

size
integer <int64> >= 0

Declared total stored size, reserved against the owner's storage cap like a single-shot presign. /multipart/complete re-checks the parts and may answer 409 storage_quota_exceeded.

Responses

Request samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "size": 5368709120
}

Response samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "upload_id": "2~aBc123EXAMPLEuploadId"
}

Mint presigned UploadPart URLs Deprecated

Mints presigned UploadPart URLs for the named part numbers of an open multipart upload. Callable repeatedly: for the first batch, to add parts when the count was not known up front, or to renew a part URL that expired. An unknown upload_id answers multipart_upload_not_found.

Deprecated: use POST /links/{url_token}/transfer/multipart/parts. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string
upload_id
required
string

The upload id from /multipart/begin.

part_numbers
required
Array of integers

1-based part indices to presign (1..10000).

Responses

Request samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "upload_id": "2~aBc123EXAMPLEuploadId",
  • "part_numbers": [
    ]
}

Response samples

Content type
application/json

List uploaded parts of a multipart upload Deprecated

Lists the parts already stored for one open multipart upload, so a resuming client can skip them and complete with their ETags. An unknown upload_id answers multipart_upload_not_found.

Deprecated: use POST /links/{url_token}/transfer/multipart/list-parts. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string
upload_id
required
string

The upload id from /multipart/begin.

Responses

Request samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "upload_id": "2~aBc123EXAMPLEuploadId"
}

Response samples

Content type
application/json
{
  • "parts": [
    ]
}

List in-progress multipart uploads Deprecated

Lists the multipart uploads in progress under the link's prefix, for a client that lost its upload_id: pick an entry, then call /multipart/list-parts to see what it already holds. Unlike list-parts, which covers one upload, this covers the whole link.

Deprecated: use POST /links/{url_token}/transfer/multipart/list-uploads. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Responses

Response samples

Content type
application/json
{
  • "uploads": [
    ]
}

Complete a multipart upload Deprecated

Completes a multipart upload from the (part_number, etag) list the client collected while putting each part. An upload_id that is unknown, already completed or aborted answers multipart_upload_not_found.

Deprecated: use POST /links/{url_token}/transfer/multipart/complete. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix (the one the parts were uploaded under).

upload_id
required
string

The upload id from /multipart/begin.

required
Array of objects (MultipartCompletedPart)

Responses

Request samples

Content type
application/json
{
  • "path": "docs/report.pdf",
  • "upload_id": "2~aBc123EXAMPLEuploadId",
  • "parts": [
    ]
}

Response samples

Content type
application/json
{
  • "etag": "\"d41d8cd98f00b204e9800998ecf8427e-3\""
}

Abort a multipart upload Deprecated

Aborts a multipart upload and drops its staged parts. An upload_id that is unknown, already completed or aborted answers multipart_upload_not_found, as on the other multipart calls.

Deprecated: use POST /links/{url_token}/transfer/multipart/abort. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix.

upload_id
required
string

The upload id from /multipart/begin.

Responses

Request samples

Content type
application/json
{
  • "path": "docs/report.pdf",
  • "upload_id": "2~aBc123EXAMPLEuploadId"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Delete an object under the link prefix Deprecated

Deletes one object under the link's prefix. Presigned access carries no client-signed delete, so removal goes through this call. Idempotent: deleting a missing key is a no-op. The path is validated under the link's prefix, else invalid_request.

Deprecated: use POST /links/{url_token}/transfer/delete. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix.

Responses

Request samples

Content type
application/json
{
  • "path": "docs/report.pdf"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

List objects under the link prefix

Lists the objects stored under the link's prefix, one page per call. The listing is flat and recursive — every object under prefix is returned and the client groups them into directories itself. Follow next_cursor to page to the end, or pass start_after to begin from a known key. Each object carries its ETag and last-modified time.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
prefix
string

Path prefix to list, relative to the link prefix. Omit or leave empty to list the whole link.

cursor
string

Opaque continuation token from a prior response's next_cursor; omit for the first page.

start_after
string

Return only objects whose key, relative to the link prefix, sorts after this one (exclusive). Applies to the first page only; later pages follow cursor.

Responses

Request samples

Content type
application/json
{
  • "prefix": "docs/",
  • "cursor": "string",
  • "start_after": "wal/wal-000000001234"
}

Response samples

Content type
application/json
{
  • "objects": [
    ],
  • "next_cursor": "string"
}

Open a file-transfer in an upload session Deprecated

Opens a file-transfer inside an open upload session, giving the link owner per-file visibility. A client that does not need it can use /upload/start, /upload/update and /upload/end alone.

The caller must own the parent session; another actor's session answers 404 rather than 403. An Idempotency-Key header makes a retry safe: the same key returns the same file_transfer_id. At most 128 file-transfers may be open in one session.

Deprecated: use POST /links/{url_token}/transfer/files with direction: write. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
required
transfer_id
required
string

Parent transfer session ID returned by POST /transfer/start.

encrypted_metadata
required
string <byte> <= 8192 characters

Opaque base64 blob encrypted with the link's share key; the server never reads inside it. Typically {path, estimated_bytes, ...}. Max 8 KiB after decoding.

estimated_bytes
integer <int64>

Plaintext size hint. When present, /transfer/files/{id}/end refuses stats.bytes past it plus the overage allowance with 403 size_limit_exceeded.

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "encrypted_metadata": "eyJwYXRoIjoicGhvdG9zL2ltZ18wMDEuanBnIn0=",
  • "estimated_bytes": 0
}

Response samples

Content type
application/json
{
  • "file_transfer_id": "trf_9K2pR4sEXAMPLE1234567890abcdef01"
}

Close a file-transfer in an upload session Deprecated

Closes a file-transfer. Idempotent: a second call for the same file_transfer_id answers 204 and publishes nothing. The caller must own the parent session; a file-transfer that does not exist, belongs to another session or to another actor answers 404.

When the file was opened with estimated_bytes, stats.bytes over that plus an allowance of 10 % or 512 KiB, whichever is larger, answers 403 size_limit_exceeded; the file stays open and the client must abort it.

Deprecated: use POST /links/{url_token}/transfer/files/{file_transfer_id}/end. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

file_transfer_id
required
string

File-transfer ID returned by POST /links/{url_token}/upload/files.

Request Body schema: application/json
required
success
required
boolean

Whether the file transfer completed successfully.

error
string <= 500 characters

Error message if failed. The exact value cancelled marks a user cancellation: the file closes with close_reason: aborted and is not counted as a failure.

object (TransferStats)

Aggregate transfer statistics

Responses

Request samples

Content type
application/json
{
  • "success": true,
  • "error": "string",
  • "stats": {
    }
}

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

End upload transfer session Deprecated

Ends an upload transfer session. On success: true the stored total in size.actual is reconciled from storage rather than taken from the reported stats, and repeating the call with identical stats changes nothing.

On success: false the client first aborts any multipart upload still in progress. Call this endpoint even when the abort follows a server error. After a size_limit_exceeded the client stops transferring, aborts its multipart uploads and then ends the session with success: false.

Deprecated: use POST /links/{url_token}/transfer/end. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID

success
required
boolean

Whether transfer completed successfully

error
string <= 500 characters

Error message if failed

object (TransferStats)

Aggregate transfer statistics

Array of objects (TransferDatasourceStat)

Per-datasource transfer statistics

object

Additional transfer metadata (client-specific)

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "success": true,
  • "error": "string",
  • "stats": {
    },
  • "datasources": [
    ],
  • "info": { }
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Abort upload transfer session Deprecated

Cancels an upload session in progress. It differs from /upload/end with success: false in intent: abort records a deliberate cancellation, with the supplied reason, as link.transfer_aborted. That frame reaches the link owner and the aborting agent only, never the link topic.

Any file-transfers still open are closed, each with its own link.transfer_completed, and the storage the session reserved is released once the URLs issued for it expire.

The caller may abort only their own open session: another actor's session, an unknown transfer id and a repeat abort all answer 404 transfer_not_found.

Deprecated: use POST /links/{url_token}/transfer/abort. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID returned by POST /transfer/start.

reason
string <= 200 characters

Free-form reason, carried in the link.transfer_aborted event. Optional — a system abort omits it.

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "reason": "user cancelled from UI"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Start download transfer session Deprecated

Opens a download transfer session and returns its transfer id and datasources; the cloud datasource carries a presigned GET URL per file named in the body (HEAD where the file's method is head), and linksDownloadPresign mints more or renews an expired one. Requires link:read.

A session idle for 5 minutes is abandoned (link.transfer_completed with close_reason=abandoned) and later calls answer 404 transfer_not_found. A client that holds a session open while only browsing keeps it alive with linksDownloadUpdate.

Deprecated: use POST /links/{url_token}/transfer/start with mode: read. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
optional

Files to presign when the session opens; the cloud datasource then carries a GET URL per file in presigned_files, a HEAD URL where method is head. Omit the body to mint nothing up front and presign on demand instead.

presigned
boolean
Default: false

Ignored — presigned is the only access form the server issues.

Array of objects (TransferFileRequest)

Files to presign up front: a PUT each on upload, a GET each on download, a HEAD where method asks for one. Optional — omit it and mint URLs on demand with /presign, which takes the same shape, method / if_match / if_none_match included.

Responses

Request samples

Content type
application/json
{
  • "presigned": false,
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "datasources": [
    ]
}

Update download progress Deprecated

Reports download progress on an open session and keeps it alive: a client browsing a share without transferring repeats unchanged stats so the session is not abandoned.

Reported bytes are not held against the link's estimated_bytes, which is the uploader's declaration and may lag what the datasources now hold.

Deprecated: use POST /links/{url_token}/transfer/update. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID

object (TransferStats)

Aggregate transfer statistics

Array of objects (TransferDatasourceStat)

Per-datasource transfer statistics

Array of objects (TransferFileStat)

Per-file progress. Only clients using /upload/files and /download/files populate it; a flat client omits it and keeps sending aggregate stats.

object

Additional transfer metadata (client-specific)

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "stats": {
    },
  • "datasources": [
    ],
  • "files": [
    ],
  • "info": { }
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Re-mint presigned download URLs Deprecated

Mints fresh presigned GET URLs for the named files on an open download session, to renew a URL that expired mid-transfer; a file with method head gets a HEAD URL, which the download cap does not hold. Paths are validated under the link's prefix; an absolute path, a leading slash, a .. segment, a backslash, a control byte or an empty path answers invalid_request, as does if_match on a GET or if_none_match on any download presign.

Deprecated: use POST /links/{url_token}/transfer/presign. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
required
Array of objects (TransferFileRequest)

Responses

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{}

Open a file-transfer in a download session Deprecated

Opens a file-transfer inside an open download session, giving the link owner per-file visibility. The first file-transfer of a session is the download itself: it moves the link's download_count, and it is where the download cap of the owner's tier or the owner's download_limit refuses with 409 link_download_limit_exceeded — a session that only browses is never counted or refused.

The caller must own the parent session; another actor's session answers 404 rather than 403. An Idempotency-Key header makes a retry safe: the same key returns the same file_transfer_id. At most 128 file-transfers may be open in one session.

Deprecated: use POST /links/{url_token}/transfer/files with direction: read. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
required
transfer_id
required
string

Parent transfer session ID returned by POST /transfer/start.

encrypted_metadata
required
string <byte> <= 8192 characters

Opaque base64 blob encrypted with the link's share key; the server never reads inside it. Typically {path, estimated_bytes, ...}. Max 8 KiB after decoding.

estimated_bytes
integer <int64>

Plaintext size hint. When present, /transfer/files/{id}/end refuses stats.bytes past it plus the overage allowance with 403 size_limit_exceeded.

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "encrypted_metadata": "eyJwYXRoIjoicGhvdG9zL2ltZ18wMDEuanBnIn0=",
  • "estimated_bytes": 0
}

Response samples

Content type
application/json
{
  • "file_transfer_id": "trf_9K2pR4sEXAMPLE1234567890abcdef01"
}

Close a file-transfer in a download session Deprecated

Closes a file-transfer. Idempotent: a second call for the same file_transfer_id answers 204 and publishes nothing. The caller must own the parent session; a file-transfer that does not exist, belongs to another session or to another actor answers 404.

Reported bytes are not held against the file's estimated_bytes, which is metadata and may lag the file's real size.

Deprecated: use POST /links/{url_token}/transfer/files/{file_transfer_id}/end. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

file_transfer_id
required
string

File-transfer ID returned by POST /links/{url_token}/download/files.

Request Body schema: application/json
required
success
required
boolean

Whether the file transfer completed successfully.

error
string <= 500 characters

Error message if failed. The exact value cancelled marks a user cancellation: the file closes with close_reason: aborted and is not counted as a failure.

object (TransferStats)

Aggregate transfer statistics

Responses

Request samples

Content type
application/json
{
  • "success": true,
  • "error": "string",
  • "stats": {
    }
}

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

End download transfer session Deprecated

Ends a download transfer session.

Deprecated: use POST /links/{url_token}/transfer/end. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID

success
required
boolean

Whether transfer completed successfully

error
string <= 500 characters

Error message if failed

object (TransferStats)

Aggregate transfer statistics

Array of objects (TransferDatasourceStat)

Per-datasource transfer statistics

object

Additional transfer metadata (client-specific)

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "success": true,
  • "error": "string",
  • "stats": {
    },
  • "datasources": [
    ],
  • "info": { }
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Abort download transfer session Deprecated

Cancels a download session in progress, the call behind a UI cancel button and the mirror of /upload/abort. Any caller holding link:read may abort their own download session; a downloader need not own the link, and a download reserves no storage.

Deprecated: use POST /links/{url_token}/transfer/abort. This path goes away once the clients have moved.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID returned by POST /transfer/start.

reason
string <= 200 characters

Free-form reason, carried in the link.transfer_aborted event. Optional — a system abort omits it.

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "reason": "user cancelled from UI"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Start a transfer session

Opens a transfer session in the mode the body names and returns its transfer id and datasources; the cloud datasource carries a presigned URL per file named in the body (PUT for a file moving in, GET for one moving out, HEAD where method is head), and /transfer/presign mints more or renews an expired one. read requires link:read, write and readwrite require link:write.

A file moving in reserves its declared size against the link owner's storage cap until storage holds an object of that size at the path, or until the URLs issued for it expire; re-presigning a path keeps its largest live size. A file without size reserves nothing but is refused like any other while the owner is past the cap. Sizes that do not fit answer 409 storage_quota_exceeded, also on a link that has a P2P side; sizes in one request past the whole cap answer 403 size_limit_exceeded. A file moving out reserves nothing.

A session idle for 5 minutes is abandoned (link.transfer_completed with close_reason=abandoned) and later calls answer 404 transfer_not_found; /transfer/update keeps it alive.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
mode
required
string
Enum: "read" "write" "readwrite"

Session mode. read signs GET URLs, write PUT; in readwrite every file named here and on /transfer/presign must carry method, since no direction is implied.

Array of objects (TransferFileRequest)

Files to presign up front, one URL each, the verb from method or from the mode when method is absent. Optional — omit it and mint URLs on demand with /transfer/presign.

Responses

Request samples

Content type
application/json
{
  • "mode": "readwrite",
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "datasources": [
    ]
}

Update transfer progress

Reports progress on an open session and keeps it alive: repeating unchanged stats stops an idle session from being abandoned. A readwrite session reports bytes_written and bytes_read beside the total, in stats and per datasource.

Reported bytes are not held against the link's estimated_bytes, which is the uploader's declaration and may lag what the datasources now hold.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID

object (TransferStats)

Aggregate transfer statistics

Array of objects (TransferDatasourceStat)

Per-datasource transfer statistics

Array of objects (TransferFileStat)

Per-file progress. Only clients using /upload/files and /download/files populate it; a flat client omits it and keeps sending aggregate stats.

object

Additional transfer metadata (client-specific)

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "stats": {
    },
  • "datasources": [
    ],
  • "files": [
    ],
  • "info": { }
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Re-mint presigned URLs on a transfer session

Mints fresh presigned URLs for the named files, to renew a URL that expired mid-transfer or to add files after the start. mode in the body is the caller's session mode and picks the cap the request rides: read requires link:read, write and readwrite require link:write. A file's method picks the verb: put for a file moving in, get for one moving out, head to read an object's ETag and size without its bytes. In readwrite method is required; in read it defaults to get and put is invalid_request; in write it defaults to put and get is invalid_request. Paths are validated as TransferFileRequest.path defines.

A PUT reserves its declared size against the link owner's storage cap until storage holds an object of that size at the path, or until the URLs issued for it expire; re-presigning a path at the same size is free, a larger size keeps the largest live one. A file without size, or a presign outside an open session, reserves nothing but is refused like any other while the owner is past the cap. A GET in read mode is refused with 409 link_download_limit_exceeded once the link has reached its cap and the caller has no read session in flight to finish; readwrite is never held to the download cap.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
mode
required
string
Enum: "read" "write" "readwrite"
required
Array of objects (TransferFileRequest)

Responses

Request samples

Content type
application/json
{
  • "mode": "readwrite",
  • "files": [
    ]
}

Response samples

Content type
application/json
{}

Open a file-transfer in a transfer session

Opens a file-transfer inside an open session, giving the link owner per-file visibility. The file names its own direction; in a read or write session it must match the mode. A client that does not need per-file visibility can use /transfer/start, /transfer/update and /transfer/end alone.

In a read session the first file-transfer is the download itself: it moves the link's download_count, and it is where the download cap of the owner's tier or the owner's download_limit refuses with 409 link_download_limit_exceeded — a session that only browses is never counted or refused. A readwrite session is a working session, not a download: it is never counted, never refused by the cap, and sends no notify_on_open or notify_on_download mail.

The caller must own the parent session; another actor's session answers 404 rather than 403. An Idempotency-Key header makes a retry safe: the same key returns the same file_transfer_id. At most 128 file-transfers may be open in one session.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
required
transfer_id
required
string

Parent transfer session ID returned by POST /transfer/start.

encrypted_metadata
required
string <byte> <= 8192 characters

Opaque base64 blob encrypted with the link's share key; the server never reads inside it. Typically {path, estimated_bytes, ...}. Max 8 KiB after decoding.

estimated_bytes
integer <int64>

Plaintext size hint. When present, /transfer/files/{id}/end refuses stats.bytes past it plus the overage allowance with 403 size_limit_exceeded.

direction
required
string
Enum: "read" "write"

Which way this file's bytes move: read out of the link, write into it.

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "encrypted_metadata": "eyJwYXRoIjoicGhvdG9zL2ltZ18wMDEuanBnIn0=",
  • "estimated_bytes": 0,
  • "direction": "read"
}

Response samples

Content type
application/json
{
  • "file_transfer_id": "trf_9K2pR4sEXAMPLE1234567890abcdef01"
}

Close a file-transfer in a transfer session

Closes a file-transfer. Idempotent: a second call for the same file_transfer_id answers 204 and publishes nothing. The caller must own the parent session; a file-transfer that does not exist, belongs to another session or to another actor answers 404.

For a file moving in that was opened with estimated_bytes, stats.bytes over that plus an allowance of 10 % or 512 KiB, whichever is larger, answers 403 size_limit_exceeded; the file stays open and the client must abort it. For a file moving out the reported bytes are not held against estimated_bytes.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

file_transfer_id
required
string

File-transfer ID returned by POST /links/{url_token}/transfer/files.

Request Body schema: application/json
required
success
required
boolean

Whether the file transfer completed successfully.

error
string <= 500 characters

Error message if failed. The exact value cancelled marks a user cancellation: the file closes with close_reason: aborted and is not counted as a failure.

object (TransferStats)

Aggregate transfer statistics

Responses

Request samples

Content type
application/json
{
  • "success": true,
  • "error": "string",
  • "stats": {
    }
}

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "status": "workspace_not_found",
  • "error": "name is required",
  • "details": {
    }
}

End a transfer session

Ends a transfer session. On success: true in a write or readwrite session the stored total in size.actual is reconciled from storage rather than taken from the reported stats, and repeating the call with identical stats changes nothing.

On success: false the client first aborts any multipart upload still in progress. Call this endpoint even when the abort follows a server error. After a size_limit_exceeded the client stops transferring, aborts its multipart uploads and then ends the session with success: false.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID

success
required
boolean

Whether transfer completed successfully

error
string <= 500 characters

Error message if failed

object (TransferStats)

Aggregate transfer statistics

Array of objects (TransferDatasourceStat)

Per-datasource transfer statistics

object

Additional transfer metadata (client-specific)

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "success": true,
  • "error": "string",
  • "stats": {
    },
  • "datasources": [
    ],
  • "info": { }
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Abort a transfer session

Cancels a session in progress. It differs from /transfer/end with success: false in intent: abort records a deliberate cancellation, with the supplied reason, as link.transfer_aborted. That frame reaches the link owner and the aborting agent only, never the link topic.

Any file-transfers still open are closed, each with its own link.transfer_completed, and the storage the session reserved is released once the URLs issued for it expire.

The caller may abort only their own open session: another actor's session, an unknown transfer id and a repeat abort all answer 404 transfer_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
transfer_id
required
string

Transfer session ID returned by POST /transfer/start.

reason
string <= 200 characters

Free-form reason, carried in the link.transfer_aborted event. Optional — a system abort omits it.

Responses

Request samples

Content type
application/json
{
  • "transfer_id": "tr_4Fz4sL4iEXAMPLE",
  • "reason": "user cancelled from UI"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Begin a multipart upload

Starts a multipart upload for one large file and returns its upload_id. Mint part URLs with /transfer/multipart/parts, then finish with /transfer/multipart/complete or /transfer/multipart/abort. The path is validated under the link's prefix, else invalid_request.

Issuance is as on /transfer/start for a file moving in: the declared size is reserved against the owner's storage cap, and beginning the same path again keeps its largest live size.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix; a path outside it is invalid_request.

size
integer <int64> >= 0

Declared total stored size, reserved against the owner's storage cap like a single-shot presign. /multipart/complete re-checks the parts and may answer 409 storage_quota_exceeded.

Responses

Request samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "size": 5368709120
}

Response samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "upload_id": "2~aBc123EXAMPLEuploadId"
}

Mint presigned UploadPart URLs

Mints presigned UploadPart URLs for the named part numbers of an open multipart upload. Callable repeatedly: for the first batch, to add parts when the count was not known up front, or to renew a part URL that expired. An unknown upload_id answers multipart_upload_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string
upload_id
required
string

The upload id from /multipart/begin.

part_numbers
required
Array of integers

1-based part indices to presign (1..10000).

Responses

Request samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "upload_id": "2~aBc123EXAMPLEuploadId",
  • "part_numbers": [
    ]
}

Response samples

Content type
application/json

List uploaded parts of a multipart upload

Lists the parts already stored for one open multipart upload, so a resuming client can skip them and complete with their ETags. An unknown upload_id answers multipart_upload_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string
upload_id
required
string

The upload id from /multipart/begin.

Responses

Request samples

Content type
application/json
{
  • "path": "large/video.mp4",
  • "upload_id": "2~aBc123EXAMPLEuploadId"
}

Response samples

Content type
application/json
{
  • "parts": [
    ]
}

List in-progress multipart uploads

Lists the multipart uploads in progress under the link's prefix, for a client that lost its upload_id: pick an entry, then call /transfer/multipart/list-parts to see what it already holds. Unlike list-parts, which covers one upload, this covers the whole link.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Responses

Response samples

Content type
application/json
{
  • "uploads": [
    ]
}

Complete a multipart upload

Completes a multipart upload from the (part_number, etag) list the client collected while putting each part. An upload_id that is unknown, already completed or aborted answers multipart_upload_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix (the one the parts were uploaded under).

upload_id
required
string

The upload id from /multipart/begin.

required
Array of objects (MultipartCompletedPart)

Responses

Request samples

Content type
application/json
{
  • "path": "docs/report.pdf",
  • "upload_id": "2~aBc123EXAMPLEuploadId",
  • "parts": [
    ]
}

Response samples

Content type
application/json
{
  • "etag": "\"d41d8cd98f00b204e9800998ecf8427e-3\""
}

Abort a multipart upload

Aborts a multipart upload and drops its staged parts. An upload_id that is unknown, already completed or aborted answers multipart_upload_not_found, as on the other multipart calls.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix.

upload_id
required
string

The upload id from /multipart/begin.

Responses

Request samples

Content type
application/json
{
  • "path": "docs/report.pdf",
  • "upload_id": "2~aBc123EXAMPLEuploadId"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Delete an object under the link prefix

Deletes one object under the link's prefix. Presigned access carries no client-signed delete, so removal goes through this call. Idempotent: deleting a missing key is a no-op. The path is validated under the link's prefix, else invalid_request.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Request Body schema: application/json
required
path
required
string

File path relative to the link prefix.

Responses

Request samples

Content type
application/json
{
  • "path": "docs/report.pdf"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Read one small object under the link prefix through the server

Returns the object's bytes and its ETag, read by the server with its own storage credentials. For the metadata objects a client keeps beside its files (a storage descriptor, a journal, an index), whose reads must see a real 404: a browser cannot tell a missing object from a network failure over a presigned URL, because the storage provider's error responses carry no CORS headers. File bytes keep going over presigned URLs; this read refuses an object over 1 MiB with object_too_large instead of serving it. A missing object is object_not_found. The path is validated as TransferFileRequest.path defines, else invalid_request. The read is a get presign of one path the server fetches itself: held to the download cap the same way (409 link_download_limit_exceeded), its bytes booked as issued.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

query Parameters
path
required
string
Example: path=storage%23info

Object path relative to the link prefix, percent-encoded as a query value: a + in the path is sent as %2B, since a bare + decodes to a space.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Write one small object under the link prefix through the server

Stores the request body as the object, written by the server with its own storage credentials, and returns the ETag storage assigned. For the metadata objects a client updates with a precondition: If-Match with the ETag of the version the client read makes the write conditional on that version still being stored, If-None-Match: * on the object not existing yet; a violated precondition is 412 object_precondition_failed, which a browser cannot see over a presigned URL. At most one of the two. The body is at most 1 MiB, else object_too_large; file bytes keep going over presigned URLs. The write rides the same storage cap as a presigned PUT of the body's size. The path is validated as TransferFileRequest.path defines.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

query Parameters
path
required
string
Example: path=storage%23info

Object path relative to the link prefix, percent-encoded as a query value: a + in the path is sent as %2B, since a bare + decodes to a space.

header Parameters
If-Match
string

The ETag of the version the client read, quotes included. The write lands only while that version is the stored one.

If-None-Match
string
Value: "*"

The write lands only while no object is stored at the path.

Request Body schema: application/octet-stream
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "etag": "\"9e107d9d372bb6826bd81d3542a419d6\""
}

List active transfer peers

Returns the agents currently taking part in a transfer session on this link, uploading or downloading, so a client can show who is transferring without waiting for link.transfer_started frames. The list is empty when no transfer is open, and it is capped at 100 peers. A caller who cannot reach the link gets 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
url_token
required
string

Link URL token

Responses

Response samples

Content type
application/json
{
  • "peers": [
    ]
}

Shares

Share offers between nearby devices. An offer tells another agent that content is available; the recipient accepts or rejects it.

Send share offer to nearby device

Offers a link to another online agent and returns the offer_token that tracks it. An unknown target answers party_not_found, an offline one party_offline.

The recipient receives a share.offered frame and answers with POST /agents/shares/answers; the sender then receives share.answered. On acceptance the recipient starts the download and the sender the upload; on rejection the sender deletes the link.

The offer carries no plaintext description: the recipient unwraps encrypted_share_key and decrypts the link's encrypted_metadata with it to show what is being shared.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
target_agent_id
required
string (AgentID) [ 8 .. 256 ] characters ^agt_[A-Za-z0-9_-]+$

Unique agent identifier, prefixed with agt_. Returned by POST /auth/agents as agent_id and carried in the access token's claims, so no separate header is needed.

url_token
required
string [ 1 .. 256 ] characters

URL token of the link to share, created with POST /links. The recipient downloads the shared content through it.

encrypted_share_key
string <byte> <= 1024 characters

Share key wrapped to the recipient's device_public_key (base64, hybrid encryption). Optional; the sender takes that key from the nearby.updated frame.

Responses

Request samples

Content type
application/json
{
  • "target_agent_id": "agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  • "url_token": "k7mstq3w",
  • "encrypted_share_key": "string"
}

Response samples

Content type
application/json
{
  • "offer_token": "nae0kePa-random-zoo2Fahf"
}

Accept or reject a share offer

Records the recipient's decision on a share offer and pushes a share.answered frame to the sender. The offer_token and the url_token come from the share.offered frame the recipient received; an offer that is not the caller's own, or does not exist, answers offer_record_not_found.

After accept the recipient starts the download with POST /links/{url_token}/download/start and the sender starts the upload with POST /links/{url_token}/upload/start.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
offer_token
required
string [ 1 .. 256 ] characters

Token from the share.offered frame, naming the offer being answered.

answer
required
string
Enum: "accept" "reject"

Decision on the share offer

Responses

Request samples

Content type
application/json
{
  • "offer_token": "nae0kepa1234zoo2fahf5678abcd3q7w",
  • "answer": "accept"
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

Withdraw a pending share offer

Withdraws an offer the caller sent and the recipient has not answered yet. The offer_token is the one returned by POST /agents/shares/offers. If the recipient is online and still has the prompt open, it receives a share.cancelled frame and dismisses it.

Cancelling an unknown, already-answered or someone else's offer is a no-op and still answers 200. The sender remains responsible for deleting the link with DELETE /links/{url_token}.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
offer_token
required
string [ 1 .. 256 ] characters

Token of the offer to withdraw, from POST /agents/shares/offers.

Responses

Request samples

Content type
application/json
{
  • "offer_token": "nae0kepa1234zoo2fahf5678abcd3q7w"
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

RTC

Peer-to-peer transfer between agents over WebRTC:

  1. Register the agent with POST /auth/agents.
  2. Create a link with p2p_storage: true.
  3. Start a session with POST /links/{url_token}/upload/start or download/start.
  4. Call the peer with POST /agents/call; the peer receives call.incoming.
  5. Transfer over the WebRTC data channel, reporting progress with upload/update or download/update.
  6. Close the session with upload/end or download/end.

Initiate WebRTC call to another agent

Opens a WebRTC signaling call to another agent and rings it. The caller passes the callee's agent_id and the transfer_id of its own active transfer session, which is what authorizes the call; the callee must be online.

The response carries the call_id, the STUN/TURN servers to put into the RTCPeerConnection (TURN credentials are time-limited and specific to this call), the relay URLs and the caller's relay jwt. The callee receives a call.incoming frame with the same ICE servers and its own relay jwt. Both sides then exchange SDP and ICE over the relay servers.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
callee_id
required
string (AgentID) [ 8 .. 256 ] characters ^agt_[A-Za-z0-9_-]+$

Unique agent identifier, prefixed with agt_. Returned by POST /auth/agents as agent_id and carried in the access token's claims, so no separate header is needed.

transfer_id
required
string [ 32 .. 256 ] characters

Active transfer session authorizing this call. A downloader gets it from POST /links/{url_token}/download/start.

Responses

Request samples

Content type
application/json
{
  • "callee_id": "agt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  • "transfer_id": "tr_2p7mc0k2c2tj6f3q2v56y7wz9b1k4n6h"
}

Response samples

Content type
application/json
{
  • "call_id": "eis2heez-random-towiez1i",
  • "ice_servers": [
    ],
  • "relays": [
    ],
  • "jwt": "eyJhbGciOiJFZERTQSIsImtpZCI6ImtleS0xIn0.eyJpc3MiOiJzaGFyZS5uaW5qYSIsInN1YiI6ImNhbGxfMTIzIiwiYXVkIjpbInJlbGF5LXNlbmRlciJdLCJzaWQiOiJhZ3RfY2FsbGVyIiwicmlkIjoiYWd0X2NhbGxlZSIsImV4cCI6MTcwMDAwMDAwMH0.signature"
}

Notifications

In-app inbox of the user: workspace invites, vault join requests, link share requests and system alerts. Cursor-paginated, with mark-read and delete. A new entry is also pushed as a notification.created frame.

List in-app notifications

Returns the signed-in user's own inbox, newest first, paginated by cursor. Deleted notifications are never returned. Pass unread_only=true to keep only the unread ones.

unread_count counts every unread notification of the user, not just this page, so a badge needs no second call.

Authorizations:
SessionCookieAuthAccessTokenAuth
query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

offset
integer >= 0
Example: offset=950

Absolute number of items to skip from the start of the list, for page-number UIs: offset = (page - 1) * limit, page count from page_info.total_count. Mutually exclusive with cursor (sending both is validation_failed). Capped by a server-side ceiling (default 10000); deeper requests are validation_failed — narrow with filters instead. Prefer cursor for sequential paging: it is cheaper and stable against concurrent inserts.

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

unread_only
boolean
Default: false

Return only unread notifications.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    },
  • "unread_count": 3
}

Delete a notification

Removes one of the caller's own notifications from the inbox; later listings no longer return it. A notification that belongs to someone else answers the same 404 as a missing one.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
notification_id
required
string

Public ID of the notification.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Mark a notification as read

Marks one of the caller's own notifications read and answers 204. Calling it again changes nothing and keeps the original read_at. A notification that belongs to someone else answers the same 404 as a missing one.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
notification_id
required
string

Public ID of the notification.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Mark all notifications as read

Marks every unread notification of the caller read and returns how many were affected. Answers 429 when called too often.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
{
  • "affected_count": 5
}

Audit

Audit log of the caller's workspaces, filterable by workspace_id.

List audit events for the caller

Returns the audit events visible to the authenticated user: events where the user is the actor or the subject, and events from workspaces the user is a member of. Results are sorted by created_at descending and paged with cursor (sequential) or offset (page-number UIs).

date_from and date_to are inclusive. A span wider than 90 days answers 400 invalid_date_range; with neither bound the feed starts 30 days back. Filtering by a workspace the caller is not a member of answers 403.

Authorizations:
SessionCookieAuthAccessTokenAuth
query Parameters
workspace_id
string
Example: workspace_id=ws_a1b2c3d4e5f6g7h8

Public ID of a workspace to restrict results to. The caller must be a member.

cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

offset
integer >= 0
Example: offset=950

Absolute number of items to skip from the start of the list, for page-number UIs: offset = (page - 1) * limit, page count from page_info.total_count. Mutually exclusive with cursor (sending both is validation_failed). Capped by a server-side ceiling (default 10000); deeper requests are validation_failed — narrow with filters instead. Prefer cursor for sequential paging: it is cheaper and stable against concurrent inserts.

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

action
string
Example: action=link.created

Exact action to match, such as link.created or auth.user_logged_in.

action_prefix
string <= 64 characters ^[a-z_]+(\.[a-z_]+)*\.$
Example: action_prefix=link.

Only actions starting with this prefix. The prefix ends on a segment boundary: link. or vault. for a whole domain, link.transfer_ is not accepted.

session_id
string
Example: session_id=tr_abc123def456xyz7

Restrict results to one transfer session. Not served yet: any value answers 400 invalid_request.

result
string
Enum: "success" "failure" "denied"

Filter by event outcome.

date_from
string <date-time>
Example: date_from=2026-01-01T00:00:00Z

Inclusive lower bound on created_at, RFC3339.

date_to
string <date-time>
Example: date_to=2026-12-31T23:59:59Z

Inclusive upper bound on created_at, RFC3339.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

List audit events for an app

Returns the audit events of one app. Requires the app:manage scope on it; a caller without access to the app is answered 404. Pass current as app_id to read the app of the current context. Paged with cursor from page_info.next_cursor, or with offset for page-number UIs.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
app_id
required
string
Example: current

App public ID, or current for the app of the current context.

query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

offset
integer >= 0
Example: offset=950

Absolute number of items to skip from the start of the list, for page-number UIs: offset = (page - 1) * limit, page count from page_info.total_count. Mutually exclusive with cursor (sending both is validation_failed). Capped by a server-side ceiling (default 10000); deeper requests are validation_failed — narrow with filters instead. Prefer cursor for sequential paging: it is cheaper and stable against concurrent inserts.

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

List audit events for the current app

Returns the audit events of the app of the current context. Requires the app:manage scope. Paged with cursor (sequential) or offset (page-number UIs).

Authorizations:
SessionCookieAuthAccessTokenAuth
query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

offset
integer >= 0
Example: offset=950

Absolute number of items to skip from the start of the list, for page-number UIs: offset = (page - 1) * limit, page count from page_info.total_count. Mutually exclusive with cursor (sending both is validation_failed). Capped by a server-side ceiling (default 10000); deeper requests are validation_failed — narrow with filters instead. Prefer cursor for sequential paging: it is cheaper and stable against concurrent inserts.

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

List audit events for a workspace

Returns the audit events of one workspace: settings changes, members added and removed, invites created and revoked, and permission changes. Requires the workspace:write scope on that workspace. Paged with cursor (sequential) or offset (page-number UIs).

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string
Example: ws_a1b2c3d4e5f6g7h8

Workspace public ID.

query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

offset
integer >= 0
Example: offset=950

Absolute number of items to skip from the start of the list, for page-number UIs: offset = (page - 1) * limit, page count from page_info.total_count. Mutually exclusive with cursor (sending both is validation_failed). Capped by a server-side ceiling (default 10000); deeper requests are validation_failed — narrow with filters instead. Prefer cursor for sequential paging: it is cheaper and stable against concurrent inserts.

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

API Keys

Personal access tokens for programmatic access.

List API keys for the authenticated user

Lists the caller's live (not revoked) API keys, oldest first, cursor-paged. The secret is never shown again — prefix is how a key is told apart; last_used_at is approximate.

Authorizations:
SessionCookieAuthAccessTokenAuth
query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

offset
integer >= 0
Example: offset=950

Absolute number of items to skip from the start of the list, for page-number UIs: offset = (page - 1) * limit, page count from page_info.total_count. Mutually exclusive with cursor (sending both is validation_failed). Capped by a server-side ceiling (default 10000); deeper requests are validation_failed — narrow with filters instead. Prefer cursor for sequential paging: it is cheaper and stable against concurrent inserts.

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "page_info": {
    }
}

Create a new API key

Creates an API key for programmatic access. The token is returned once, here, and never again; prefix is the visible head listings show. Send it as Authorization: Bearer <token>. A key acts as the user with no device session behind it, so sessions and factors are out of its reach.

scopes narrows the key to a subset of the user's content permissions, named as the application's area:level scopes; an unknown name is invalid_scopes, and omitted or empty leaves the key the user's full rights. expires_at in the past is invalid_expires_at; past it the key stops authenticating.

Authorizations:
SessionCookieAuthAccessTokenAuth
header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Request Body schema: application/json
required
name
required
string [ 1 .. 255 ] characters

Label shown in the key listing.

scopes
Array of strings

Permissions to limit the key to. Omitted or empty gives it the user's full rights.

expires_at
string or null <date-time>

When the key stops authenticating. Null for a key that does not expire.

Responses

Request samples

Content type
application/json
{
  • "name": "Automation bot",
  • "scopes": [
    ],
  • "expires_at": "2025-12-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "key_id": "key_018f7b2e-5e6f-7c3d-9a8b-4c7e1f3a6d9c",
  • "name": "Automation bot",
  • "prefix": "c6n9rQ2e",
  • "scopes": [
    ],
  • "created_at": "2025-05-20T09:10:00Z",
  • "last_used_at": null,
  • "token": "c6n9rQ2e1kA7p0s3Zt8vWq4Lm7Xy1Bn0",
  • "expires_at": "2025-12-01T00:00:00Z"
}

Revoke an API key

Revokes one of the caller's own keys: it stops authenticating at once (401 from then on) and leaves the listing. Irreversible. A key that is not the caller's, or does not exist, is api_key_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
key_id
required
string
Example: key_018f7b2e-3c4d-7a1b-9e6f-2a5c8d1e4b7a

Identifier of the API key to revoke

header Parameters
Idempotency-Key
string <= 255 characters
Example: 1d24c9e0-3f1b-4a75-b0d9-6d3b2d9c1a55

Optional key that makes a mutating request retry-safe: a repeat carrying the same key replays the original outcome instead of creating a second one, for as long as the original operation is on record.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

WebSocket

Server-to-client event stream. Browsers connect with the one-time ticket from POST /auth/agents (GET /ws/connect?ticket=…; 30 s TTL, single use, bound to the agent), native clients with a Bearer token (GET /ws/action). Frames are WSMessage variants; subscriptions are managed over /events/subscriptions.

Connect to the event stream with a ticket

Upgrades to the server-to-client WebSocket using the one-time ticket from POST /auth/agents (30 s TTL, bound to the agent). The server streams WSMessage frames; the client sends nothing. Subscriptions are managed over /events/subscriptions and survive reconnects; the caller's own agent:<agent_id> inbox is always delivered.

Pass last_seen_id, the id of the last frame processed, to receive the frames missed while offline before the live stream continues; past the retention window re-read the resource over REST. A subscription.revoked frame means the caller lost that topic.

query Parameters
ticket
required
string
Example: ticket=dGhpcyBpcyBhIHRlc3QgdGlja2V0IGZvciBkZW1v

One-time ticket from POST /auth/agents.

last_seen_id
string
Example: last_seen_id=evt_0192b1e0-7c5a-7f4a-9c1e-3f1e2d4c5b6a

The id of the last frame processed; the frames after it are replayed before the live stream.

Responses

Response samples

Content type
application/json
Example
{
  • "type": "subscription.revoked",
  • "id": "evt_019ead06-e190-7e8a-8ff5-1d75f0b36e58",
  • "topic": "link:k7mstq3w",
  • "timestamp": "2025-01-15T10:30:00.123Z"
}

Connect to the event stream with a Bearer token

Upgrades to the same server-to-client stream as GET /ws/connect, authenticated by Authorization: Bearer <access token> instead of a ticket. For native and CLI clients, which can set headers on the upgrade request; browsers use the ticket flow. last_seen_id works the same way.

Authorizations:
AccessTokenAuthSessionCookieAuth
query Parameters
last_seen_id
string
Example: last_seen_id=evt_0192b1e0-7c5a-7f4a-9c1e-3f1e2d4c5b6a

The id of the last frame processed; the frames after it are replayed before the live stream.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Billing

Subscription billing of a workspace that pays for itself: plans, checkout, the current subscription and its entitlements. Personal plans (Plus, Pro) cover one person; Teams plans (team_starter, team_pro) open the workspace to members, children and invites, with a hard number of seats shared by every workspace billed through it. Payment-provider identifiers never appear in the contract.

  1. Read plans with GET /billing/plans.
  2. Start a checkout with POST /workspaces/{workspace_id}/billing/checkout and an Idempotency-Key header; open the returned checkout_url when present.
  3. Read the subscription and effective entitlements with GET /workspaces/{workspace_id}/billing.
  4. Change plan, update the payment method, cancel at period end or reactivate through the subscription operations; each returns a durable operation to poll.

List published plans

Returns the published offer versions, Personal and Teams, each with its price and the entitlements it grants. Open to anyone; no session is needed. A deployment that serves no billing catalog answers an empty list, and billing switched off answers 503.

Responses

Response samples

Content type
application/json
{
  • "plans": [
    ]
}

Get workspace billing

Returns the entitlements in force for the workspace, its member count against the seats, its billing owner and, when one exists, its subscription. Any owner of a workspace that pays for itself may call it; only the billing owner changes the billing. Any other workspace answers 404 rather than 403.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

Responses

Response samples

Content type
application/json
{
  • "workspace_id": "ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53",
  • "billing_owner_user_id": "usr_a4e7c2d9-3b1f-4e6a-8d5c-2f9b7e1a6c3d",
  • "entitlements": {
    },
  • "subscription": {
    },
  • "members": 4,
  • "over_seats": false,
  • "trial": {
    },
  • "trial_available": true
}

Start a subscription checkout

Creates a checkout operation for one published offer version and returns it. The workspace's billing owner calls it; another owner answers 403 only_billing_owner_can_perform_this_action. ui_mode picks the payment form: hosted, the default, answers with a checkout_url to send the buyer to, embedded with a client_secret and publishable_key. Redirect URLs are chosen by the server, never taken from the request.

The same Idempotency-Key with the same body replays the original operation. 409 answers a reused key with a different body, a workspace that already has an active subscription, a payment still settling, or an unresolved earlier operation.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

header Parameters
Idempotency-Key
required
string [ 1 .. 255 ] characters .*\S.*

Key that makes this billing mutation retry-safe; the same key with the same body replays the original operation

Request Body schema: application/json
required
offer_version_id
required
string [ 1 .. 255 ] characters

Published offer version to subscribe to

ui_mode
string
Enum: "hosted" "embedded"

How the payment form is shown; absent means hosted. An offer with no embedded form answers 400 validation_failed.

promo_code
string [ 1 .. 64 ] characters

Coupon code applied to the payment form; the provider decides the discount. A code the provider does not know answers 400 validation_failed.

Responses

Request samples

Content type
application/json
{
  • "offer_version_id": "ofv_sharon-personal-pro-monthly-v1",
  • "ui_mode": "hosted",
  • "promo_code": "DMYTRO2026"
}

Response samples

Content type
application/json
{
  • "id": "bop_0198a6d7-9b46-7d5c-a501-d75e8b276c63",
  • "kind": "checkout",
  • "state": "succeeded",
  • "offer_version_id": "ofv_sharon-personal-pro-monthly-v1",
  • "checkout_url": "http://example.com",
  • "client_secret": "string",
  • "publishable_key": "string",
  • "error": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a billing operation

Returns one checkout, plan-change, cancellation or reactivation operation of the workspace, with its current state. An operation that belongs to another workspace answers 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

operation_id
required
string^bop_[A-Za-z0-9_-]+$
Example: bop_0198a6d7-9b46-7d5c-a501-d75e8b276c63

Billing operation public ID

Responses

Response samples

Content type
application/json
{
  • "id": "bop_0198a6d7-9b46-7d5c-a501-d75e8b276c63",
  • "kind": "checkout",
  • "state": "succeeded",
  • "offer_version_id": "ofv_sharon-personal-pro-monthly-v1",
  • "checkout_url": "http://example.com",
  • "client_secret": "string",
  • "publishable_key": "string",
  • "error": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Change a subscription plan

Moves the active subscription to another published offer version at once, with a prorated charge or credit, and returns the operation; Personal and Teams offers are changed between alike. The workspace owner calls it. The same Idempotency-Key with the same body replays the original operation; the same key with a different body answers 409, as does an earlier operation that is still unresolved.

A lower quota takes effect once the plan change is confirmed; a higher quota takes effect only after the prorated charge succeeds. Fewer seats than members removes nobody and refuses nothing: over_seats is raised until the count fits again, and live invites beyond the free seats are revoked.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

header Parameters
Idempotency-Key
required
string [ 1 .. 255 ] characters .*\S.*

Key that makes this billing mutation retry-safe; the same key with the same body replays the original operation

Request Body schema: application/json
required
offer_version_id
required
string [ 1 .. 255 ] characters

Published offer version to switch to

Responses

Request samples

Content type
application/json
{
  • "offer_version_id": "ofv_sharon-personal-pro-monthly-v1"
}

Response samples

Content type
application/json
{
  • "id": "bop_0198a6d7-9b46-7d5c-a501-d75e8b276c63",
  • "kind": "checkout",
  • "state": "succeeded",
  • "offer_version_id": "ofv_sharon-personal-pro-monthly-v1",
  • "checkout_url": "http://example.com",
  • "client_secret": "string",
  • "publishable_key": "string",
  • "error": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Cancel a subscription at period end

Schedules the active subscription to end after its current paid period and returns the operation; the subscription's cancel_at_period_end turns true. There is no immediate cancellation. The same Idempotency-Key with the same body replays the original operation.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

header Parameters
Idempotency-Key
required
string [ 1 .. 255 ] characters .*\S.*

Key that makes this billing mutation retry-safe; the same key with the same body replays the original operation

Responses

Response samples

Content type
application/json
{
  • "id": "bop_0198a6d7-9b46-7d5c-a501-d75e8b276c63",
  • "kind": "checkout",
  • "state": "succeeded",
  • "offer_version_id": "ofv_sharon-personal-pro-monthly-v1",
  • "checkout_url": "http://example.com",
  • "client_secret": "string",
  • "publishable_key": "string",
  • "error": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Reactivate a subscription pending cancellation

Removes a scheduled period-end cancellation while the subscription is still running, and returns the operation. The same Idempotency-Key with the same body replays the original operation. A subscription that has no cancellation scheduled answers 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

header Parameters
Idempotency-Key
required
string [ 1 .. 255 ] characters .*\S.*

Key that makes this billing mutation retry-safe; the same key with the same body replays the original operation

Responses

Response samples

Content type
application/json
{
  • "id": "bop_0198a6d7-9b46-7d5c-a501-d75e8b276c63",
  • "kind": "checkout",
  • "state": "succeeded",
  • "offer_version_id": "ofv_sharon-personal-pro-monthly-v1",
  • "checkout_url": "http://example.com",
  • "client_secret": "string",
  • "publishable_key": "string",
  • "error": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Open payment-method management

Returns a short-lived, already-authenticated URL where the workspace owner updates the payment method of the active subscription. The caller needs a signed-in user session. The URL is handed out once and is neither stored nor logged. A workspace with no live subscription answers 404.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

Responses

Response samples

Content type
application/json

Start the Teams trial

Puts the workspace on the trial Teams tier for the configured number of days, without a payment method or a provider. Only the billing owner of a workspace that pays for itself may call it; another owner answers 403 only_billing_owner_can_perform_this_action, any other workspace and any other member 404. An account starts the trial once: an account that already started one answers billing_trial_already_used, and so does a new account on the same address. Joining a workspace, in a trial or not, never uses it up. A workspace that is not a root, or has a subscription, an operator override, a trial already taken, or no configured trial tier, answers billing_trial_unavailable. A purchase or an operator override during the trial ends it; at its end the workspace returns to Free and keeps its members.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

Responses

Response samples

Content type
application/json
{
  • "workspace_id": "ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53",
  • "billing_owner_user_id": "usr_a4e7c2d9-3b1f-4e6a-8d5c-2f9b7e1a6c3d",
  • "entitlements": {
    },
  • "subscription": {
    },
  • "members": 4,
  • "over_seats": false,
  • "trial": {
    },
  • "trial_available": true
}

Read the pending billing transfer

The workspace's live offer of its billing to another owner; any owner of a workspace that pays for itself sees it. An expired, answered, revoked or replaced offer, or one that no longer holds — its maker no longer runs the billing, its member is no longer an owner — answers 404 billing_transfer_offer_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

Responses

Response samples

Content type
application/json
{
  • "offer_id": "bto_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f",
  • "workspace_id": "ws_a1b2c3d4e5f6g7h8",
  • "user_id": "usr_a1b2c3d4e5f6g7h8i9j0",
  • "offered_by": "usr_k1l2m3n4o5p6q7r8s9t0",
  • "created_at": "2026-10-14T10:00:00Z",
  • "expires_at": "2026-10-21T10:00:00Z"
}

Offer the billing to another owner

The billing owner offers the workspace's billing to another owner of it, replacing any earlier offer. Nothing changes until that owner accepts: then they buy, change and cancel the plan, receive the billing mail and hold the billing account, and the card on it keeps paying until they replace it. Another owner answers 403 only_billing_owner_can_perform_this_action; a member who is not an owner of this workspace 409 billing_transfer_target_not_owner; the caller themselves 400 validation_failed. The offer lapses after the invite term.

Needs a login session and a fresh factor in X-Auth-Challenge on every call.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

header Parameters
X-Auth-Challenge
string [ 16 .. 64 ] characters
Example: ch_wjIilzM03bjfJhYdEPkGN9CAZdlx_AO5

Challenge token verified with POST /auth/challenges/{token}, sent when retrying an operation that answered 403 challenge_required — changing, deleting or confirming a factor, among others. Single use, until its expires_at.

Request Body schema: application/json
required
user_id
required
string

Public ID of an owner of the workspace other than the caller.

Responses

Request samples

Content type
application/json
{
  • "user_id": "usr_a1b2c3d4e5f6g7h8i9j0"
}

Response samples

Content type
application/json
{
  • "offer_id": "bto_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f",
  • "workspace_id": "ws_a1b2c3d4e5f6g7h8",
  • "user_id": "usr_a1b2c3d4e5f6g7h8i9j0",
  • "offered_by": "usr_k1l2m3n4o5p6q7r8s9t0",
  • "created_at": "2026-10-14T10:00:00Z",
  • "expires_at": "2026-10-21T10:00:00Z"
}

Revoke the pending billing transfer

The billing owner withdraws the live offer before it is answered; another owner answers 403 only_billing_owner_can_perform_this_action. With offer_id only that offer is revoked: one replaced meanwhile, or an id that names none, answers 404 billing_transfer_offer_not_found.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

query Parameters
offer_id
string
Example: offer_id=bto_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f

The offer to revoke; without it, whichever offer is live.

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Accept the billing offered to the caller

The owner the live offer names takes the billing: from now on they run it and hold the billing account. Anyone the live offer does not name hears 404 billing_transfer_offer_not_found, as if there were none; so does an offer_id the live offer does not carry. An offer that no longer holds — its maker no longer runs the billing or is suspended, the session it was made in was cut off as untrusted, the caller is no longer an owner — is dropped and answers 409 billing_transfer_offer_stale.

Needs a login session. Returns the workspace's billing as the caller now runs it.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

Request Body schema: application/json
optional
offer_id
string

The offer being answered.

Responses

Request samples

Content type
application/json
{
  • "offer_id": "bto_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f"
}

Response samples

Content type
application/json
{
  • "workspace_id": "ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53",
  • "billing_owner_user_id": "usr_a4e7c2d9-3b1f-4e6a-8d5c-2f9b7e1a6c3d",
  • "entitlements": {
    },
  • "subscription": {
    },
  • "members": 4,
  • "over_seats": false,
  • "trial": {
    },
  • "trial_available": true
}

Decline the billing offered to the caller

The owner the live offer names turns it down; nothing changes and the offer is gone. Anyone the live offer does not name hears 404 billing_transfer_offer_not_found, as if there were none; so does an offer_id the live offer does not carry.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
workspace_id
required
string^ws_[A-Za-z0-9_-]+$
Example: ws_6f16c25a-84d9-4ccf-bc6e-5333c6456f53

Public ID of a workspace that pays for itself

Request Body schema: application/json
optional
offer_id
string

The offer being answered.

Responses

Request samples

Content type
application/json
{
  • "offer_id": "bto_018f7c41-5a2b-7c3d-8e9f-1a2b3c4d5e6f"
}

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

Referrals

Referral codes of a partner. A partner has a budget, a percent of the list price, and splits it per code between the buyer's discount and their own share. The share is earned on every payment within 12 months of a buyer's first payment.

List the caller's referral codes

Returns the caller's partner budget, when they have one, and every referral code they own, newest first, each with its funnel and money. A user who is not a partner and owns no code gets no budget and an empty list. Buyers are never named. An API key reaches it only with the referral:read scope or with no scopes at all.

Authorizations:
SessionCookieAuthAccessTokenAuth

Responses

Response samples

Content type
application/json
{
  • "budget_percent": 40,
  • "items": [
    ]
}

Create a referral code

Creates a code the caller owns at every payment provider. percent_off plus share_percent must fit the caller's budget; both are taken from the list price. The discount lasts as long as the partner's terms set by support say. A provider that fails leaves the code pending and answers 503; support completes it. An API key reaches it only with the referral:manage scope or with no scopes at all.

Authorizations:
SessionCookieAuthAccessTokenAuth
Request Body schema: application/json
required
code
string [ 1 .. 64 ] characters ^[A-Za-z0-9_-]+$

Letters, digits, hyphens or underscores; stored upper case. Absent, the server makes an 8-character code

percent_off
required
integer <int64> [ 1 .. 100 ]
share_percent
required
integer <int64> [ 0 .. 100 ]

Responses

Request samples

Content type
application/json
{
  • "code": "DMYTRO-TG",
  • "percent_off": 25,
  • "share_percent": 15
}

Response samples

Content type
application/json
{
  • "id": "brf_0198d1a2-b3c4-7e5f-8a9b-0c1d2e3f4a5b",
  • "code": "DMYTRO2026",
  • "percent_off": 20,
  • "share_percent": 20,
  • "discount_duration": "months_12",
  • "status": "active",
  • "created_at": "2026-10-22T10:00:00Z",
  • "closed_at": "2026-11-01T10:00:00Z",
  • "funnel": {
    },
  • "money": [
    ]
}

Close a referral code

Stops the code for new buyers and switches it off at the providers. Buyers who already came keep earning the share until their 12 months run out. The code stays in the listing as closed; closing it again changes nothing.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
referral_id
required
string^brf_[A-Za-z0-9_-]+$
Example: brf_0198d1a2-b3c4-7e5f-8a9b-0c1d2e3f4a5b

Public ID of one of the caller's referral codes

Responses

Response samples

Content type
application/json
{
  • "code": "bad_request",
  • "status": "invalid_request",
  • "error": null
}

List a referral code's ledger

Returns the money facts under one of the caller's codes, newest first: payments, refunds, chargebacks, their reversals and payouts, each with the share it adds or takes. Buyers are never named.

Authorizations:
SessionCookieAuthAccessTokenAuth
path Parameters
referral_id
required
string^brf_[A-Za-z0-9_-]+$
Example: brf_0198d1a2-b3c4-7e5f-8a9b-0c1d2e3f4a5b

Public ID of one of the caller's referral codes

query Parameters
cursor
string
Example: cursor=g2wAAAABBmN1cnNvcg

Cursor returned by a previous response to continue listing results

limit
integer [ 1 .. 100 ]
Default: 50
Example: limit=50

Maximum number of items to return for this request (default 50)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "next_cursor": "MjAyNi0xMC0xOVQwODowMjoxMVo"
}

Maintenance

Service health check.

Check service health

Reports service liveness and the running version. Public, no authentication. The check is liveness only: it does not probe the database or any downstream dependency, so a 200 means the process is serving, not that every subsystem is healthy.

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "version": "1.0.0"
}