Skip to content

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_KEY

Keys

  1. 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.
  2. WorkOS manages key permissions, revoking, and rotation. Use the same dashboard page.

Errors

StatusCodeMeaning
401UNAUTHORIZEDThe key is missing or not valid.
402INSUFFICIENT_CREDITSThe workspace has no plan or not enough credits. Pricing details
402USAGE_CAPPEDThe workspace reached its monthly spending limit. Pricing details
403FORBIDDENThe key is not allowed to do this.
429RATE_LIMIT_EXCEEDEDToo many requests. Wait, then try again.