Update Access Token
This API updates an existing access token, including its name, description, group assignment, IP restriction, expiration, and assigned users.
Endpoint Details
| URL | /v1/auth/access-tokens/id |
| Method | PUT |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Path
To update an existing access token, use the following request format:
/v1/auth/access-tokens/cc4a3b9a-bb48-49cf-8ee4-a07f88c3ff6d
Path Parameter
| Parameter | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the access token to update |
Request Body
Use the following format to make a request:
JSON Request
{
"name": "dummy",
"description": "dummy descrption",
"group_id": "81ad4d05-d11a-4809-b1f2-cc000c086730",
"ip_restriction": false,
"allowed_ips": [
""
],
"expiration": false,
"expired_at": 0,
"assigned_user_ids": [
"0a937c60-0ed4-4d06-870a-2e284b54287d"
]
}
Body Parameters
| Parameter | Type | Description |
|---|---|---|
| name | String | Updated name of the access token |
| description | String | Optional description of the access token |
| group_id | UUID | Identifier of the group associated with the access token |
| ip_restriction | Boolean | Indicates whether the access token is restricted to specific IPs |
| allowed_ips | Array | List of allowed IP addresses when ip_restriction is enabled |
| expiration | Boolean | Indicates whether the access token has an expiration |
| expired_at | Integer | Expiration timestamp in Unix format when expiration is enabled |
| assigned_user_ids | Array | List of user IDs assigned to the access token |
Response
Here is an example response when the data is successfully updated:
Response
{
"access_token": {
"id": "cc4a3b9a-bb48-49cf-8ee4-a07f88c3ff6d",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Dummy",
"description": "dummy descrption",
"group_id": "81ad4d05-d11a-4809-b1f2-cc000c086730",
"allowed_ips": [
""
],
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_at": 1784189995,
"updated_at": 1784190362,
"assigned_user_ids": [
"0a937c60-0ed4-4d06-870a-2e284b54287d"
]
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the access token |
| tenant_id | UUID | Identifier of the tenant that owns the access token |
| name | String | Name of the access token |
| description | String | Description of the access token |
| group_id | UUID | Identifier of the associated group |
| allowed_ips | Array | List of allowed IP addresses |
| created_by | UUID | Identifier of the user who created the access token |
| updated_by | UUID | Identifier of the user who last updated the access token |
| created_at | Integer | Creation timestamp in Unix format |
| updated_at | Integer | Last update timestamp in Unix format |
| assigned_user_ids | Array | List of user IDs assigned to the access token |
info
- A valid Bearer Token is required to access this endpoint.
- The
idpath parameter must reference an existing access token. - Unix timestamp fields can be converted to a human-readable date and time format as needed.