---
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`

Create a new API key.

## Path parameters

- `merchant_code` string, required

## Request body

- object
  - `name` string, required — Name of the API key.
  - `scopes` string[], required

## Response `201`

Created API key.

- APIKey — An API key is a static token that allows you to authorize with SumUp APIs. Keep your API keys secret and safe. Do not share your API keys or expose them in a publicly accessible areas such as client-side code (browser or apps) or in the GitHub.
  - `created_at` string, date-time, required — The timestamp of when the API key was created.
  - `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 — The timestamp of when the API key was last updated.

## Changes

- **2025-02-25** `cdadac3315a1` — 2 info
  - the endpoint scheme security `apiKey` was added to the API
  - the endpoint scheme security `oauth2` was added to the API

[Change history](https://skmtc.dev/sumup/apis/sumup-rest-api/changes/v0.1/merchants/:merchant_code/api-keys/post.md)

---

[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/3bbba954835d/schema)
