Skip to main content

Regenerate Access Token

This API regenerates the API key of an existing access token identified by its unique ID. A new API key is generated while the token configuration remains unchanged.

Endpoint Details

URL/v1/auth/access-tokens/id/regenerate
MethodPOST
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Path

To regenerate the API key of a specific access token, use the following request format:

/v1/auth/access-tokens/f1a84190-e12c-43a2-b439-80461199e8c3/regenerate

Path Parameter

ParameterTypeDescription
idUUIDUnique identifier of the access token

Response

Here is an example response after the request has been successfully processed:

Response
{
"access_token": {
"id": "f1a84190-e12c-43a2-b439-80461199e8c3",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Tes Jeje",
"description": "coba tes",
"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": 1784183975,
"updated_at": 1784185151,
"assigned_user_ids": [
"0a937c60-0ed4-4d06-870a-2e284b54287d"
]
},
"api_key": "c781438ba2dc909dd1ab7455c0ac07e3bb45a453218f91965fb6479186554b97"
}

Field Descriptions

FieldTypeDescription
idUUIDUnique identifier of the access token
tenant_idUUIDIdentifier of the tenant that owns the access token
nameStringName of the access token
descriptionStringDescription of the access token
group_idUUIDIdentifier of the associated group
allowed_ipsArrayList of allowed IP addresses
created_byUUIDIdentifier of the user who created the access token
updated_byUUIDIdentifier of the user who last updated the access token
created_atIntegerCreation timestamp in Unix format
updated_atIntegerLast update timestamp in Unix format
assigned_user_idsArrayList of user IDs assigned to the access token
api_keyStringNewly generated API key used to authenticate requests

info
  • A valid Bearer Token is required to access this endpoint.
  • The id path parameter must reference an existing access token.
  • Regenerating an access token produces a new api_key and invalidates the previous one. Any client still using the old key will no longer be able to authenticate.
  • The new api_key is returned only once. Store it securely, as it cannot be retrieved again.
  • Unix timestamp fields can be converted to a human-readable date and time format as needed.