1. Webhooks
    2. /Webhook

    Webhook

    Webhooks allow you to integrate Attio with your system, by listening for events and triggering actions.


    List Webhooks

    Get all of the Webhooks in your Workspace.

    Scopes

    • webhook:readrequired

    Query params

    limitinteger

    The maximum number of results to return, between 10 and 100, defaults to 10. See the full guide to pagination here.

    offsetinteger

    The number of results to skip over before returning, defaults to 0. See the full guide to pagination here.

    Response

    Status code

    Description


    Request

    GET
    /v2/webhooks
    curl https://api.attio.com/v2/webhooks?limit=10&offset=5 \
    -H "Authorization: Bearer <token>"

    Response

    200 - Success

    {
    "data": [
    {
    "id": {
    "webhook_id": "23e42eaf-323a-41da-b5bb-fd67eebda553",
    "workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c"
    },
    "status": "active",
    "created_at": "2023-04-27T13:22:49.061281000Z",
    "target_url": "https://example.com/webhook",
    "subscriptions": [
    {
    "filter": {
    "$and": [
    {
    "field": "parent_object_id",
    "value": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "operator": "equals"
    }
    ]
    },
    "event_type": "note.created"
    }
    ]
    }
    ]
    }

    Create a Webhook

    Create a Webhook and associated Subscriptions.

    Scopes

    • webhook:read-writerequired

    Request Body

    dataobject

    REQUIRED

    Response

    Status code

    Description



    Request

    POST
    /v2/webhooks
    curl https://api.attio.com/v2/webhooks \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d @- << EOF
    {
    "data": {
    "target_url": "https://example.com/webhook",
    "subscriptions": [
    {
    "filter": {
    "$and": [
    {
    "field": "parent_object_id",
    "value": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "operator": "equals"
    }
    ]
    },
    "event_type": "note.created"
    }
    ]
    }
    }
    EOF

    Response

    200 - Success

    {
    "data": {
    "id": {
    "webhook_id": "23e42eaf-323a-41da-b5bb-fd67eebda553",
    "workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c"
    },
    "status": "active",
    "created_at": "2023-04-27T13:22:49.061281000Z",
    "target_url": "https://example.com/webhook",
    "subscriptions": [
    {
    "filter": {
    "$and": [
    {
    "field": "parent_object_id",
    "value": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "operator": "equals"
    }
    ]
    },
    "event_type": "note.created"
    }
    ]
    }
    }

    Get a Webhook

    Get a single Webhook.

    Scopes

    • webhook:readrequired

    Path params

    webhook_idstring

    REQUIRED

    A UUID which identifies the Webhook.

    Format: UUID

    Response

    Status code

    Description



    Request

    GET
    /v2/webhooks/:webhook_id
    curl https://api.attio.com/v2/webhooks/23e42eaf-323a-41da-b5bb-fd67eebda553 \
    -H "Authorization: Bearer <token>"

    Response

    200 - Success

    {
    "data": {
    "id": {
    "webhook_id": "23e42eaf-323a-41da-b5bb-fd67eebda553",
    "workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c"
    },
    "status": "active",
    "created_at": "2023-04-27T13:22:49.061281000Z",
    "target_url": "https://example.com/webhook",
    "subscriptions": [
    {
    "filter": {
    "$and": [
    {
    "field": "parent_object_id",
    "value": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "operator": "equals"
    }
    ]
    },
    "event_type": "note.created"
    }
    ]
    }
    }

    Update a Webhook

    Update a Webhook and associated Subscriptions.

    Scopes

    • webhook:read-writerequired

    Path params

    webhook_idstring

    REQUIRED

    A UUID which identifies the Webhook.

    Format: UUID

    Request Body

    dataobject

    REQUIRED

    Response

    Status code

    Description



    Request

    PATCH
    /v2/webhooks/:webhook_id
    curl https://api.attio.com/v2/webhooks/23e42eaf-323a-41da-b5bb-fd67eebda553 \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -X PATCH \
    -d @- << EOF
    {
    "data": {
    "target_url": "https://example.com/webhook",
    "subscriptions": [
    {
    "filter": {
    "$and": [
    {
    "field": "parent_object_id",
    "value": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "operator": "equals"
    }
    ]
    },
    "event_type": "note.created"
    }
    ]
    }
    }
    EOF

    Response

    200 - Success

    {
    "data": {
    "id": {
    "webhook_id": "23e42eaf-323a-41da-b5bb-fd67eebda553",
    "workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c"
    },
    "status": "active",
    "created_at": "2023-04-27T13:22:49.061281000Z",
    "target_url": "https://example.com/webhook",
    "subscriptions": [
    {
    "filter": {
    "$and": [
    {
    "field": "parent_object_id",
    "value": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
    "operator": "equals"
    }
    ]
    },
    "event_type": "note.created"
    }
    ]
    }
    }

    Delete a Webhook

    Delete a Webhook by ID.

    Scopes

    • webhook:read-writerequired

    Path params

    webhook_idstring

    REQUIRED

    A UUID identifying the Webhook to delete.

    Format: UUID

    Response

    Status code

    Description



    Request

    DELETE
    /v2/webhooks/:webhook_id
    curl https://api.attio.com/v2/webhooks/23e42eaf-323a-41da-b5bb-fd67eebda553 \
    -H "Authorization: Bearer <token>" \
    -X DELETE

    Response

    200 - Success

    {}