The WorkOS API gives you everything you need to make your app enterprise-ready. Authenticate users, sync directories, enforce access controls, stream audit logs, and more – all through a single integration.
The API is organized around REST. It accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Sign in to see code examples customized with your API keys and data.
https://api_workos_com
Not a developer? You can explore most of WorkOS without writing any code. The WorkOS Dashboard lets you configure SSO connections, manage directories, set up audit log streams, and more – all from a visual interface.
Generate a short-lived, session-bound token for the Client GraphQL API, scoped to an organization and user.
curl --request POST \ --url "https://api.workos.com/client/token" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT", "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5" } BODY
{ "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InNlc3Npb24..." }
| curl --request POST \ | |
| --url "https://api.workos.com/client/token" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5" | |
| } | |
| BODY |
| { | |
| "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InNlc3Npb24..." | |
| } |
POST/client /tokenReturns