Create a personal access token
POST
A personal access token acts as the caller, limited to permissions and firewalls.
header
AuthorizationBearer <token>A personal or service access token, sent as Authorization: Bearer <token>. See access tokens.
namespace*stringThe namespace id.
application/json- body
An access token to create. Whether it is a personal or a service token follows from the operation.
name*stringA name to recognise the token by.
permissions*array<>The permissions the token grants. They cannot exceed the caller's own.
firewalls*array<string>Restricts the token to these firewalls. Empty means every firewall its permissions cover.
validForHours*integerHow long the token is valid, in hours. Defaults to 12; at most two years.
The new token. It is returned only once.
application/json- response
A new access token.
token*stringThe token. It is returned only here and cannot be read back later.
expiresAt*stringWhen the token expires.
Format
date-timecurl -X POST 'https://eu-sov-1.bytesafecloud.eu/v1/my-namespace-id/tokens/personal' \ -H 'Content-Type: application/json' \ -d '{ "firewalls": [ "npm-main" ], "name": "ci-pipeline", "permissions": [ "fw:access" ], "validForHours": 720}'{ "token": "pat-0b8e4d2a-7c61-4f39-a5e0-d17f3b96c482", "expiresAt": "2026-04-01T09:30:00Z"}