---
title: "Create an API key"
method: POST
path: "/v0.1/merchants/{merchant_code}/api-keys"
tags: ["API Keys"]
---

# Create an API key

`POST /v0.1/merchants/{merchant_code}/api-keys`

Creates a new API key for the user.

## Path parameters

- `merchant_code` string, required

## Request body

- object
  - `name` string, required
  - `scopes` string[], required

## Response `201`

Created API key.

- APIKey
  - `created_at` string, date-time, required
  - `id` string, required — Unique identifier of the API Key.
  - `name` string, required — User-assigned name of the API Key.
  - `plaintext` string — The plaintext value of the API key. This field is returned only in the response to API key creation and is never again available in the plaintext form.
  - `preview` string, required — Last 8 characters of the API key.
  - `scopes` string[], required
  - `type` 'public' | 'secret', required
  - `updated_at` string, date-time, required

---

[API](https://skmtc.dev/sumup/apis/sumup-rest-api.md) · [All operations](https://skmtc.dev/sumup/apis/sumup-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sumup/sumup-rest-api/revisions/9d3d2c99f041/schema)
