Create a new Client Key

POST /api/0/projects/{organization_slug}/{project_slug}/keys/

Create a new client key bound to a project. The key’s secret and public key are generated by the server.

Path Parameters:
  • organization_slug (string)

    the slug of the organization the client keys belong to.

  • project_slug (string)

    the slug of the project the client keys belong to.

Parameters:
  • name (string)

    the name for the new key.

Method: POST
Path: /api/0/projects/{organization_slug}/{project_slug}/keys/

Example

POST /api/0/projects/the-interstellar-jurisdiction/pump-station/keys/ HTTP/1.1
Host: sentry.io
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Fabulous Key"
}
HTTP/1.1 201 CREATED
Content-Length: 906
X-XSS-Protection: 1; mode=block
Content-Language: en
X-Content-Type-Options: nosniff
Vary: Accept-Language, Cookie
Allow: GET, POST, HEAD, OPTIONS
X-Frame-Options: deny
Content-Type: application/json

{
  "browserSdk": {
    "choices": [
      [
        "latest", 
        "latest"
      ], 
      [
        "4.x", 
        "4.x"
      ]
    ]
  }, 
  "browserSdkVersion": "4.x", 
  "dateCreated": "2018-11-06T21:20:07.941Z", 
  "dsn": {
    "cdn": "https://sentry.io/js-sdk-loader/cec9dfceb0b74c1c9a5e3c135585f364.min.js", 
    "csp": "https://sentry.io/api/2/csp-report/?sentry_key=cec9dfceb0b74c1c9a5e3c135585f364", 
    "minidump": "https://sentry.io/api/2/minidump/?sentry_key=cec9dfceb0b74c1c9a5e3c135585f364", 
    "public": "https://cec9dfceb0b74c1c9a5e3c135585f364@sentry.io/2", 
    "secret": "https://cec9dfceb0b74c1c9a5e3c135585f364:4f6a592349e249c5906918393766718d@sentry.io/2", 
    "security": "https://sentry.io/api/2/security/?sentry_key=cec9dfceb0b74c1c9a5e3c135585f364"
  }, 
  "id": "cec9dfceb0b74c1c9a5e3c135585f364", 
  "isActive": true, 
  "label": "Fabulous Key", 
  "name": "Fabulous Key", 
  "projectId": 2, 
  "public": "cec9dfceb0b74c1c9a5e3c135585f364", 
  "rateLimit": null, 
  "secret": "4f6a592349e249c5906918393766718d"
}