Clerk API Keys API

Endpoints for managing API Keys

Operations 8

POST /api_keys Create an API Key #
GET /api_keys Get API Keys #
GET /api_keys/{apiKeyID} Get an API Key by ID #
PATCH /api_keys/{apiKeyID} Update an API Key #
DELETE /api_keys/{apiKeyID} Delete an API Key #
GET /api_keys/{apiKeyID}/secret Get an API Key Secret #
POST /api_keys/{apiKeyID}/revoke Revoke an API Key #
POST /api_keys/verify Verify an API Key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/clerk-com-api-keys-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

clerk-com-api-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Clerk Com API Keys API
  termsOfService: https://clerk.com/terms
  x-logo:
    url: https://clerk.com/_next/image?url=%2Fimages%2Fclerk-logo.svg&w=96&q=75
    altText: Clerk docs
    href: https://clerk.com/docs
  version: '1.0'
  description: 'Operations tagged API Keys across 2 of this provider''s published API definitions: clerk-backend-api-openapi.yml, clerk-frontend-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.clerk.com/v1
- url: https://{domain}.clerk.accounts.dev
  variables:
    domain:
      default: example-destined-camel-13
      description: Your Development Instance Frontend API Domain.
tags:
- name: API Keys
  description: Endpoints for managing API Keys
paths:
  /api_keys:
    post:
      operationId: createApiKey
      summary: Create an API Key
      tags:
      - API Keys
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  minLength: 3
                  maxLength: 25
                  default: api_key
                name:
                  type: string
                  minLength: 3
                  pattern: ^(\S(.*\S)?)?$
                description:
                  type:
                  - string
                  - 'null'
                  maxLength: 255
                subject:
                  type: string
                  pattern: ^(user|org|mch|scim)_\w{27}$
                claims: {}
                scopes:
                  type: array
                  items:
                    type: string
                  default: []
                created_by:
                  type:
                  - string
                  - 'null'
                  pattern: ^user_\w{27}$
                seconds_until_expiration:
                  type:
                  - number
                  - 'null'
                  exclusiveMinimum: 0
              required:
              - name
              - subject
              additionalProperties: false
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - api_key
                  id:
                    type: string
                    pattern: ^ak_[0-9A-Fa-f]{32}$
                    example: ak_3beecc9c60adb5f9b850e91a8ee1e992
                  type:
                    type: string
                    minLength: 3
                    example: api_key
                  subject:
                    type: string
                    pattern: ^(user|org|mch)_\w{27}$
                    example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                  name:
                    type: string
                    example: MY_SERVICE_API_KEY
                  description:
                    type:
                    - string
                    - 'null'
                    maxLength: 255
                    example: This is my API Key
                  claims:
                    example:
                      foo: bar
                  scopes:
                    type: array
                    items:
                      type: string
                    example:
                    - read
                    - write
                  secret:
                    type: string
                    example: ak_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                  revoked:
                    type: boolean
                    example: false
                  revocation_reason:
                    type:
                    - string
                    - 'null'
                    example: Revoked by user
                  expired:
                    type: boolean
                    example: false
                  expiration:
                    type:
                    - number
                    - 'null'
                    description: The timestamp for when the API key will expire, in milliseconds
                    example: 1716883200
                  created_by:
                    type:
                    - string
                    - 'null'
                    pattern: ^user_\w{27}$
                    example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                  last_used_at:
                    type:
                    - number
                    - 'null'
                    description: The timestamp for when the API key was last used, in milliseconds
                    example: 1716883200
                  created_at:
                    type: number
                    description: The timestamp for when the API key was created, in milliseconds
                    example: 1716883200
                  updated_at:
                    type: number
                    description: The timestamp for when the API key was last updated, in milliseconds
                    example: 1716883200
                required:
                - object
                - id
                - type
                - subject
                - name
                - claims
                - scopes
                - secret
                - revoked
                - revocation_reason
                - expired
                - expiration
                - created_by
                - last_used_at
                - created_at
                - updated_at
                additionalProperties: false
        '400':
          description: 400 Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Bad Request
                        long_message:
                          type: string
                          example: 'Invalid ''url_parameter.example'': Failed regex check'
                        code:
                          type: string
                          example: bad_request
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
        '409':
          description: 409 Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: some details about the error
                        long_message:
                          type: string
                          example: some details about the error
                        code:
                          type: string
                          example: some_error_code
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
      security:
      - bearerAuth: []
    get:
      operationId: getApiKeys
      summary: Get API Keys
      tags:
      - API Keys
      parameters:
      - schema:
          type: string
          minLength: 3
          default: api_key
        required: false
        name: type
        in: query
      - schema:
          type: string
          pattern: ^(user|org|mch|scim)_\w{27}$
        required: true
        name: subject
        in: query
      - schema:
          type: string
          enum:
          - 'true'
          - 'false'
          default: 'false'
        required: false
        name: include_invalid
        in: query
      - schema:
          type: number
          minimum: 1
          maximum: 100
          default: 10
        required: false
        name: limit
        in: query
      - schema:
          type:
          - number
          - 'null'
          minimum: 0
          default: 0
        required: false
        name: offset
        in: query
      - schema:
          type: string
        required: false
        name: query
        in: query
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                          enum:
                          - api_key
                        id:
                          type: string
                          pattern: ^ak_[0-9A-Fa-f]{32}$
                          example: ak_3beecc9c60adb5f9b850e91a8ee1e992
                        type:
                          type: string
                          minLength: 3
                          example: api_key
                        subject:
                          type: string
                          pattern: ^(user|org|mch)_\w{27}$
                          example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                        name:
                          type: string
                          example: MY_SERVICE_API_KEY
                        description:
                          type:
                          - string
                          - 'null'
                          maxLength: 255
                          example: This is my API Key
                        claims:
                          example:
                            foo: bar
                        scopes:
                          type: array
                          items:
                            type: string
                          example:
                          - read
                          - write
                        revoked:
                          type: boolean
                          example: false
                        revocation_reason:
                          type:
                          - string
                          - 'null'
                          example: Revoked by user
                        expired:
                          type: boolean
                          example: false
                        expiration:
                          type:
                          - number
                          - 'null'
                          description: The timestamp for when the API key will expire, in milliseconds
                          example: 1716883200
                        created_by:
                          type:
                          - string
                          - 'null'
                          pattern: ^user_\w{27}$
                          example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                        last_used_at:
                          type:
                          - number
                          - 'null'
                          description: The timestamp for when the API key was last used, in milliseconds
                          example: 1716883200
                        created_at:
                          type: number
                          description: The timestamp for when the API key was created, in milliseconds
                          example: 1716883200
                        updated_at:
                          type: number
                          description: The timestamp for when the API key was last updated, in milliseconds
                          example: 1716883200
                      required:
                      - object
                      - id
                      - type
                      - subject
                      - name
                      - claims
                      - scopes
                      - revoked
                      - revocation_reason
                      - expired
                      - expiration
                      - created_by
                      - last_used_at
                      - created_at
                      - updated_at
                      additionalProperties: false
                  total_count:
                    type: number
                required:
                - data
                - total_count
        '400':
          description: 400 Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Bad Request
                        long_message:
                          type: string
                          example: 'Invalid ''url_parameter.example'': Failed regex check'
                        code:
                          type: string
                          example: bad_request
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
        '404':
          description: 404 Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: some details about the error
                        long_message:
                          type: string
                          example: some details about the error
                        code:
                          type: string
                          example: some_error_code
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
      security:
      - bearerAuth: []
    servers:
    - url: https://api.clerk.com/v1
  /api_keys/{apiKeyID}:
    get:
      operationId: getApiKey
      summary: Get an API Key by ID
      tags:
      - API Keys
      parameters:
      - schema:
          type: string
          pattern: ^(ak|api_key)_[0-9A-Fa-f]{32}$
        required: true
        name: apiKeyID
        in: path
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - api_key
                  id:
                    type: string
                    pattern: ^ak_[0-9A-Fa-f]{32}$
                    example: ak_3beecc9c60adb5f9b850e91a8ee1e992
                  type:
                    type: string
                    minLength: 3
                    example: api_key
                  subject:
                    type: string
                    pattern: ^(user|org|mch)_\w{27}$
                    example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                  name:
                    type: string
                    example: MY_SERVICE_API_KEY
                  description:
                    type:
                    - string
                    - 'null'
                    maxLength: 255
                    example: This is my API Key
                  claims:
                    example:
                      foo: bar
                  scopes:
                    type: array
                    items:
                      type: string
                    example:
                    - read
                    - write
                  revoked:
                    type: boolean
                    example: false
                  revocation_reason:
                    type:
                    - string
                    - 'null'
                    example: Revoked by user
                  expired:
                    type: boolean
                    example: false
                  expiration:
                    type:
                    - number
                    - 'null'
                    description: The timestamp for when the API key will expire, in milliseconds
                    example: 1716883200
                  created_by:
                    type:
                    - string
                    - 'null'
                    pattern: ^user_\w{27}$
                    example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                  last_used_at:
                    type:
                    - number
                    - 'null'
                    description: The timestamp for when the API key was last used, in milliseconds
                    example: 1716883200
                  created_at:
                    type: number
                    description: The timestamp for when the API key was created, in milliseconds
                    example: 1716883200
                  updated_at:
                    type: number
                    description: The timestamp for when the API key was last updated, in milliseconds
                    example: 1716883200
                required:
                - object
                - id
                - type
                - subject
                - name
                - claims
                - scopes
                - revoked
                - revocation_reason
                - expired
                - expiration
                - created_by
                - last_used_at
                - created_at
                - updated_at
                additionalProperties: false
        '400':
          description: 400 Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Bad Request
                        long_message:
                          type: string
                          example: 'Invalid ''url_parameter.example'': Failed regex check'
                        code:
                          type: string
                          example: bad_request
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
        '404':
          description: 404 Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: some details about the error
                        long_message:
                          type: string
                          example: some details about the error
                        code:
                          type: string
                          example: some_error_code
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
      security:
      - bearerAuth: []
    patch:
      operationId: updateApiKey
      summary: Update an API Key
      tags:
      - API Keys
      parameters:
      - schema:
          type: string
          pattern: ^(ak|api_key)_[0-9A-Fa-f]{32}$
        required: true
        name: apiKeyID
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                claims: {}
                scopes:
                  type: array
                  items:
                    type: string
                description:
                  type:
                  - string
                  - 'null'
                  maxLength: 255
                subject:
                  type: string
                  pattern: ^(user|org|mch|scim)_\w{27}$
                seconds_until_expiration:
                  type:
                  - number
                  - 'null'
                  exclusiveMinimum: 0
              additionalProperties: false
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - api_key
                  id:
                    type: string
                    pattern: ^ak_[0-9A-Fa-f]{32}$
                    example: ak_3beecc9c60adb5f9b850e91a8ee1e992
                  type:
                    type: string
                    minLength: 3
                    example: api_key
                  subject:
                    type: string
                    pattern: ^(user|org|mch)_\w{27}$
                    example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                  name:
                    type: string
                    example: MY_SERVICE_API_KEY
                  description:
                    type:
                    - string
                    - 'null'
                    maxLength: 255
                    example: This is my API Key
                  claims:
                    example:
                      foo: bar
                  scopes:
                    type: array
                    items:
                      type: string
                    example:
                    - read
                    - write
                  revoked:
                    type: boolean
                    example: false
                  revocation_reason:
                    type:
                    - string
                    - 'null'
                    example: Revoked by user
                  expired:
                    type: boolean
                    example: false
                  expiration:
                    type:
                    - number
                    - 'null'
                    description: The timestamp for when the API key will expire, in milliseconds
                    example: 1716883200
                  created_by:
                    type:
                    - string
                    - 'null'
                    pattern: ^user_\w{27}$
                    example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
                  last_used_at:
                    type:
                    - number
                    - 'null'
                    description: The timestamp for when the API key was last used, in milliseconds
                    example: 1716883200
                  created_at:
                    type: number
                    description: The timestamp for when the API key was created, in milliseconds
                    example: 1716883200
                  updated_at:
                    type: number
                    description: The timestamp for when the API key was last updated, in milliseconds
                    example: 1716883200
                required:
                - object
                - id
                - type
                - subject
                - name
                - claims
                - scopes
                - revoked
                - revocation_reason
                - expired
                - expiration
                - created_by
                - last_used_at
                - created_at
                - updated_at
                additionalProperties: false
        '400':
          description: 400 Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Bad Request
                        long_message:
                          type: string
                          example: 'Invalid ''url_parameter.example'': Failed regex check'
                        code:
                          type: string
                          example: bad_request
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
        '404':
          description: 404 Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: some details about the error
                        long_message:
                          type: string
                          example: some details about the error
                        code:
                          type: string
                          example: some_error_code
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
      security:
      - bearerAuth: []
    delete:
      operationId: deleteApiKey
      summary: Delete an API Key
      tags:
      - API Keys
      parameters:
      - schema:
          type: string
          pattern: ^(ak|api_key)_[0-9A-Fa-f]{32}$
        required: true
        name: apiKeyID
        in: path
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: ak_3beecc9c60adb5f9b850e91a8ee1e992
                  object:
                    type: string
                    enum:
                    - api_key
                  deleted:
                    type: boolean
                    enum:
                    - true
                required:
                - id
                - object
                - deleted
        '400':
          description: 400 Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Bad Request
                        long_message:
                          type: string
                          example: 'Invalid ''url_parameter.example'': Failed regex check'
                        code:
                          type: string
                          example: bad_request
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
        '404':
          description: 404 Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: some details about the error
                        long_message:
                          type: string
                          example: some details about the error
                        code:
                          type: string
                          example: some_error_code
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
      security:
      - bearerAuth: []
    servers:
    - url: https://api.clerk.com/v1
  /api_keys/{apiKeyID}/secret:
    get:
      operationId: getApiKeySecret
      summary: Get an API Key Secret
      tags:
      - API Keys
      parameters:
      - schema:
          type: string
          pattern: ^(ak|api_key)_[0-9A-Fa-f]{32}$
        required: true
        name: apiKeyID
        in: path
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  secret:
                    type: string
                required:
                - secret
        '400':
          description: 400 Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Bad Request
                        long_message:
                          type: string
                          example: 'Invalid ''url_parameter.example'': Failed regex check'
                        code:
                          type: string
                          example: bad_request
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
        '404':
          description: 404 Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: some details about the error
                        long_message:
                          type: string
                          example: some details about the error
                        code:
                          type: string
                          example: some_error_code
                      required:
                      - message
                      - long_message
                      - code
                required:
                - errors
      security:
      - bearerAuth: []
    servers:
    - url: https://api.clerk.com/v1
  /api_keys/{apiKeyID}/revoke:
    post:
      operationId: revokeApiKey
      summary: Revoke an API Key
      tags:
      - API Keys
      parameters:
      - schema:
          type: string
          pattern: ^(ak|api_key)_[0-9A-Fa-f]{32}$
        required: true
        name: apiKeyID
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revocation_reason:
                  type:
                  - string
                  - 'null'
              additionalProperties: false
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - api_key
                  id:
                    type: string
                    pattern: ^ak_[0-9A-Fa-

# --- truncated at 32 KB (44 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/clerk-com/refs/heads/main/openapi/clerk-com-api-keys-api-openapi.yml