APIApi keys

Create a new API key

Creates a new API key for the authenticated user. Limited to 25 keys per account.

Creates a new API key for the authenticated user. Limited to 25 keys per account.

POST
/api/client/account/api-keys

Authorization

bearerAuth
AuthorizationBearer <token>

Enter your API token in the format: Bearer {token}

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/client/account/api-keys" \  -H "Content-Type: application/json" \  -d '{    "description": "My Personal API Key"  }'
{
  "object": "api_key",
  "attributes": {
    "identifier": "ptlc_1a2b3c4d5e6f",
    "description": "My Personal API Key",
    "allowed_ips": [
      "192.168.1.1"
    ],
    "last_used_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "secret_token": "ptlc_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t"
  }
}
{
  "message": "You have reached the account limit for number of API keys."
}
Empty
Empty