platform
account-management
api-keys

Create API key

This method allows you to create an API key. Only users with certain roles can create api keys; for example, Account Manager and Integrations Manager roles.

post/settings/2/api-keys

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token
    • or API key in header Authorization
    • or HTTP basic

Request body

accountIdstring

Unique identifier for account this API key will belong to. If not provided accountId of the user making the API request will be set. CPaaSX Applications and Entities can be set only on api keys that belong to the account of the user making the request and only if that account is main account.

namestring required

Name of this API Key.

allowedIPsstring[]

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.

validFromstring date-time

Date from which this API key will be valid. Time is in UTC. Should not be earlier than creation date. If not provided default is date of creation.

validTostring date-time

Date until this API key will be valid. Time is in UTC. Should not be earlier than validFrom or creation time. If not provided default is 1 year from creation.

permissionsstring[]

List of permissions this API key has granted. Default permission is 'PUBLIC_API'. API key cannot be created with both 'PUBLIC_API' and 'WEB_SDK' permissions. API key cannot be created with both permissions and a collection of Applications and/or Entities in <code>platform</code>.

scopeGuidsstring[]

List of API scopes that will be assigned to the API key.

Response

OK

idstring

Unique identifier specifying this api key.

apiKeySecretstring

Authentication key. Use this value for authentication on API. Keep this in secure storage and don't share it.

accountIdstring

Unique identifier for account this API key belongs to.

namestring required

Name of this API Key.

allowedIPsstring[]

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.

validFromstring date-time

Date from which this API key is/will be valid. Time is in UTC.

validTostring date-time

Date until this API key will be valid. Time is in UTC.

enabledboolean

Is API key enabled.

permissionsstring[]

List of permissions this API key has granted.

scopeGuidsstring[]

List of Scopes assigned to API Key

Changes

No recorded changes to this operation across all 1 revision of this API.