Skip to content
Navigation

Create an API key

POST
/v1/keys

Create a key fixed to the current project and environment. Store the full API key immediately.

Authorization

  • browserSession
    optional
    API key in cookie
  • localBrowserSession
    optional
    API key in cookie

Header parameters

  • X-Simplcron-Environment
    optional
    production
    or
    development

    Environment for a browser session. Bearer keys always use their fixed environment.

    default: "production"

Request body JSON required

  • name
    string
    required
    maxLength: 80 · minLength: 1
  • permissions
    optional
    array of
    string
    ·
    one of 8 values
    Allowed values: tasks:read, tasks:write, runs:read, runs:write, schedules:read, schedules:write, webhooks:read, webhooks:write

Returns

201

Key created

JSON
  • key
    object
    required
    • id
      string
      required
    • name
      string
      required
      maxLength: 80 · minLength: 1
    • prefix
      string
      required
    • createdAt
      string
      required
      format: date-time
    • permissions
      optional
      array of
      string
      ·
      one of 8 values
      Allowed values: tasks:read, tasks:write, runs:read, runs:write, schedules:read, schedules:write, webhooks:read, webhooks:write
    • revokedAt
      optional

      Any of the following:

      • string
      • null
  • secret
    string
    required

    One-time bearer API key.

400

Invalid input
JSON
  • error
    string
    required

401

Authentication is required
JSON
  • error
    string
    required

403

The credential lacks permission
JSON
  • error
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close