Personal access tokens
Update a personal access token
Changed onUpdates one of your personal access tokens. Send only what you want to change.
- The expiration can only move later, up to a year from now. An expired token can't be extended. Send it as expires_in or expires_at, not both.
- grants replaces all of the token's grants.
- Switching to same_as_user drops the token's grants. Switching back to grants requires the grants it should have.
patch/pat/{id}
Request
- Base URLhttps://api.nullplatform.com
- URLhttps://api.nullplatform.com/pat/{id}
- AuthHTTP bearer
Path parameters
idinteger required
The unique identifier for the personal access token.
Request body
Example request
{
"name": "local-scripts",
"expires_in": 7776000,
"expires_at": "2027-04-06T00:00:00Z",
"access": "same_as_user",
"grants": [
{
"nrn": "organization=1:account=1:namespace=1:application=4",
"role_slug": "machine:ci"
}
],
"tags": [
{
"key": "team",
"value": "platform"
}
]
}Response
The operation was successful.
Example response
{
"id": 1234,
"name": "local-scripts",
"masked_api_key": "AAAAxxxxxPTs=",
"access": "same_as_user",
"tags": [
{
"key": "team",
"value": "platform"
}
],
"grants": [
{
"id": 5678,
"nrn": "organization=1:account=2",
"role_id": 700317756,
"role_slug": "developer",
"actions": [
"application:read",
"deployment:create"
]
}
],
"personal": true,
"owner_id": 42,
"acting_user_id": 42,
"last_used_at": "2026-10-08T12:00:00.000Z",
"expires_at": "2027-01-06T00:00:00.000Z",
"created_at": "2026-10-08T00:00:00.000Z",
"updated_at": "2026-10-08T00:00:00.000Z"
}Changes
- info
added the new optional request property
- info
- info
endpoint added
- info