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

# Create an API key

`POST /api-keys`

## Request

- Base URL: `https://api.mepmail.dev`
- URL: `https://api.mepmail.dev/api-keys`
- Auth: HTTP bearer

Creates an API key; the token is returned only in this response.

## Request body

- CreateApiKeyRequest
  - `name` string, required
  - `permission` 'full_access' | 'sending_access'
  - `domain_id` string, uuid, nullable

## Response `200`

API key created; the token is returned only here

- CreateApiKeyResponse
  - `id` string, uuid, required
  - `token` string, required

## Other responses

- `401`: Missing, malformed or invalid API key
- `403`: Account review restricts key creation
- `422`: Validation error
- `429`: Rate limit exceeded: 600 requests per minute per API key and 3,000 per team; wait for Retry-After

---

[API](https://skmtc.dev/mepmail/apis/mepmail-api.md) · [All operations](https://skmtc.dev/mepmail/apis/mepmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mepmail/apis/mepmail-api/revisions/262a89f73730?raw)
