Introduction
How-to guides
Endpoint reference
- Core endpoints
- Objects
- Attributes
- Records
- Lists
- Entries
- Workspace members
- Notes
- Tasks
- Threads
- Comments
- Webhooks
- Meta
- Standard objects
- OAuth 2.0
Webhooks
Create a webhook
Create a webhook and associated subscriptions.
Required scopes: webhook:read-write
.
POST
/
v2
/
webhooks
curl --request POST \
--url https://api.attio.com/v2/webhooks \
--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",
"secret": "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb"
}
}
For more information about webhooks, checkout our Using Webhooks page.
Authorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Body
application/json
Response
200
application/json
Success
Was this page helpful?
curl --request POST \
--url https://api.attio.com/v2/webhooks \
--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",
"secret": "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb"
}
}