PATCH
/
v1
/
consumers
/
webhooks
/
{id}
curl --request PATCH \
  --url https://api.sequin.io/v1/targets/http/8ff58ef0-d376-4ae8-b2e2-9f0206aa65b8 \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "consume-stripe-collections",
    "active": true,
    "syncs": ["446e3f05-6021-48f5-8c28-ec7e1fa9e944"], // or ["*"] for all syncs
    "collections": ["stripe:customers", "stripe:subscriptions"], // or use regex ["stripe:*"]
    "event_types": ["create", "insert", "update", "delete"],
    "metadata": { "custom_property": 42 },
  }'
{
  "id": "00000582-47fb-422e-8a79-da12502ccc63",
  "name": "consume-stripe-collections",
  "active": true,
  "syncs": ["446e3f05-6021-48f5-8c28-ec7e1fa9e944"], // or ["*"] for all syncs
  "collections": ["stripe:customers", "stripe:subscriptions"], // or use regex ["stripe:*"]
  "event_types": ["create", "insert", "update", "delete"],
  "target_id": "6c4ecaaa-b62a-4cf8-aa99-8f00e2ec3d1a",
  "health": {
    "status": "ok",
    "notes": [],
    "time": "2023-12-15 01:29:29"
  },
  "metadata": { "custom_property": 42 },
  "created_at": "2023-12-15 01:29:29",
  "updated_at": "2023-12-15 01:29:29"
}

Request parameters

name
string
required

Name of the webhook consumer.

active
boolean
default: "true"

Whether the consumer is active or not.

syncs
array
required

Array of the sync ids that are connected to this consumer. ["*"] indicates that every sync is connected to this consumer.

collections
array
required

Array of the collections consumed by this consumer. Can be a regex (e.g. ["salesforce:*"]).

event_types
array
required

Array of the event types consumed by this consumer. ["create", "insert", "update", "delete"].

metadata
string

Metadata for the consumer. This is a free-form object that you can use to store any additional information you want to associate with the consumer.

Response fields

id
string

ID of the webhook consumer.

name
string

Name of the webhook consumer.

active
boolean

Whether the consumer is active or not.

syncs
array

Array of the sync ids that are connected to this consumer. ["*"] indicates that every sync is connected to this consumer.

collections
array

Array of the collections consumed by this consumer. Can be a regex (e.g. ["salesforce:*"]).

event_types
array

Array of the event types consumed by this consumer. ["create", "insert", "update", "delete"].

target_id
string

ID of the target.

health
object

Health status of the consumer. Learn more about the health object.

metadata
string

Metadata for the consumer. This is a free-form object that you can use to store any additional information you want to associate with the consumer.

created_at
string

Timestamp of when the consumer was created, in ISO 8601 format.

updated_at
string

Timestamp of when the consumer was last updated, in ISO 8601 format.