---
title: "Create API keys for a user"
method: POST
path: "/user/api-keys"
tags: ["User"]
---

# Create API keys for a user

`POST /user/api-keys`

This endpoint is used to create API keys for a user. In estuary, each user is given an API key to access all features.

## Query parameters

- `expiry` string
- `perms` string

## Response `200`

OK

- ApiGetApiKeysResp
  - `expiry` string
  - `isSession` boolean
  - `label` string
  - `token` string
  - `tokenHash` string

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2022-10-12** `56275bed061a` — 2 info
  - added the new optional `query` request parameter `expiry`
  - added the new optional `query` request parameter `perms`
- **2022-09-14** `35d2c26f300c` — 2 warning
  - deleted the `query` request parameter `expiry`
  - deleted the `query` request parameter `perms`

[Change history](https://skmtc.dev/application-research/apis/estuary-api/changes/user/api-keys/post.md)

---

[API](https://skmtc.dev/application-research/apis/estuary-api.md) · [All operations](https://skmtc.dev/application-research/apis/estuary-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/application-research/estuary-api/revisions/b9ae518bf64b/schema)
