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

# Create an API key

`POST /api/v1/keys`

## Request

- Base URL: `https://api.misar.io/mail`
- URL: `https://api.misar.io/mail/api/v1/keys`
- Auth: HTTP bearer

## Request body

- CreateApiKeyRequest
  - `name` string, required
  - `scopes` string[], required
  - `expiresAt` string, date-time
  - `allowedAccountId` string, uuid

## Response `201`

API key created — raw key shown once

---

[API](https://skmtc.dev/misar/apis/misarmail-api.md) · [All operations](https://skmtc.dev/misar/apis/misarmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/misar/apis/misarmail-api/revisions/1141238bc092?raw)
