---
title: "Create API key"
method: POST
path: "/api_keys"
tags: ["Api Keys"]
---

# Create API key

`POST /api_keys`

Creates a new API key.

The response includes an `authentication_token` that is shown only once (at creation time).
Copy and store it securely.

## Headers

- `Accept-Language` 'es' | 'en'
- `X-Child-Company-Id` string

## Request body

- ApiKeyRequest
  - `description` string — A name or brief explanation of what this API key is used for.
  - `role` 'private', required — Defines the type of API key to create. Only "private" is supported for creation. A "public" API key already exists by default per company/environment.

## Response `200`

successful operation

## Other responses

- `401` — authentication error
- `422` — parameter validation error
- `500` — internal server error

---

[API](https://skmtc.dev/digitalfemsa/apis/femsa-api.md) · [All operations](https://skmtc.dev/digitalfemsa/apis/femsa-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/digitalfemsa/femsa-api/revisions/2e43caddf36b/schema)
