$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "receiverUrl": "https://postman-echo.com/post",
< "signatureScheme": "hmac_sha256",
< "signatureHeader": "X-Signature-256",
< "signatureTemplate": "sha256={signature}",
< "signedPayloadTemplate": "{body}",
< "timestampHeader": "X-Timestamp",
< "cases": [
< {
< "name": "good-delivery",
< "mode": "valid",
< "payload": {
< "event": "ping",
< "id": "{nonce}",
< "sentAt": "{timestamp}"
< },
< "expectedStatusMin": 200,
< "expectedStatusMax": 299
< },
< {
< "name": "no-signature-header",
< "mode": "missing",
< "payload": {
< "event": "ping",
< "id": "{nonce}",
< "sentAt": "{timestamp}"
< },
< "expectedStatusMin": 401,
< "expectedStatusMax": 403
< },
< {
< "name": "wrong-secret",
< "mode": "wrong-secret",
< "payload": {
< "event": "ping",
< "id": "{nonce}",
< "sentAt": "{timestamp}"
< },
< "expectedStatusMin": 401,
< "expectedStatusMax": 403
< }
< ],
< "tamperReplayProbes": false,
< "probeExpectedStatusMin": 400,
< "probeExpectedStatusMax": 499,
< "timeoutSeconds": 10,
< "maxRequests": 200,
< "requestsPerSecond": 5,
< "maxResponseBytes": 65536,
< "oversizedBodyBytes": 100000,
< "replayAgeSeconds": 900,
< "contentType": "application/json",
< "userAgent": "WebhookContractVerifier/0.1 (+https://apify.com)"
<}
<EOF
$curl "https://api.apify.com/v2/actors/kingii98~webhook-receiver-contract-and-signature-rotation-verifier/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'