Spectate API

Check the token you authenticate with. Tokens themselves are created, regenerated and revoked in the dashboard (Team → API tokens) by owners and managers, never through the API.


Get the current API token

GET
https://api.spectate.net/v1
/token

Returns the token that authenticated this request: its name, abilities, team and expiry. Any valid token may call it, whatever its abilities, so SDKs and the Terraform provider use it to check credentials before doing anything else. Revoked and expired tokens get 401.

Get the current API token › Responses

The token that authenticated the request.

The API token that made the request.
id
​string · uuid · required

Token ID

name
​string · required

Name given to the token when it was created

Example: Terraform
last_four
​string · required

Last four characters of the token, to tell tokens apart

Example: a1B2
abilities
​ApiTokenAbility[] · required

What the token may do. Each endpoint lists the ability it requires

Enum values:
monitors:read
monitors:write
monitors:delete
hosts:read
hosts:write
hosts:delete
domains:read
domains:write
​ApiTokenTeam · required

The team the token acts for

expires_at
​string | null · date-time · required

When the token stops working; null if it never expires

created_at
​string · date-time · required

When the token was created