webhook.key.activate

Activate a webhook encryption key to use it for encrypting webhook payloads.

POST http://api.kompliant.com/webhook.key.activate (OpenAPI specification)

Usage Info

This method activates a webhook key, making it the current active key for encrypting webhook payloads sent to your endpoints. Only one key can be active at a time per account. When you activate a new key, any previously active key is automatically moved to DELETED status.

Before activating a new key, ensure you have updated your webhook processing infrastructure with the new SharedSecret (obtained from webhook.key.create) and mapped the key_id to the SharedSecret so your system can properly decrypt incoming webhooks.

The activation process is atomic - either the new key is activated and the old key is deactivated, or the operation fails with no changes. This prevents scenarios where you might have zero or multiple active keys.

Request

Authentication: KSig1-HMAC-SHA256

Parameters

ParameterTypeRequiredDescription
key_idstringYesThe identifier for the webhook key to activate (format: whk_YYYYMMDD_NN).

Example

{
  "key_id": "whk_20251021_02"
}

Response

Data

ParameterTypeDescription
key_idstringThe identifier for the webhook key that was activated.
statusstringThe current status of the key. Must be one of the WEBHOOK_KEY_STATUSES. Will be ACTIVE after successful activation.
activated_atstringThe date-time when the key was activated in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.SSSZ).

Example

{
  "meta": {
    "status": "SUCCESS",
    "trace_id": "trc_7pQfuKPPkHWrMLsiYronG",
    "version": "2025-03-24"
  },
  "data": {
    "key_id": "whk_20251021_02",
    "status": "ACTIVE",
    "activated_at": "2025-10-21T16:30:00.000Z"
  }
}

Errors

Error CodeHTTP CodePossible Cause
BAD_REQUEST400Required parameters not provided.
Key ID format is invalid.
ENTITY_NOT_FOUND400The key_id provided does not exist.
SYSTEM_RULE_VIOLATION400System rule violations are described below.

System Rule Violations

When a SYSTEM_RULE_VIOLATION error occurs, the response will include additional entity_type and sub_code fields to provide more specific information:

Entity TypeSub-codeDescription
Webhook KeyKEY_ALREADY_ACTIVEThe specified key is already in ACTIVE status.
Webhook KeyKEY_DELETEDCannot activate a key that has been deleted. Create a new key instead.