Skip to main content
POST
/
api
/
v1
/
web-integrations
/
{integrationId}
/
tokens
Create integration token
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: '<string>', expiresAt: '2023-11-07T05:31:56Z'})
};

fetch('https://blackbox.dasha.ai/api/v1/web-integrations/{integrationId}/tokens', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "tokenId": "<string>",
  "token": "<string>",
  "name": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Path Parameters

integrationId
string
required

Integration identifier

Body

Token configuration

Request to create a new web integration access token

name
string
required

Token name for identification purposes

Minimum string length: 1
expiresAt
string<date-time> | null

Token expiration timestamp. If not specified, the token never expires.

Response

Integration token created successfully

Response containing newly created access token

tokenId
string
required

Unique token identifier

Minimum string length: 1
token
string
required

Access token value. Store this securely as it cannot be retrieved later.

Minimum string length: 1
name
string
required

Token name for identification purposes

Minimum string length: 1
createdAt
string<date-time>
required

Token creation timestamp

expiresAt
string<date-time> | null

Token expiration timestamp. If null, the token never expires.