Skip to main content
All API endpoints require authentication using Bearer tokens. This guide explains how to obtain and use tokens.

Getting a Token

You can get an authentication token using the CLI:
This opens your browser for authentication. After successful login, your token is stored locally. To view your current token for API calls:

Using Tokens

Include your token in the Authorization header of every request:

Token Lifecycle

Tokens are JWTs issued by Clerk and have a limited lifetime. The CLI automatically refreshes tokens when needed. If you receive a 401 Unauthorized response, re-authenticate:

Request Headers

Example: Authenticated Request

Multi-Tenant Isolation

Your token identifies your organization. All API requests are automatically scoped to your organization’s namespace. You cannot access resources belonging to other organizations.

Error Responses

Next Steps

Error Codes

Understand API error responses.

Examples

See curl examples for common operations.