v1

latestOpenAPI 3.0.1Apache 2.02026-08-063494581.6 MB
esper_cloud_api_Personal Access Token

Renew personal access token

Renews a personal access token by updating its expiry date.

Use this endpoint to extend the validity of an existing API key before it expires, without needing to generate a new key and update credentials in all systems that use it.

About Renew Personal Access Token

Personal access tokens are API keys with an expiry date set at creation. This endpoint extends the expiry in place — the API key value itself does not change, only the expiry_at timestamp is updated. Personal access tokens are scoped to the authenticated caller — only API keys belonging to the user associated with the API key making the request can be renewed; those belonging to other users cannot be managed here. The API key value is returned in the response. API keys created with expiry_at: -1 (no expiry) can also be updated to add an expiry via this endpoint.

Key Fields / Request Body

expiry_at — (required) the new expiry date as a Unix timestamp integer; set to -1 for no expiry

Key Fields (Response)

id — the UUID of the token record

token — the API key value (unchanged); returned here for convenience

expiry_at — the updated expiry timestamp as set in the request

updated_at — timestamp confirming when the renewal was applied

Common Use Cases

Extending an API key's validity before it expires to avoid service interruption in automated integrations

Converting an API key from a fixed expiry to no expiry (or vice versa) by updating expiry_at

Renewing an API key as part of a scheduled credential rotation policy

Best Practices

Use GET /authn2/v0/personal-access-token/ to retrieve the personal_access_token_id if it was not stored at creation time — match by name or prefix

Renew API keys before they expire rather than after — a lapsed key will cause API calls to fail until renewed or replaced

Keep a record of each API key's expiry_at in your secrets management system so renewals can be scheduled proactively

Workflow

Call GET /authn2/v0/personal-access-token/ to identify the target token and retrieve its id if needed

PUT to this endpoint with the new expiry_at value

Confirm the updated expiry_at in the response

put/authn2/v0/personal-access-token/{personal_access_token_id}

Path parameters

personal_access_token_idstring uuid required

Personal Access Token Id

Request body

expiry_atinteger required

exipy date for token.

Response

OK

idstring uuid

Unique ID for the generated token.

namestring

Name for the token.

descriptionstring

Description for the token.

created_atstring timestamp

Timestamp indicating when the token was created.

updated_atstring timestamp

Timestamp indicating when the token was last updated.

tokenstring

The generated access token value.

prefixstring

Prefix for the generated token value.

expiry_atinteger

exipy date for token.

legacy_token_idinteger

token id corresponding to legacy system

legacy_developer_app_idstring

developer app id corresponding to legacy system