Introducing Livops 2.0! Promo codeCEOgives you 8,000 so‘m on your balance.What’s new
API and CLI / API tokens

API and CLI

API tokens

A key for the CLI, CI and scripts — who creates it, what it can do and what it can't.

An API token is a key for programs: the CLI, GitHub Actions or your own scripts use it to call the Livops API.

Create a token

  1. In the cabinet, open the team’s Settings → API tokens (/<team>/settings/tokens).
  2. Name the token (for example github-actions) and click Create.
  3. The token is shown only once. Save it right away in your CI secrets or a password manager.

Rules:

  • Only the team owner can create tokens.
  • One token, one team. A token only sees that team’s projects; a request for another team’s project returns 404.
  • Tokens start with lvp_. Livops stores only their hash.
  • Tokens don’t expire — they work until revoked. Up to 20 active tokens per account.
  • The last-used time is shown in the list. Revoke unused or leaked tokens immediately.
  • If the token’s owner leaves the team, the token stops working.

Usage

Send the token in the Authorization header:

curl https://livops.uz/api/projects \
  -H 'Authorization: Bearer lvp_xxx'

Never put a token in code or in a repository — keep it in an environment variable (LIVOPS_TOKEN).

What a token can do

  • Read almost everything: projects, deploys, logs, the list of databases, domains.
  • Write only within projects, deploys and stacks: deploy, set variables, add services and environments, promote.

What a token can’t do

The following are open only to a person in the cabinet (with a browser session) — a token gets 403:

  • deleting anything (DELETE requests);
  • creating, viewing or revoking tokens — a token can’t issue another token;
  • password, sessions, two-factor authentication and account settings;
  • team, members, billing and payments;
  • changing an environment’s shared variables;
  • transferring a project and changing project members;
  • database connection details (password) and backups;
  • managing deploy hooks, webhooks, log forwarding and SSH keys.

The full list is marked next to each endpoint in the API reference.

Not from a browser

If a request carries Cookie, Origin or Sec-Fetch-* headers (that is, it looks like it came from a browser), the Authorization header is ignored. Use tokens in server-side code or in a terminal.

Got a question? — @livops_uz