Webhooks

Webhooks allow you to subscribe to notifications about events that occur on Asana resources (e.g., tasks, projects, stories, etc.).

📘

Webhooks tutorial

For a more detailed explanation of webhooks see the overview of webhooks.


WebhookCompact

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
activebooleanIf true, the webhook will send events - if false it is considered inactive and will not generate events.
resourceobjectA generic Asana Resource, containing a globally unique identifier.
resource.gidstringGlobally unique identifier of the resource, as a string.
resource.resource_typestringThe base type of this resource.
resource.namestringThe name of the object.
targetstring (uri)The URL to receive the HTTP POST.

Example JSON for WebhookCompact:

{
  "gid": "12345",
  "resource_type": "webhook",
  "active": false,
  "resource": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task"
  },
  "target": "https://example.com/receive-webhook/7654"
}

Webhook

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
activebooleanIf true, the webhook will send events - if false it is considered inactive and will not generate events.
resourceobjectA generic Asana Resource, containing a globally unique identifier.
resource.gidstringGlobally unique identifier of the resource, as a string.
resource.resource_typestringThe base type of this resource.
resource.namestringThe name of the object.
targetstring (uri)The URL to receive the HTTP POST.
created_atstring (date-time)The time at which this resource was created.
last_failure_atstring (date-time)The timestamp when the webhook last received an error when sending an event to the target.
last_failure_contentstringThe contents of the last error response sent to the webhook when attempting to deliver events to the target.
last_success_atstring (date-time)The timestamp when the webhook last successfully sent an event to the target.
delivery_retry_countintegerThe number of times the webhook has retried delivery of events to the target (resets after a successful attempt).
next_attempt_afterstring (date-time)The timestamp after which the webhook will next attempt to deliver an event to the target.
failure_deletion_timestampstring (date-time)The timestamp when the webhook will be deleted if there is no successful attempt to deliver events to the target
filters[object]Whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.
filters[]objectA set of filters to specify a whitelist for what types of events will be delivered.
filters[].resource_typestringThe type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to task.
filters[].resource_subtypestringThe resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the resource_subtype field on the resources themselves.
filters[].actionstringThe type of change on the resource to pass through the filter. For more information refer to Event.action in the event schema. This can be one of changed, added, removed, deleted, and undeleted depending on the nature of what has occurred on the resource.
filters[].fields[string]Conditional. A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only valid for action of type changed Note: Subscriptions created on higher-level resources such as a Workspace, Team, or Portfolio do not support fields.
filters[].fields[]string

Example JSON for Webhook:

{
  "gid": "12345",
  "resource_type": "webhook",
  "active": false,
  "resource": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task"
  },
  "target": "https://example.com/receive-webhook/7654",
  "created_at": "2012-02-22T02:06:58.147Z",
  "last_failure_at": "2012-02-22T02:06:58.147Z",
  "last_failure_content": "500 Server Error\\n\\nCould not complete the request",
  "last_success_at": "2012-02-22T02:06:58.147Z",
  "delivery_retry_count": 3,
  "next_attempt_after": "2012-02-22T02:06:58.147Z",
  "failure_deletion_timestamp": "2012-02-22T02:06:58.147Z",
  "filters": [
    {
      "resource_type": "task",
      "resource_subtype": "milestone",
      "action": "changed",
      "fields": [
        "due_at",
        "due_on",
        "dependencies"
      ]
    }
  ]
}
Asana Home
Asana helps you manage projects, focus on what's important, and organize work in one place for seamless collaboration.
© 2023 Asana, Inc.