---
title: "Create API key"
method: POST
path: "/auth/accounts/{user_id}/apikeys"
tags: ["Auth"]
---

# Create API key

`POST /auth/accounts/{user_id}/apikeys`

Generate a new API key for the authenticated user

## Path parameters

- `user_id` integer, required

## Response `200`

OK

- SchemaAPIToken
  - `api_key` string
  - `ctime` integer
  - `id` integer
  - `name` string
  - `user_id` integer

## Other responses

- `500` — Internal Server Error

---

[API](https://skmtc.net/lxpio/apis/omnigram-api.md) · [All operations](https://skmtc.net/lxpio/apis/omnigram-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lxpio/omnigram-api/revisions/58911ffb3093/schema)
