Authentication
Send your API key with every request. Put it in the authorization header after
the word Bearer. Replace YOUR_API_KEY with your key. Keys start with sk_.
authorization: Bearer YOUR_API_KEYKeys
- Create and manage keys in the dashboard on the API keys page. WorkOS issues each key. A key belongs to a workspace or to one member of a workspace.
- WorkOS manages key permissions, revoking, and rotation. Use the same dashboard page.
Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | The key is missing or not valid. |
| 402 | INSUFFICIENT_CREDITS | The workspace has no plan or not enough credits. Pricing details |
| 402 | USAGE_CAPPED | The workspace reached its monthly spending limit. Pricing details |
| 403 | FORBIDDEN | The key is not allowed to do this. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. Wait, then try again. |