Skip to main content

Update API token

PUT <your-unleash-url>/api/admin/api-tokens/:token

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Updates an existing API token with a new expiry date. The token path parameter is the token's secret. If the token does not exist, this endpoint returns a 200 OK, but does nothing.

Request

Path Parameters

  • token string required

Body

required

updateApiTokenSchema

  • expiresAt date-time required

    The new time when this token should expire.

Responses

This response has no body.

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Request

Base URL
<your-unleash-url>
Security Scheme
apiKey
token — path required
Body required
{
"expiresAt": "2023-09-04T11:26:24+02:00"
}
curl / cURL
curl -L -X PUT '<your-unleash-url>/api/admin/api-tokens/:token' \
-H 'Content-Type: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
--data-raw '{
"expiresAt": "2023-09-04T11:26:24+02:00"
}'