POST
/
pat
{
  "id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
  "personalAccessToken": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24"
}

Authorizations

Authorization
string
header
required

This endpoint may require elevated permissions, depending on server settings. For details see https://docs.nhost.io/guides/auth/elevated-permissions

Body

application/json
expiresAt
string
required

Expiration date of the PAT

metadata
object
Example:
{ "name": "my-pat", "used-by": "my-app-cli" }

Response

200 - application/json
Successfully created a Personal Access Token
id
string
required

ID of the PAT

Example:

"2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24"

personalAccessToken
string
required

PAT

Example:

"2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24"