Press / to search

All documentation
docs Call it from your software Consumer keys

Runs onWrit Cloud

csk ▸ keys you hand out

Hand out access, keep control.

A consumer key — prefix csk_ — is what your customers call your published endpoints with. Each key carries its own limits and dies alone; and it opens only the /v1/{slug}/… gateway, never your account’s /api surface.

Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.

key ▸ minted by you

Minted by you, held by your customer.

You mint csk_ keys for your own customers and partners. The full secret is shown once, at mint — Writ stores it hashed and cannot show it again. Lists, logs and analytics identify a key by its key_prefix: the literal first 8 characters.

call ▸ same route

Same route, a consumer bearer.

Callers hit the identical endpoint — they just send their csk_ key where your wt_ key never travels:

consumer-call.sh · bash
curl -X POST https://api.usewrit.app/v1/acme/price-check \
  -H "Authorization: Bearer csk_77a2...0b4" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/product/42"}'

limits ▸ per key

The controls that travel with a key.

Every limit is a field on the key itself, so two callers never share a fate:

FieldDefaultWhat it does
allowed_endpoint_idsNULLThe endpoints this key may call. NULL = all of your endpoints.
rate_limit_per_minuteNULL1–10,000 requests per minute. NULL = the endpoint’s override, else 60/min.
monthly_quotaNULLCalls per month for this key — monthly_calls_used counts against it and resets at quota_reset_at. NULL = only your plan’s org-wide quota applies.
expires_atNULLOptional hard expiry. NULL = the key does not expire.

lifecycle ▸ three states

Suspend is reversible. Revoke is not.

A key is in exactly one state:

StatusWhat it means
activeThe key authenticates calls, inside its limits.
suspendedTemporarily off — resume it later without re-issuing anything.
revokedPermanent. A revoked key never comes back.

Rotation ships with a grace window: after you rotate, the previous key keeps working until rotation_grace_until — your customer swaps credentials without an outage.

plans ▸ how many keys

How many keys a plan can hold.

Non-revoked keys count against your plan’s max_consumer_keys limit:

PlanConsumer keys
Free10
Starter20
Pro50
Growth200
ScaleUnlimited
EnterpriseUnlimited

faq

Questions, answered.

How is a consumer key different from a wt_ key?
A wt_ key is your own credential for the platform API at /api/*. A csk_ consumer key is what you mint for a customer, and it authenticates only your published /v1/{slug}/… endpoints — it cannot read your account, your workflows or your data.
What rate limits can I set?
From 1 to 10,000 requests per minute per key, enforced on a sliding 60-second window. Past the limit the call answers 429 with X-RateLimit-* headers and Retry-After: 60. Leave it NULL to inherit the endpoint’s override, or the 60/min default.
Can a consumer call any of my endpoints?
Only what allowed_endpoint_ids permits. NULL means all of your endpoints; set the list, and calls to anything else are rejected.
How do I rotate a key without breaking my customer?
Rotate it: you get the new secret, and the old key keeps authenticating until rotation_grace_until. Your customer deploys the new key inside the grace window and never sees a failed call.
Is this how the marketplace works too?
No. The marketplace cross-tenant path is install and run: someone installs your free listing and runs it on their own account with their own data. Consumer keys distribute access to your own published endpoints. Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.

go ▸ distribute

Distribute your first key.

Publish an endpoint, mint a csk_ key, and share access without sharing secrets.