---
title: "POST /api/v2/tokens/create/"
method: POST
path: "/api/v2/tokens/create/"
tags: ["tokens"]
---

# POST /api/v2/tokens/create/

`POST /api/v2/tokens/create/`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `sessionid`

Create a new API token. The plain token is returned only once.

## Request body

- AuthTokenCreateRequest: Input serializer for token creation.
  - `expiry` string, date-time, required

## Response `201`

- AuthTokenCreateResponse: Response with plain token (shown only once).
  - `pk` string, required
  - `token_key` string, required
  - `token` string, required
  - `created` string, date-time, required
  - `expiry` string, date-time, required

---

[API](https://skmtc.dev/instanssi/apis/instanssi-org.md) - [All operations](https://skmtc.dev/instanssi/apis/instanssi-org/llms.txt) - [OpenAPI document](https://skmtc.dev/instanssi/apis/instanssi-org/revisions/d45e162506aa?raw)
