---
title: "Create Api Key"
method: POST
path: "/api/api-keys"
tags: ["api-keys"]
---

# Create Api Key

`POST /api/api-keys`

## Request

- Base URL: `https://api.pointifytravels.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pointifytravels.com/api/api-keys`
- Auth: none declared

Generate a new API key for the user.

The raw key is returned **once** in the response and is never stored.
Only a SHA-256 hash is persisted.

## Request body

- CreateApiKeyRequest: Payload for creating a new API key.
  - `user_id` string, required
  - `name` string, required
  - `scopes` string[], nullable
  - `rate_limit` integer

## Response `200`

Successful Response

- ApiKeyResponse: Returned when a new key is created -- ``key`` is shown only once.
  - `id` string, required
  - `key` string, required
  - `prefix` string, required
  - `name` string, required
  - `scopes` string[], required
  - `rate_limit` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pointifytravels/apis/pointify-deal-engine.md) · [All operations](https://skmtc.dev/pointifytravels/apis/pointify-deal-engine/llms.txt) · [OpenAPI document](https://skmtc.dev/pointifytravels/apis/pointify-deal-engine/revisions/4350142a4216?raw)
