Skip to content

Generate a test webhook payload and signature

Request

🔐 Required role: WEBHK_TST

📖 Data dictionary: Event subscription

Generate a signed test webhook payload

Generates a signature for an arbitrary JSON payload using the provided secret. This is intended for debugging webhook integrations ONLY.

Business Applications:

  • Webhook troubleshooting
  • Signature validation testing
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Bodyapplication/jsonrequired
payloadanyrequired

Any JSON value to sign.

Example:
{ "test": true }
secretstringrequired

Secret to sign the payload with.

curl -i -X POST \
  https://api.sandbox.aiwyn.app/api/v1/webhook/test/generate \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "payload": {
      "test": true
    },
    "secret": "my-test-secret"
  }'

Responses

The payload, its signature and the secret. The body is not wrapped in data / meta. signature is sha256= followed by the Base64 HMAC-SHA256 of the compact JSON payload.

Bodyapplication/json
payloadanyrequired

The payload from the request.

signaturestringrequired
Example:"sha256=Epvu8EP9JvCXSg+nVg9aTomZkJ7u3vESqWQjFs1WmkA="
secretstringrequired

The secret from the request.

Response
{ "payload": null, "signature": "sha256=Epvu8EP9JvCXSg+nVg9aTomZkJ7u3vESqWQjFs1WmkA=", "secret": "string" }