---
title: "Create Consumer Key"
method: POST
path: "/user/consumerKeys"
tags: ["consumerkey"]
---

# Create Consumer Key

`POST /user/consumerKeys`

## Request

- Base URL: `https://pro.api.serversmtp.com/api/v2`
- URL: `https://pro.api.serversmtp.com/api/v2/user/consumerKeys`
- Auth: API key in header `Authorization`

Create new Consumer Key

Note: Consumer Key creation is not allwed when authenticated via Consumer Key.

## Request body

- ConsumerKeyCreateRequestBody
  - `label` string: Consumer Key label.
  - `permissions` string[], required: Permissions granted to this consumer key. At least one value is required.
  - `ips` string[]: IP addresses allowed to use this consumer key. Empty array or omitted means no restriction.

## Response `201`

Sucess

Consumer Key Created Sucessfully.

- ConsumerKeyCreateResponseBody
  - `consumerKey` string: Consumer Key
  - `consumerSecret` string: Consumer Secret

## Other responses

- `401`: Unauthorized This API requires a valid API Key to be provided. (Use [/authentication/authorize](#/authentication/AuthenticationLogin) to obtain an API Key) Produces: * missing_authorization_key * invalid_authorization_key * account_is_inactive

---

[API](https://skmtc.dev/serversmtp/apis/turbosmtp-public-apis.md) - [All operations](https://skmtc.dev/serversmtp/apis/turbosmtp-public-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/serversmtp/apis/turbosmtp-public-apis/revisions/8503e099b215?raw)
