v1.0.0
OpenAPI 3.1.0

Update a webhook configuration

US region

Client Libraries

Update a webhook configuration

Update the configuration of a reporting webhook. Turn events on or off, change the webhook URL, etc.

Path Parameters
  • webhook_id
    Type: integer
    required

    The identifier of a webhook.

Body
application/json
  • endpoint
    Type: stringFormat: url
    required

    The webhook URL.

  • events
    Type: array string[] 1…enum
    required

    Specifies the types of events you want to report to your webhook. See our reporting webhooks reference for more information about event types and the information they return.

    values
    • customer_subscribed
    • customer_unsubscribed
    • customer_subscription_preferences_changed
    • email_drafted
    • email_attempted
  • name
    Type: string
    required

    The name of your webhook.

  • disabled
    Type: boolean

    Set to true to quit sending events to the webhook URL. Set to false to enable the webhook.

  • full_resolution
    Type: boolean

    Set to false to send unique open and click events to the webhook. Set to true to send all events.

  • with_content
    Type: boolean

    Set to true to include the message body in _sent events.

Responses
  • application/json
  • 400

    The request was malformed.

  • 404

    The webhook ID does not exist.

  • 429

    Your request is over the 10-per-second limit.

Request Example for put/v1/reporting_webhooks/{webhook_id}
curl https://api.customer.io/v1/reporting_webhooks/1 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "my cool webhook",
  "endpoint": "https://example.com/webhook",
  "disabled": false,
  "full_resolution": true,
  "with_content": false,
  "events": [
    "email_failed",
    "webhook_failed"
  ]
}'
{
  "name": "my cool webhook",
  "id": 4,
  "type": "webhook",
  "endpoint": "https://example.com/webhook",
  "disabled": false,
  "full_resolution": true,
  "with_content": false,
  "events": [
    "email_failed",
    "webhook_failed"
  ]
}