---
title: "Issue API token"
method: POST
path: "/api/v1/tokens"
tags: ["API Tokens"]
---

# Issue API token

`POST /api/v1/tokens`

## Request

- Base URL: `https://api.vigotime.com`
- URL: `https://api.vigotime.com/api/v1/tokens`
- Auth: none declared

Issue a token for the caller's organization. The plaintext appears only here.

## Headers

- `x-user-id` string, nullable
- `x-company-id` string, nullable
- `x-department-id` string, nullable

## Request body

- IssueTokenRequest: Request to issue a new API token.
  - `expires_in_days` integer, nullable
  - `label` string: Purpose, e.g. 'CI' or 'Zapier'
  - `scopes` string[], nullable: Granted scopes; default ['solve:read', 'solve:write']
  - `test` boolean: Issue a vt_test_ sandbox token

## Response `201`

Successful Response

- IssuedTokenResponse: The ONLY response that ever contains the plaintext token.
  - `expiresAt` string, nullable, required
  - `label` string, required
  - `organizationId` string, required
  - `scopes` string[], required
  - `token` string, required: Shown exactly once — store it now, it cannot be retrieved
  - `tokenId` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/vigotime/apis/vigotime-public-api.md) · [All operations](https://skmtc.dev/vigotime/apis/vigotime-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vigotime/apis/vigotime-public-api/revisions/bf944033e400?raw)
