Skip to content

Create API key

POST/v1/api-keys/create/

Create a named API key. The raw key is returned only once, in this response; store it securely.

Body

Sent as application/json.

  • namestringRequired

    Unique name for the key (per user).

  • expires_in_daysinteger

    Days until the key expires. Omit for a key that does not expire.

Returns

201 with a JSON object.

Show response attributesHide response attributes
  • namestringRequired
  • uidstring or nullRequired
  • create_timestring or nullRequired
  • update_timestring or nullRequired
  • delete_timestring or nullRequired
  • detailstringRequired
  • api_key_idstringRequired
  • key_namestringRequired
  • activebooleanRequired
  • expires_atstring or nullRequired
  • raw_keystringRequired

Errors

Every error has the same JSON body. See Errors for the error codes and when to retry.

  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 410Gone
  • 413Request Entity Too Large
  • 422Unprocessable Entity
  • 429Too Many Requests
  • 500Internal Server Error