curl --request PATCH \
--url https://api.attio.com/v2/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"target_url": "https://example.com/webhook",
"subscriptions": [
{
"event_type": "note.created",
"filter": {
"$and": [
{
"field": "parent_object_id",
"operator": "equals",
"value": "97052eb9-e65e-443f-a297-f2d9a4a7f795"
}
]
}
}
]
}
}
'{
"data": {
"target_url": "https://example.com/webhook",
"subscriptions": [
{
"event_type": "note.created",
"filter": {
"$and": [
{
"field": "parent_object_id",
"operator": "equals",
"value": "97052eb9-e65e-443f-a297-f2d9a4a7f795"
}
]
}
}
],
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"webhook_id": "23e42eaf-323a-41da-b5bb-fd67eebda553"
},
"status": "active",
"created_at": "2023-04-27T13:22:49.061281000Z"
}
}Update a webhook and associated subscriptions.
Required scopes: webhook:read-write.
curl --request PATCH \
--url https://api.attio.com/v2/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"target_url": "https://example.com/webhook",
"subscriptions": [
{
"event_type": "note.created",
"filter": {
"$and": [
{
"field": "parent_object_id",
"operator": "equals",
"value": "97052eb9-e65e-443f-a297-f2d9a4a7f795"
}
]
}
}
]
}
}
'{
"data": {
"target_url": "https://example.com/webhook",
"subscriptions": [
{
"event_type": "note.created",
"filter": {
"$and": [
{
"field": "parent_object_id",
"operator": "equals",
"value": "97052eb9-e65e-443f-a297-f2d9a4a7f795"
}
]
}
}
],
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"webhook_id": "23e42eaf-323a-41da-b5bb-fd67eebda553"
},
"status": "active",
"created_at": "2023-04-27T13:22:49.061281000Z"
}
}This API uses OAuth 2.0 with the authorization code grant flow.
A UUID which identifies the webhook.
"23e42eaf-323a-41da-b5bb-fd67eebda553"
Show child attributes
URL where the webhook events will be delivered to.
"https://example.com/webhook"
One or more events the webhook is subscribed to.
Show child attributes
Type of event the webhook is subscribed to.
call-recording.created, comment.created, comment.resolved, comment.unresolved, comment.deleted, list.created, list.updated, list.deleted, list-attribute.created, list-attribute.updated, list-entry.created, list-entry.updated, list-entry.deleted, object-attribute.created, object-attribute.updated, note.created, note-content.updated, note.updated, note.deleted, record.created, record.merged, record.updated, record.deleted, task.created, task.updated, task.deleted, workspace-member.created "note.created"
Filters to determine whether the webhook event should be sent. If null, the filter always passes.
{
"$and": [
{
"field": "parent_object_id",
"operator": "equals",
"value": "97052eb9-e65e-443f-a297-f2d9a4a7f795"
}
]
}
Success
Success
Show child attributes
URL where the webhook events will be delivered to.
"https://example.com/webhook"
One or more events the webhook is subscribed to.
Show child attributes
Type of event the webhook is subscribed to.
call-recording.created, comment.created, comment.resolved, comment.unresolved, comment.deleted, list.created, list.updated, list.deleted, list-attribute.created, list-attribute.updated, list-entry.created, list-entry.updated, list-entry.deleted, object-attribute.created, object-attribute.updated, note.created, note-content.updated, note.updated, note.deleted, record.created, record.merged, record.updated, record.deleted, task.created, task.updated, task.deleted, workspace-member.created "note.created"
Filters to determine whether the webhook event should be sent. If null, the filter always passes.
{
"$and": [
{
"field": "parent_object_id",
"operator": "equals",
"value": "97052eb9-e65e-443f-a297-f2d9a4a7f795"
}
]
}
The state of the webhook. Webhooks marked as active and degraded will receive events, inactive ones will not. If a webhook remains in the degraded state for 7 days, it will be marked inactive.
active, degraded, inactive "active"
When the webhook was created.
"2023-04-27T13:22:49.061281000Z"
Was this page helpful?