Press / to search

All documentation
docs Call it from your software Authentication

Runs onWrit Cloud

auth ▸ five token families

Authentication.

Five credential families, each opening exactly one surface. This page maps them, then goes deep on the two you will mint the most: wt_ API keys with their scopes, and OAuth for third-party apps.

tokens ▸ the map

Five credentials, five surfaces.

Each credential opens exactly one slice of Writ. The fastest way to debug a 401 is to check the pair: which token, on which surface.

CredentialPrefixWhere it works
API key wt_ Your own servers, on the whole /api/* + /api/v1/* surface and on POST /mcp.
OAuth access token wto_ Third-party apps, on /api/* and on published /mcp/{slug} servers. Legacy pso_ tokens are still accepted.
Consumer key csk_ Your customers, only on the /v1/{slug}/{path} gateway — never on /api.
SCIM token Your identity provider, only on /scim/v2/* — one token per organization.
Session (JWT) The web app after login — 15-minute access tokens, revoked server-side on logout.

wt ▸ keys + scopes

API keys: one header, scoped tight.

A key is wt_ followed by 43 URL-safe characters. The secret is shown once at creation and stored hashed — lists and logs show only a short, non-secret prefix. Send it as a Bearer token:

curl https://api.usewrit.app/api/v1/workflows \
  -H "Authorization: Bearer $WRIT_API_KEY"

Scopes: resource:action

Actions are read, write, execute and delete, over seventeen resources. A key carries only the scopes you grant it — and the pinnable resources can be narrowed further, to specific ids.

ResourceActionsNote
workflowsread · write · execute · deletePinnable to specific workflows.
runsread
monitorsread · write · execute · deletePinnable.
datasetsread · deletePinnable.
transferread · writeBulk export and import of the whole account — never part of any preset.
crawlread · execute · delete
scrapeexecuteSplit from crawl: a single-page extraction key cannot start a site crawl.
filesread · write · delete
personasread · write · delete
secretsread · write · deleteValues are never returned — names and metadata only.
agentsread · write · execute
triggersread · write · execute · delete
recorderread · execute
streamingread · execute · delete
mcpread · write · execute · delete
marketplaceread · write
accountread

Three presets cover most keys: read_only (every :read), run (:read + :execute) and full (everything, including delete). transfer is excluded from every preset and must be granted by hand. Wildcards expand to concrete scopes at grant time, so a key can never silently widen later — and enforcement is default-deny: a route not explicitly opened to API keys refuses them.

Rotation. Keys are independent: mint a new key with the same scopes, deploy it, then revoke the old one — no downtime. Store keys in your secrets manager; they cannot be re-displayed.

oauth ▸ third-party apps

OAuth: PKCE, no client secret.

The OAuth surface is built for public clients: PKCE is required, there is no client secret, and clients can self-register through RFC 7591 dynamic registration. Access tokens are prefixed wto_ (legacy pso_ still accepted) and work on /api/* and published /mcp/{slug} servers.

EndpointRole
GET /api/oauth/.well-known/oauth-authorization-serverAuthorization-server metadata — endpoints, scopes, PKCE methods.
POST /api/oauth/registerRFC 7591 dynamic client registration, for public PKCE clients.

OAuth scopes are a separate, smaller set — thirteen — and a grant caps at the operator role, never admin:

ScopeGrants
targets:readView monitored targets and their status.
targets:writeCreate, update and delete targets.
changes:readView detected changes and diffs.
workflows:readView workflows.
workflows:writeCreate and modify workflows.
workflows:executeTrigger workflow execution.
triggers:readView trigger rules and webhook configurations.
triggers:writeCreate and modify triggers.
reports:readView run results and reports.
notifications:readView notification settings.
notifications:writeManage notification settings.
org:readView organization info and team members.
profile:readView user profile information.

account ▸ sign-in security

Locking the account itself.

Independent of API credentials, the account carries its own protections:

TOTP MFA

Enroll an authenticator, confirm a code to activate, disable with a valid code — with one-time recovery codes as the fallback. Verification is rate-limited against brute force.

WebAuthn passkeys

Passwordless sign-in, or a second factor alongside the password.

SAML 2.0 + OIDC SSO

Configured per connection — signed assertions on SAML, PKCE + nonce on OIDC.

Domain verification

Prove a domain with a DNS TXT record at _writ-sso-verify.{domain}; optionally set sso_enforced so members must sign in through SSO.

SCIM 2.0 provisioning

Your identity provider creates and deprovisions accounts on /scim/v2/*; deprovisioning immediately revokes the user’s live sessions and tokens.

secrets ▸ two syntaxes

Vault refs vs AI placeholders.

Two placeholder syntaxes, two channels — do not mix them. {{vault:key}} is the workflow-field syntax: it supports subfields like {{vault:name.username}}, and a bare credentials reference resolves to the password. {{secret:key}} is the AI-channel placeholder, for when an AI session needs a secret. A workflow field wants vault:; an AI instruction wants secret:.

faq

Authentication questions, answered.

Which token opens which surface?
wt_ opens /api/* (plus /api/v1/*) and POST /mcp. wto_ OAuth tokens open /api/* and published /mcp/{slug} servers. csk_ consumer keys open only the /v1/{slug}/{path} gateway. SCIM tokens open /scim/v2/* only — and the web session never leaves the app.
How are keys stored — can I recover one?
No. The secret is shown once at creation and stored hashed; lists and logs identify keys by a short non-secret prefix. If a key leaks, revoke it and mint a new one — keys are independent, so rotation needs no downtime.
What can a preset never grant?
transfer — the bulk export and import of the whole account. read_only grants every :read, run adds :execute, full grants everything including delete; transfer scopes must always be granted explicitly, by hand.
Can an OAuth app become an admin?
No. OAuth grants are limited to the thirteen OAuth scopes and cap at the operator role — an authorized app can never hold admin rights, whatever it requests.