API Tokens

PUT /v1/api-token/{token_id}

Description

Update an existing API token

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Path Parameters

Param

Type

Required

Description

token_id

uuid

no

Friendly name for the token, used only for display in frontend

Body Parameters

Param

Type

Required

Description

name

uuid

no

Friendly name for the token, used only for display in frontend

expired

bool

no

Set to true to expire the token. Cannot be set to false once it is set to true

Example Response

{}

POST /v1/api-token

Description

Create a new API token for the team of the current logged in user

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Body Parameters

Param

Type

Required

Description

name

string

yes

Friendly name for the token, used only for display in frontend

Example Response

{
    "id": "7b825d8c-9edc-458f-b82c-ee95e640aadc",
    "name": "testing",
    "token": "batchsh_0acbdf11dc90cd8d0eba9850773e00baa3d13c970e50cd83bdbb3f5376bc",
    "expired": false,
    "team": {
        "id": "7cf162ac-ea51-4095-9eab-d36241ef2bf0",
        "name": "test-123"
    }
}

GET /v1/api-token

Description

Lists all API tokens for the team of the current logged in user

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Example Response:

[
    {
        "id": "5f5d2a29-394f-4509-a327-379f57b1d482",
        "name": "testing",
        "token": "batchsh_a2a4e316acfe7a0b1b9580f5251650fb3307296af2779680d115298f2102",
        "team": {
            "id": "7cf162ac-ea51-4095-9eab-d36241ef2bf0",
            "name": "test-123"
        }
    }
]

Last updated