---
title: "Create a new API key"
method: POST
path: "/api/api_keys/"
tags: ["Users"]
---

# Create a new API key

`POST /api/api_keys/`

Handle creation of a new API key.

## Request body

- APIKey — Declares JSON representation of `UserAPIKey` model instances.
  - `prefix` string, required
  - `created` string, date-time, required
  - `name` string — A free-form name for the API key. Need not be unique. 50 characters max.

## Response `201`

- APIKey — Declares JSON representation of `UserAPIKey` model instances.
  - `prefix` string, required
  - `created` string, date-time, required
  - `name` string — A free-form name for the API key. Need not be unique. 50 characters max.

---

[API](https://skmtc.dev/forager/apis/forager-public-api.md) · [All operations](https://skmtc.dev/forager/apis/forager-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/forager/forager-public-api/revisions/2f5da1b54f94/schema)
