Pterodactyldocs
Client account

Create API key

Generates a new API key

POST/api/client/account/api-keys

Authorization

ClientToken
AuthorizationBearer <token>

Client API key (generated at /account/api)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/client/account/api-keys" \  -H "Content-Type: application/json" \  -d '{    "description": "Restricted IPs",    "allowed_ips": [      "127.0.0.1",      "192.168.0.1"    ]  }'
{  "object": "api_key",  "attributes": {    "identifier": "yjAZbHMyKrv9YRZ0",    "description": "Restricted IPs",    "allowed_ips": [      "127.0.0.1",      "192.168.0.1"    ],    "last_used_at": null,    "created_at": "2020-08-17T04:44:42+01:00"  },  "meta": {    "secret_token": "wiHiMbmgjLOkA2fPzRD6KdMe7Q9Cqaka"  }}