Skip to main content
POST
/
tokens
/
{id}
/
regenerate
cURL
curl --request POST \
  --url https://api.axiom.co/v2/tokens/{id}/regenerate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "existingTokenExpiresAt": "2023-11-07T05:31:56Z",
  "newToken": {
    "name": "<string>",
    "datasetCapabilities": {},
    "description": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z",
    "orgCapabilities": {
      "annotations": [
        "create"
      ],
      "apiTokens": [
        "create"
      ],
      "auditLog": [
        "read"
      ],
      "billing": [
        "read"
      ],
      "dashboards": [
        "create"
      ],
      "datasets": [
        "create"
      ],
      "endpoints": [
        "create"
      ],
      "flows": [
        "create"
      ],
      "integrations": [
        "create"
      ],
      "monitors": [
        "create"
      ],
      "notifiers": [
        "create"
      ],
      "rbac": [
        "create"
      ],
      "sharedAccessKeys": [
        "read"
      ],
      "users": [
        "create"
      ],
      "views": [
        "create"
      ]
    },
    "viewCapabilities": {}
  },
  "newTokenExpiresAt": "2023-11-07T05:31:56Z"
}
'
{
  "datasetCapabilities": {},
  "id": "<string>",
  "name": "<string>",
  "orgCapabilities": {
    "annotations": [
      "create"
    ],
    "apiTokens": [
      "create"
    ],
    "auditLog": [
      "read"
    ],
    "billing": [
      "read"
    ],
    "dashboards": [
      "create"
    ],
    "datasets": [
      "create"
    ],
    "endpoints": [
      "create"
    ],
    "flows": [
      "create"
    ],
    "integrations": [
      "create"
    ],
    "monitors": [
      "create"
    ],
    "notifiers": [
      "create"
    ],
    "rbac": [
      "create"
    ],
    "sharedAccessKeys": [
      "read"
    ],
    "users": [
      "create"
    ],
    "views": [
      "create"
    ]
  },
  "description": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "samlAuthenticated": true,
  "viewCapabilities": {},
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

Authenticate using an API token or personal access token (PAT). Include the token as a Bearer token: Authorization: Bearer <token>. For more information, see Tokens.

Path Parameters

id
string
required

Body

application/json
existingTokenExpiresAt
string<date-time>
required

Expiration date of the existing token (ISO 8601 format)

newToken
object
newTokenExpiresAt
string<date-time> | null

Expiration date of the new token (ISO 8601 format)

Response

200 - application/json

CreateAPITokenResponse

datasetCapabilities
object
required
id
string
required

ID of the token

name
string
required

Name of the token

orgCapabilities
object
required
description
string

Description of the token

expiresAt
string<date-time> | null

Expiration date of the token (ISO 8601 format)

samlAuthenticated
boolean
viewCapabilities
object
token
string