---
title: "POST /app/api_tokens/"
method: POST
path: "/app/api_tokens/"
tags: ["app"]
---

# POST /app/api_tokens/

`POST /app/api_tokens/`

API endpoint that allows API Tokens to be viewed or edited.

## Request body

- APITokenRequest
  - `name` string — A free-form name for the API key. Need not be unique. 50 characters max.
  - `expiry_date` string, date-time, nullable — Once API key expires, clients cannot use it anymore.

## Response `201`

- APITokenCreateResponse
  - `api_key` APIToken, required
    - `name` string — A free-form name for the API key. Need not be unique. 50 characters max.
    - `prefix` string, required
    - `expiry_date` string, date-time, nullable — Once API key expires, clients cannot use it anymore.
    - `created` string, date-time, required
  - `key` string, required

## Changes

- **2023-01-16** `36b48cae00a3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/uselotus/apis/lotus-api/changes/app/api_tokens/post.md)

---

[API](https://skmtc.dev/uselotus/apis/lotus-api.md) · [All operations](https://skmtc.dev/uselotus/apis/lotus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uselotus/lotus-api/revisions/36b48cae00a3/schema)
