Skip to main content
POST
/
v1
/
manage
/
apikey
/
{id}
/
expiry
Update API key expiry
curl --request POST \
  --url https://api-v2.requesty.ai/v1/manage/apikey/{id}/expiry \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expires_at": "2025-12-31T23:59:59Z"
}
'
Update the expiry date for an API key. If expires_at is not set or is null, the current expiry will be removed, making the API key non-expiring.
Setting an expiry date helps ensure API keys are automatically invalidated after a certain time period, improving security for temporary access scenarios.
You cannot update the expiry for an API key that has already expired. Once an API key is expired, it cannot be un-expired.

Authorizations

Authorization
string
header
required

API key for authentication

Path Parameters

id
string<uuid>
required

Body

application/json
expires_at
string<date-time>

Expiry date in RFC3339 format (e.g., 2025-12-31T23:59:59Z). If not set or null, the current expiry will be removed, making the API key non-expiring.

Example:

"2025-12-31T23:59:59Z"

Response

Expiry updated successfully