API Keys

Create a new API key

Changed on

Create a new API key for the organization

post/developers/api_keys

Request

  • Base URL
    https://gateway.prem.io
  • Auth
    HTTP bearer

Request body

labelstring required

Human-readable label for the API key. Trimmed, and must contain at least one printable character.

descriptionstring

Human-readable description for the API key

scopesstring[] required

List of scopes this API key has access to

ip_allow_liststring[]

List of IP addresses allowed to use this API key

expires_atstring mysql-date-time nullable

Timestamp when the API key expires

Example request

{
  "label": "Development API Key",
  "description": "Key for development environment",
  "scopes": [
    "api_keys.read"
  ],
  "ip_allow_list": [
    "192.168.1.1",
    "10.0.0.1"
  ],
  "expires_at": "2025-12-31 23:59:59"
}

Response

Successful API key creation response

status200 | 201 | 202 required

Status code of the response

errorstring nullable

Error message of the response, human readable

messagestring nullable required

Message of the response, human readable

env'development' | 'production' required

API environment

support_idstring uuid nullable

Support ID linked to the response, used to identify it when talking with our team.

Example response

{
  "data": {
    "id": "api_key_0197c0ec-a197-719f-84a9-99270a79b42a",
    "secret": "sk_live_MDFhMTkzNDctNmEyYS03YTMyLTllNTktZWU1MjA3NGY5ZGIxX3BjY2k",
    "scopes": [
      "api_keys.read"
    ],
    "ip_allow_list": [
      "127.0.0.1"
    ],
    "label": "Development API Key",
    "description": "Key for development environment",
    "expires_at": "2026-05-30 20:23:16",
    "created_at": "2025-06-30 15:00:22",
    "updated_at": null
  },
  "message": null
}

Changes

    • breaking

      the request property's minLength was increased from 0 to 1

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the response property for the response status

    • info

      removed the BALANCE enum value from the ///// response property for the response status

    • info

      removed the PLAN enum value from the ///// response property for the response status

    • info

      endpoint added