Platform API

Provision Clerk apps
in 30 seconds.

The Platform API lets you create applications, manage instances, and configure domains programmatically. Built for teams that ship fast.

View source
terminal
$ clerk apps create --name "my-saas" -o json

{
  "application_id": "app_2x8K...",
  "instances": [{
    "environment_type": "development",
    "publishable_key": "pk_test_...",
    "secret_key": "sk_test_..."
  }]
}

$ clerk apps instances list app_2x8K... --include-secret-keys
# Production + Development keys, ready to use.
One-shot provisioning
Create a fully configured Clerk app with a single CLI command. Get publishable and secret keys instantly.
Secret management
Retrieve development and production keys programmatically. No dashboard clicking required.
Domain automation
Configure custom domains and DNS records via the API. Automate your entire provisioning pipeline.
AI-native workflows
Built for AI coding tools like Cursor, Windsurf, and v0. Let agents provision auth autonomously.

Use cases

Marketplace auth

Provision isolated Clerk instances for each tenant in your marketplace.

CI/CD pipelines

Spin up preview environments with their own auth stack. Tear down on merge.

White-label SaaS

Let customers bring their own domain with auto-configured Clerk auth.

Start building

Install the Clerk CLI and provision your first app in under a minute.

terminal
$ bun add -g @clerk/cli
$ clerk login
$ clerk apps create --name "my-app" -o json