{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/infobip/main/json-schema/infobip-bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7-update-api-key-request-schema.json", "title": "UpdateApiKeyRequest", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/infobip-platform-api-openapi.yml#/components/schemas/bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7.UpdateApiKeyRequest", "type": "object", "properties": { "accountId": { "type": "string", "description": "Unique identifier for account this API key belongs 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." }, "name": { "type": "string", "description": "Name of this API Key." }, "allowedIPs": { "type": "array", "description": "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.", "items": { "type": "string", "description": "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." } }, "validFrom": { "type": "string", "format": "date-time", "description": "Date from which this API key is/will be valid. Time is in UTC." }, "validTo": { "type": "string", "format": "date-time", "description": "Date until this API key will be valid. Time is in UTC." }, "enabled": { "type": "boolean", "description": "Enable or disable API key." }, "permissions": { "type": "array", "description": "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 updated with both permissions and a collection of Applications and/or Entities in platform. If an empty list is sent all current permissions assigned to api key will be removed and 'PUBLIC_API' will be set as default.", "enum": [ "PUBLIC_API", "2FA_CLIENT", "WEB_SDK" ], "items": { "type": "string", "description": "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 updated with both permissions and a collection of Applications and/or Entities in platform. If an empty list is sent all current permissions assigned to api key will be removed and 'PUBLIC_API' will be set as default.", "enum": [ "PUBLIC_API", "2FA_CLIENT", "WEB_SDK" ] } }, "platform": { "type": "array", "description": "A collection of CPaaS X Applications and Entities that will be linked to the API key. All Applications and Entities will be removed from the api key if an empty platform list is sent and 'PUBLIC_API' will be assigned as default permission. Or, to remove a specific Application/Entity pair, omit it from the platform list.", "items": { "$ref": "#/$defs/bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7.Platform" } }, "scopeGuids": { "type": "array", "description": "List of [API scopes](https://www.infobip.com/docs/essentials/api-essentials/api-authorization#available-api-scopes-api-scopes) that will be assigned to the API key. An API key cannot be updated with both scopes and a collection of Applications and/or Entities in platform. If an empty list is sent, all current scopes assigned to the API Key will be removed and it will no longer be able to access any API endpoint.", "items": { "type": "string", "description": "List of [API scopes](https://www.infobip.com/docs/essentials/api-essentials/api-authorization#available-api-scopes-api-scopes) that will be assigned to the API key. An API key cannot be updated with both scopes and a collection of Applications and/or Entities in platform. If an empty list is sent, all current scopes assigned to the API Key will be removed and it will no longer be able to access any API endpoint." }, "uniqueItems": true } }, "$defs": { "bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7.Action": { "type": "string", "description": "An optional action performed for an API request authenticated by this specific API key. The `FILL` option is used when an API endpoint inserts linked Application and Entity IDs into a request, if missing. The `FORCE` option is used when an API endpoint overrides linked Application and Entity IDs with the ones from this platform. If the action is left blank, the API endpoint will only perform an authorization check without injecting values into the request.", "enum": [ "FILL", "FORCE" ], "title": "Action" }, "bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7.Platform": { "type": "object", "description": "A collection of CPaaS X Applications and Entities that will be linked to the API key. All Applications and Entities will be removed from the api key if an empty platform list is sent and 'PUBLIC_API' will be assigned as default permission. Or, to remove a specific Application/Entity pair, omit it from the platform list.", "properties": { "key": { "type": "string", "description": "Unique identifier of application and/or entity association.", "readOnly": true }, "applicationId": { "type": "string", "description": "ID of a CPaaS X Application. Once linked to an Application, the API key can only be used to send messages using linked Applications. Mandatory for every Application and/or Entity pair. Use the default value to reference a default Application. Use an existing Application created using [create-application endpoint](https://www.infobip.com/docs/api/platform/application-entity/create-application) or specify a new applicationId to create a new Application." }, "entityId": { "type": "string", "description": "ID of a CPaaS X Entity. Once linked to an Entity, the API key can only be used to send messages using linked Entities. Use an existing Entity created using [create-entity endpoint](https://www.infobip.com/docs/api/platform/application-entity/create-entity) or specify a new entityId to create a new Entity." }, "action": { "$ref": "#/$defs/bb8af9c2d2d4d677e25555100e31662e23d86ede8b5d73bbf4974b4decdd08d7.Action" } }, "required": [ "applicationId" ], "title": "Platform" } } }