# Generate a new personal access token This endpoint allows clients to generate a new personal access token for a specific user and tenant. Endpoint: POST /authn2/v0/personal-access-token/ Version: 1.0.0 ## Request fields (application/json): - `name` (string, required) name for the token. - `description` (string, required) description for the token. - `expiry_at` (integer, required) exipy date for token. ## Response 200 fields (application/json): - `id` (string) Unique ID for the generated token. - `name` (string) Name for the token. - `description` (string) Description for the token. - `created_at` (string) Timestamp indicating when the token was created. - `updated_at` (string) Timestamp indicating when the token was last updated. - `token` (string) The generated access token value. - `prefix` (string) Prefix for the generated token value. - `expiry_at` (integer) exipy date for token. ## Response 400 fields (application/json): - `status` (integer) Either 'status' or 'code' will be present, but not both. - `code` (integer) Either 'status' or 'code' will be present, but not both. - `error` (string) Either 'error' or 'errors' will be present, but not both. - `errors` (array) Either 'error' or 'errors' will be present, but not both. - `message` (string) ## Response 401 fields (application/json): - `status` (integer) Either 'status' or 'code' will be present, but not both. - `code` (integer) Either 'status' or 'code' will be present, but not both. - `error` (string) Either 'error' or 'errors' will be present, but not both. - `errors` (array) Either 'error' or 'errors' will be present, but not both. - `message` (string)