Pterodactyldocs
Admin A P I

Create API key

Creates a new application API key and returns the plaintext secret token once.

POST/api/admin/api-keys
AuthorizationBearer <token>

Application API requests require an application API token, or a client API token, that belongs to a root administrator. Admin API requests require a client API token that belongs to a root administrator, and reject application API tokens. Client API requests require a client API token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/admin/api-keys" \  -H "Content-Type: application/json" \  -d '{    "memo": "example"  }'
{  "object": "api_key",  "attributes": {    "identifier": "ptla_XXEfTMoV80W",    "memo": "Test Function Key",    "created_by": {      "id": 1,      "username": "admin",      "email": "[email protected]"    },    "last_used_at": "string",    "created_at": "2026-09-22T14:45:26+00:00",    "r_servers": 0,    "r_nodes": 0,    "r_allocations": 0,    "r_users": 0,    "r_locations": 0,    "r_eggs": 0,    "r_database_hosts": 0,    "r_server_databases": 0  },  "meta": {    "secret_token": "ptla_1234567890abcdef"  }}