---
title: "Create an API access key"
method: POST
path: "/self/access/keys"
tags: ["Users"]
---

# Create an API access key

`POST /self/access/keys`

## Request

- Base URL: `https://api.distill.io/v2`
- URL: `https://api.distill.io/v2/self/access/keys`
- Auth: one of:
  - API key in cookie `connect.sid`
  - HTTP bearer
  - API key in query parameter `api_key`

Auth: Enterprise — Enterprise plan account.

## Request body

- object
  - `name` string, required

## Response `200`

Success

- object
  - `id` string, uuid, required
  - `name` string, required
  - `user_id` string, uuid, required
  - `private_key` string, required
  - `state` integer, required
  - `ts_mod` string, date-time
  - `ts` string, date-time, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/distill/apis/distill-io-api-v2.md) - [All operations](https://skmtc.dev/distill/apis/distill-io-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/distill/apis/distill-io-api-v2/revisions/c55722ccfe14?raw)
