Create a key

POST /keys

Create a key



Create a key

  • name string Required
  • scopes array[string]

    An authorization scope associated with a key. Any request that is signed by a JWT with this key will have access to the scopes associated with that key.

    Values are events.write,,,, instances.write, instances.admin,, machines.write, machines.admin,, machine-versions.write,,, org.write, org.keys.write, org-members.write,, or tokens.admin.

  • use string

    The intended use for this key. This is a shorthand way to set a reasonable set of scopes. You must either pass scopes or use.

    Values are production or ci.


  • 200

    New key

    Hide response attributes Show response attributes object
    • id string Required

      An identifier for a key

    • key string Required
POST /keys
curl \
 -X POST \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","scopes":["events.write"],"use":"production"}'
Request example
  "name": "string",
  "scopes": [
  "use": "production"
Response examples (200)
  "id": "sbk_nXzdtCxESemgtxS5JX-LrA",
  "key": "string"