---
title: "API tokens"
description: "Named, scoped tokens that always expire, for scripts and pipelines that call the Xovris API."
url: https://xovris.ai/docs/manage/api-tokens/
---

# API tokens

An API token lets a script, a pipeline or another system call the Xovris API for your workspace. Create one in the
command centre under **Settings, Developers**.

```sh
curl -s -X POST https://api.xovris.ai/v1/tokens \
  -H "authorization: Bearer $XOVRIS_TOKEN" -H 'content-type: application/json' \
  -d '{"name": "Deploy pipeline", "scopes": ["read"], "expiresInDays": 90}'
```

[Receive events with webhooks](/docs/manage/webhooks/)

## What every token has

- **A name** of 1 to 100 characters, so you know later what uses it.
- **Scopes**: `read`, or `read` and `write`. Ask for `read` unless the caller changes something.
- **An expiry** between 1 and 365 days, 90 when you do not choose. Tokens that never expire are not issued.
- **Its remaining life shown as a meter** beside it, so a token close to its end is easy to spot.

For a GitHub workflow, Xovris makes the token and writes it straight into the repository's Actions secrets itself through the Xovris GitHub App, after you agree once – sealed to that repository, never shown to anyone, never written over a secret already there, and deleted by Xovris again when you remove it. Do it yourself instead: the token's secret is shown once, when it is created – store it in your secret manager straight away.

## Creating one through the API

```http
POST /v1/tokens
Content-Type: application/json

{"name": "Deploy pipeline", "scopes": ["read"], "expiresInDays": 90}
```

An expiry outside 1 to 365 days, or a scope other than `read` and `write`, is refused with the reason and what to
send instead.

## When a token is no longer needed

Revoke it from **Settings, Developers**. A revoked or expired token is refused on its next call.
