Skip to content

Development environment: content is being written, nothing points to production.

Documentation contents

api-keys

Version 0.1.03 operations

List the API keys of the organisation (prefixes, labels and scopes only)

GET/organisations/{id}/api-keysAPI key

A key whose creator no longer holds the permissions behind its scopes is revoked here or at its next use, and the owner is told by e-mail.

Parameters

  • idstringpathrequired

Responses

  • 200

    • idstring (uuid)required
    • prefixstringrequired
    • labelstring | nullrequired
    • scopesstring[]required
    • createdAtstring (date-time)required
    • lastUsedAtstring (date-time) | nullrequired
    • revokedAtstring (date-time) | nullrequired
    • createdBystring (uuid) | nullrequired

Code samples

curl -X GET "$KONNECT_API_URL/organisations/id/api-keys" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

[
  {
    "id": "id",
    "prefix": "prefix",
    "label": "label",
    "scopes": [
      "payments:read"
    ],
    "createdAt": "2026-10-01T09:30:00.000Z",
    "lastUsedAt": "2026-10-01T09:30:00.000Z",
    "revokedAt": "2026-10-01T09:30:00.000Z",
    "createdBy": "createdBy"
  }
]

Create an API key with the chosen scopes; the full key is returned once

POST/organisations/{id}/api-keysAPI key

Needs a re-authentication in the last 10 minutes (403 reauth_required). The scopes are fixed for the life of the key and capped at the creator's permissions (403 api_key_scope_exceeds_permissions with scopes and missingPermissions).

Parameters

  • idstringpathrequired

Request body application/json

  • labelstring
  • scopesstring[]required

Responses

  • 201

    • idstring (uuid)required
    • prefixstringrequired
    • labelstring | nullrequired
    • scopesstring[]required
    • createdAtstring (date-time)required
    • lastUsedAtstring (date-time) | nullrequired
    • revokedAtstring (date-time) | nullrequired
    • createdBystring (uuid) | nullrequired
    • keystringrequired

      Full key <prefix>:<secret>, shown once

  • 403reauth_required, permission_denied or api_key_scope_exceeds_permissions

Code samples

curl -X POST "$KONNECT_API_URL/organisations/id/api-keys" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "WooCommerce shop",
  "scopes": [
    "payments:read",
    "payments:write"
  ]
}'

Example: request body

{
  "label": "WooCommerce shop",
  "scopes": [
    "payments:read",
    "payments:write"
  ]
}

Example: 201

{
  "id": "id",
  "prefix": "prefix",
  "label": "label",
  "scopes": [
    "payments:read"
  ],
  "createdAt": "2026-10-01T09:30:00.000Z",
  "lastUsedAt": "2026-10-01T09:30:00.000Z",
  "revokedAt": "2026-10-01T09:30:00.000Z",
  "createdBy": "createdBy",
  "key": "key"
}

Revoke an API key (kept for history)

DELETE/organisations/{id}/api-keys/{keyId}API key

Parameters

  • idstringpathrequired
  • keyIdstringpathrequired

Responses

  • 200

    • idstring (uuid)required
    • prefixstringrequired
    • labelstring | nullrequired
    • scopesstring[]required
    • createdAtstring (date-time)required
    • lastUsedAtstring (date-time) | nullrequired
    • revokedAtstring (date-time) | nullrequired
    • createdBystring (uuid) | nullrequired

Code samples

curl -X DELETE "$KONNECT_API_URL/organisations/id/api-keys/keyId" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

{
  "id": "id",
  "prefix": "prefix",
  "label": "label",
  "scopes": [
    "payments:read"
  ],
  "createdAt": "2026-10-01T09:30:00.000Z",
  "lastUsedAt": "2026-10-01T09:30:00.000Z",
  "revokedAt": "2026-10-01T09:30:00.000Z",
  "createdBy": "createdBy"
}