---
title: "Create API key"
method: POST
path: "/settings/1/accounts/{accountKey}/api-keys"
tags: ["platform", "account-management", "api-keys"]
deprecated: true
---

# Create API key

`POST /settings/1/accounts/{accountKey}/api-keys`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/settings/1/accounts/{accountKey}/api-keys`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - HTTP basic

> **Deprecated.**

This method allows you to create an API key.

## Path parameters

- `accountKey` string, required

## Request body

- Bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7CreateApiKeyRequestV1
  - `name` string, required: Name of the API key
  - `allowedIPs` string[]: List of IP addresses or IP ranges from which this API key will be used. Authentication will fail from any other IP not specified in this list.
  - `validTo` string, date-time: Date from which this API key is/will be valid. Time is in UTC
  - `validFrom` string, date-time: Date until this API key will be valid. Time is in UTC.
  - `enabled` boolean: Only enabled API keys will be accepted. When revoking existing API key, this property can be set to false.
  - `permissions` Bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7Permission[]: List of permissions this API key has granted. Default permission is 'ALL'. This data may be inaccurate. Migrate to new API key management endpoints and use API scopes for fine grained control.

## Response `201`

Created

- Bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7ApiKeyResponse
  - `key` string: Unique key specifying this api key.
  - `publicApiKey` string: Authentication key. Use this value for authentication on API. Keep this in secure storage and don't share it.
  - `accountKey` string: Unique identifier for account this API key belongs to.
  - `name` string, required: Name of this API Key.
  - `allowedIPs` string[]: List of allowed IP addresses from which this API key will be used. Authentication will fail from any other IP not specified in this list.
  - `validFrom` string, date-time: Date from which this API key is/will be valid. Time is in UTC.
  - `validTo` string, date-time: Date until this API key will be valid. Time is in UTC.
  - `enabled` boolean: Is API key enabled.
  - `permissions` Bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7Permission[]: List of permissions this API key has granted.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
