Skip to content

Update API key

Request

Update an API key's label, active status, expiration date, or scopes. Pass null for expires_at to remove expiration.

Security
Bearer
Path
token_idintegerrequired
Bodyrequired
namestring

Human-readable label for the token, shown in the token list.

activeboolean

Set to false to deactivate the token, or true to reactivate it.

expires_atstring or null, (date-time)

Expiration timestamp (ISO 8601). Pass null to remove the expiration and make the token non-expiring.

scopesArray of strings

Replacement list of scopes for the token. Available value: all.

curl -i -X PATCH \
  'https://api-dashboard.influencers.club/public/v1/accounts/tokens/{token_id}/' \
  -H 'Authorization: Bearer <YOUR_API_KEY_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "active": true,
    "expires_at": "2019-08-24T14:15:22Z",
    "scopes": [
      "string"
    ]
  }'

Responses

Bodyapplication/json
idintegerrequired

Unique identifier for the API key token.

namestringrequired

Human-readable label for the token.

scopesArray of stringsrequired

Scopes granted to the token.

activebooleanrequired

Whether the token is currently active.

expires_atstring or null, (date-time)

Expiration timestamp, or null if the token never expires.

tokenstring

The API key value used as the Bearer credential. Returned in full on every read.

created_atstring, (date-time)required

When the token was created.

last_used_atstring or null, (date-time)

When the token was last used to authenticate a request, or null if never used.

Response
{ "id": 0, "name": "string", "scopes": [ "string" ], "active": true, "expires_at": "2019-08-24T14:15:22Z", "token": "string", "created_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z" }