Create a Webhook
documentedCreate an event webhook.
POST /api/v1/webhooksAnalyticsno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.sparkpost.com/api/v1/webhooks" \
-X POST \
-H "Authorization: {{SPARKPOST_API_KEY}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name": "{{$name}}", "target": "{{$target}}", "events": ["{{$event_delivery}}", "{{$event_open}}", "{{$event_click}}"], "active": true, "custom_headers": {"x-api-key": "{{$custom_header_key}}"}, "exception_subaccounts": [{{$subaccount_id}}], "auth_type": "{{$auth_type}}", "auth_request_details": {"url": "{{$auth_url}}", "body": {"client_id": "{{$client_id}}", "client_secret": "{{$client_secret}}", "grant_type": "client_credentials"}}, "auth_credentials": {"username": "{{$username}}", "password": "{{$password}}"}}'"}