Attio.Webhooks (Attio v0.3.0)

Copy Markdown View Source

Functions for managing webhook subscriptions.

Webhooks allow your application to receive real-time notifications when data changes in Attio. Requires the webhook:read scope for read operations and webhook:read-write for mutations.

Summary

Functions

Creates a webhook.

Deletes a webhook.

Gets a single webhook by its ID.

Lists all webhooks in the workspace.

Updates a webhook (e.g. to change its target URL or subscriptions).

Functions

create(client, attrs)

@spec create(Attio.Client.t(), map()) :: Attio.Client.response()

Creates a webhook.

Required attributes

  • "target_url" - The HTTPS URL that will receive event payloads.
  • "subscriptions" - List of event subscription objects, each with an "event_type" field.

Example

Attio.Webhooks.create(client, %{
  "target_url" => "https://my-app.example.com/webhooks/attio",
  "subscriptions" => [
    %{"event_type" => "record.created"},
    %{"event_type" => "record.updated"}
  ]
})

delete(client, webhook_id)

Deletes a webhook.

get(client, webhook_id)

Gets a single webhook by its ID.

list(client)

Lists all webhooks in the workspace.

update(client, webhook_id, attrs)

@spec update(Attio.Client.t(), String.t(), map()) :: Attio.Client.response()

Updates a webhook (e.g. to change its target URL or subscriptions).