api-keys
Version 0.1.03 opérations
List the API keys of the organisation (prefixes, labels and scopes only)
GET/organisations/{id}/api-keysClé API
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.
Paramètres
idstringpathobligatoire
Réponses
200
idstring (uuid)obligatoireprefixstringobligatoirelabelstring | nullobligatoirescopesstring[]obligatoirecreatedAtstring (date-time)obligatoirelastUsedAtstring (date-time) | nullobligatoirerevokedAtstring (date-time) | nullobligatoirecreatedBystring (uuid) | nullobligatoire
Exemples de code
curl -X GET "$KONNECT_API_URL/organisations/id/api-keys" \
-H "Authorization: Bearer $KONNECT_API_KEY"Exemple : 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-keysClé API
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).
Paramètres
idstringpathobligatoire
Corps de la requête application/json
labelstringscopesstring[]obligatoire
Réponses
201
idstring (uuid)obligatoireprefixstringobligatoirelabelstring | nullobligatoirescopesstring[]obligatoirecreatedAtstring (date-time)obligatoirelastUsedAtstring (date-time) | nullobligatoirerevokedAtstring (date-time) | nullobligatoirecreatedBystring (uuid) | nullobligatoirekeystringobligatoireFull key
<prefix>:<secret>, shown once
403reauth_required, permission_denied or api_key_scope_exceeds_permissions
Exemples de code
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"
]
}'Exemple : corps de la requête
{
"label": "WooCommerce shop",
"scopes": [
"payments:read",
"payments:write"
]
}Exemple : 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}Clé API
Paramètres
idstringpathobligatoirekeyIdstringpathobligatoire
Réponses
200
idstring (uuid)obligatoireprefixstringobligatoirelabelstring | nullobligatoirescopesstring[]obligatoirecreatedAtstring (date-time)obligatoirelastUsedAtstring (date-time) | nullobligatoirerevokedAtstring (date-time) | nullobligatoirecreatedBystring (uuid) | nullobligatoire
Exemples de code
curl -X DELETE "$KONNECT_API_URL/organisations/id/api-keys/keyId" \
-H "Authorization: Bearer $KONNECT_API_KEY"Exemple : 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"
}