How to hit the Clerk API

Clerk's Backend API at https://api.clerk.com/v1 manages the users and organizations behind your app's sign-in. It uses your secret key, so it's for servers and scripts, never for shipped front-end code.

Authentication

Copy the secret key (sk_test_… or sk_live_…) from the Clerk dashboard under API keys. Send it as Authorization: Bearer <key>. In the examples it's written {{CLERK_SECRET_KEY}}.

Full reference: https://clerk.com/docs/reference/backend-api

List users

Newest first by default. Filter with email_address= or query=.

curl "https://api.clerk.com/v1/users?limit=10" \
  -H "Authorization: Bearer {{CLERK_SECRET_KEY}}"
Run in PostTaco

Get a user

Emails, phone numbers, external accounts, and metadata for one user id (user_…).

curl https://api.clerk.com/v1/users/{{USER_ID}} \
  -H "Authorization: Bearer {{CLERK_SECRET_KEY}}"
Run in PostTaco

Invite a user

Clerk emails them a sign-up link.

curl -X POST https://api.clerk.com/v1/invitations \
  -H "Authorization: Bearer {{CLERK_SECRET_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"email_address": "[email protected]"}'
Run in PostTaco

List organizations

Requires Organizations to be turned on for your Clerk app.

curl "https://api.clerk.com/v1/organizations?limit=10" \
  -H "Authorization: Bearer {{CLERK_SECRET_KEY}}"
Run in PostTaco