Skip to main content
Every path below is relative to your deployment — https://usesink.co on the hosted service.

Authenticating a request

Two credentials work, and the sk- prefix is what tells them apart.
An API key is minted in the dashboard or by POST /keys/, belongs to a user, and is what the CLI and any automation should use. A session token comes from a browser login and is short-lived.

Workspace scope

On a path that contains {workspace_id}, that value decides the scope. On a path without one, Sink reads the X-Workspace-Id header, and failing that the credential’s own scope — the workspace claim on a session token, or the holder’s current workspace for an API key. A caller who is not a member of the resolved workspace gets 403.
Interactive docs (/docs, /redoc, /openapi.json) are served only when a deployment runs with DEBUG enabled, so they are not available on the hosted instance.

Accounts

Verifying an email

Codes expire on their own timer, and a fresh one is refused while a live one is outstanding.

SSO

These are browser flows. A first sign-in through either creates the account and its first workspace.

API keys

string
required
How the key shows up in the dashboard.
string
Free text — what this key is for.
integer
Lifetime in minutes from now, not a timestamp. 43200 is thirty days. Omit for a key that does not expire.
The response carries token — the actual credential. Only its SHA-256 digest is stored, so this is the one and only time it is shown. A revoked or expired key answers 401 on its next use, with a message distinguishing the two.

Sessions

Sessions are one per device: signing in again from the same user agent revokes that device’s previous session rather than sitting alongside it.

Errors

Errors and limits has the full picture, including rate-limit headers and the 207 case on secret reads.