Account
Create API key
Generates a new API key
POST
/api/client/account/api-keysAuthorization
ClientToken AuthorizationBearer <token>
Client API key (generated at /account/api)
In: header
Request Body
application/json
description*string
Note for the API key
allowed_ips?array<>
Restrict key usage to these IP addresses; max 50
Response Body
application/json
curl -X POST "https://pterodactyl.file.properties/api/client/account/api-keys" \ -H "Authorization: Bearer ptlc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Accept: application/json" \ -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"
}
}