Skip to main content
PATCH
/
api
/
v1
/
organizations
/
{org_id}
/
users
/
{user_id}
/
token
Update User Token
curl --request PATCH \
  --url https://anaconda.com/api/v1/organizations/{org_id}/users/{user_id}/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expires_at": "2023-11-07T05:31:56Z",
  "expiration_tolerance_months": 0,
  "is_renewal": false
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
Renewing your organization’s subscription does not automatically extend existing tokens. Use this endpoint to update token expiration dates after renewal.

Authorizations

Authorization
string
header
required

Bearer token obtained by authenticating with service account credentials (client_id and client_secret).

See the Getting started page for the full authentication flow.

Path Parameters

org_id
string
required

Your organization ID, found in your organization's URL: anaconda.com/app/organizations/<ORG_ID>/.

user_id
string<uuid>
required

The unique identifier of the user whose token to update.

Body

application/json
expires_at
string<date-time> | null

The new expiration date and time for the token in ISO 8601 format. Ignored when is_renewal is true.

expiration_tolerance_months
integer
default:0

Number of additional months to extend the token beyond the expires_at date as a grace period.

is_renewal
boolean
default:false

Set to true to automatically extend the token expiration to match your organization's subscription end date. When true, the expires_at field is ignored.

Response

Token updated successfully