Справочник APIConsumerConsumer.auth keys
Create an auth key for headless device onboarding
Эта страница пока доступна только на английском языке. Руководства переведены; автоматически генерируемый справочник API публикуется на английском.
Creates a project-scoped auth key under the authenticated user's consumer account. The raw key value is returned only once in the creation response.
Authorization
bearer_auth AuthorizationBearer <token>
In: header
Header Parameters
X-Project-Id*string
UUID of the project that scopes consumer accounts, devices, sessions, and VSpaces for the request.
Format
uuidRequest 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/consumer/v1/auth-keys" \ -H "X-Project-Id: 11111111-1111-1111-1111-111111111111" \ -H "Content-Type: application/json" \ -d '{ "ephemeral": false, "expires_in": 2592000, "max_uses": 100, "name": "Production servers", "reusable": true, "tags": [ "role:server", "env:production" ] }'{ "created_at": "2026-04-13T00:00:00Z", "ephemeral": false, "expires_at": "2026-05-13T00:00:00Z", "id": "55555555-5555-5555-5555-555555555555", "key": "fvpn-ak_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "key_prefix": "fvpn-ak_a1b2c3d4...e5f6", "max_uses": 100, "name": "Production servers", "reusable": true, "revoked_at": null, "tags": [ "role:server", "env:production" ], "use_count": 0}{ "detail": "Pool slug must be unique.", "instance": "urn:forestvpn:trace:a1b2c3d4", "title": "Validation Error", "type": "https://fvpn.net/errors/validation"}{ "detail": "Pool slug must be unique.", "instance": "urn:forestvpn:trace:a1b2c3d4", "title": "Validation Error", "type": "https://fvpn.net/errors/validation"}{ "detail": "Pool slug must be unique.", "instance": "urn:forestvpn:trace:a1b2c3d4", "title": "Validation Error", "type": "https://fvpn.net/errors/validation"}