Asana: Webhooks schemas
9 Asana schemas with complete fields and constraints.
← Webhooks operations · All schemas
Establish a webhook — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
resource | string | Required within parent | A resource ID to subscribe to. Many Asana resources are valid to create webhooks on, but higher-level resources require filters. |
target | string | Required within parent | The URL to receive the HTTP POST. The full URL will be used to deliver events from this webhook (including parameters) which allows encoding of application-specific state when the webhook is created. Format: uri |
filters | array | Optional | An array of WebhookFilter objects to specify a 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[] | JSON | Each item | |
filters[] (allOf 1) | Model | All variants apply | Expand Update a webhook — request body — body data filters item action, fields, resource subtype, resource type |
filters[] (allOf 2) | JSON | All variants apply | A set of filters to specify a whitelist for what types of events will be delivered. |
filters[] (allOf 3) | object | All variants apply |
Referenced models: Update a webhook — request body — body data filters item action, fields, resource subtype, resource type
Get a webhook — response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Get a webhook — response body — data data — sdk__Webhook Response |
Referenced models: Get a webhook — response body — data data — sdk__Webhook Response
Get a webhook — response body — data data active, gid, resource, resource type, target
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Webhook objects represent the state of an active subscription for a server to be updated with information from Asana. This schema represents the subscription itself, not the objects that are sent to the server. For information on those please refer to the [event](/reference/events) schema. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
active | boolean | Optional | If true, the webhook will send events - if false it is considered inactive and will not generate events. Read only: true |
resource | Model | Optional | Expand Get objects via typeahead — response body — data data item |
target | string | Optional | The URL to receive the HTTP POST. Format: uri Read only: true |
Referenced models: Get objects via typeahead — response body — data data item
Get a webhook — response body — data data filters item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A WebhookFilter can be passed on creation of a webhook in order to filter the types of actions that trigger delivery of an [event](/reference/events)A WebhookFilter can be passed on creation of a webhook in order to filter the types of actions that trigger delivery of an [event](/reference/events) A set of filters to specify a whitelist for what types of events will be delivered. |
resource_type | string | Optional | The 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`. |
resource_subtype | string | Optional | The 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. |
action | string | Optional | The type of change on the **resource** to pass through the filter. For more information refer to `Event.action` in the [event](/reference/events) schema. This can be one of `changed`, `added`, `removed`, `deleted`, and `undeleted` depending on the nature of what has occurred on the resource. |
fields | array | Optional | *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.* |
fields[] | string | Each item |
Get a webhook — response body — data data — Webhook Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get a webhook — response body — data data active, gid, resource, resource type, target |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).created_at | string | Optional | The time at which this resource was created. Format: date-time Read only: true |
$ (allOf 2).last_failure_at | JSON | Optional | |
$ (allOf 2).last_failure_at (anyOf 1) | string | Alternative | The timestamp when the webhook last received an error when sending an event to the target. Format: date-time Read only: true |
$ (allOf 2).last_failure_at (anyOf 2) | null | Alternative | |
$ (allOf 2).last_failure_content | JSON | Optional | |
$ (allOf 2).last_failure_content (anyOf 1) | string | Alternative | The contents of the last error response sent to the webhook when attempting to deliver events to the target. Read only: true |
$ (allOf 2).last_failure_content (anyOf 2) | null | Alternative | |
$ (allOf 2).last_success_at | JSON | Optional | |
$ (allOf 2).last_success_at (anyOf 1) | string | Alternative | The timestamp when the webhook last successfully sent an event to the target. Format: date-time Read only: true |
$ (allOf 2).last_success_at (anyOf 2) | null | Alternative | |
$ (allOf 2).delivery_retry_count | JSON | Optional | |
$ (allOf 2).delivery_retry_count (anyOf 1) | integer | Alternative | The number of times the webhook has retried delivery of events to the target (resets after a successful attempt). Read only: true |
$ (allOf 2).delivery_retry_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (allOf 2).next_attempt_after | string | Optional | The timestamp after which the webhook will next attempt to deliver an event to the target. Format: date-time Read only: true |
$ (allOf 2).failure_deletion_timestamp | string | Optional | The timestamp when the webhook will be deleted if there is no successful attempt to deliver events to the target Format: date-time Read only: true |
$ (allOf 2).filters | array | Optional | 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. |
$ (allOf 2).filters[] | JSON | Each item | |
$ (allOf 2).filters[] (allOf 1) | Model | All variants apply | Expand Update a webhook — request body — body data filters item action, fields, resource subtype, resource type |
$ (allOf 2).filters[] (allOf 2) | JSON | All variants apply | A set of filters to specify a whitelist for what types of events will be delivered. |
$ (allOf 2).filters[] (allOf 3) | object | All variants apply |
Referenced models: Get a webhook — response body — data data active, gid, resource, resource type, target, Update a webhook — request body — body data filters item action, fields, resource subtype, resource type
Get a webhook — response body — data data — sdk__Webhook Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. Webhook objects represent the state of an active subscription for a server to be updated with information from Asana. This schema represents the subscription itself, not the objects that are sent to the server. For information on those please refer to the [event](/reference/events) schema. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
active | boolean | Optional | If true, the webhook will send events - if false it is considered inactive and will not generate events. Read only: true |
resource | object | Optional | A generic Asana Resource, containing a globally unique identifier. |
resource.gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource.resource_type | string | Optional | The base type of this resource. Read only: true |
resource.name | string | Optional | The name of the object. |
target | string | Optional | The URL to receive the HTTP POST. Format: uri Read only: true |
created_at | string | Optional | The time at which this resource was created. Format: date-time Read only: true |
last_failure_at | JSON | Optional | |
last_failure_at (anyOf 1) | string | Alternative | The timestamp when the webhook last received an error when sending an event to the target. Format: date-time Read only: true |
last_failure_at (anyOf 2) | null | Alternative | |
last_failure_content | JSON | Optional | |
last_failure_content (anyOf 1) | string | Alternative | The contents of the last error response sent to the webhook when attempting to deliver events to the target. Read only: true |
last_failure_content (anyOf 2) | null | Alternative | |
last_success_at | JSON | Optional | |
last_success_at (anyOf 1) | string | Alternative | The timestamp when the webhook last successfully sent an event to the target. Format: date-time Read only: true |
last_success_at (anyOf 2) | null | Alternative | |
delivery_retry_count | JSON | Optional | |
delivery_retry_count (anyOf 1) | integer | Alternative | The number of times the webhook has retried delivery of events to the target (resets after a successful attempt). Read only: true |
delivery_retry_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
next_attempt_after | string | Optional | The timestamp after which the webhook will next attempt to deliver an event to the target. Format: date-time Read only: true |
failure_deletion_timestamp | string | Optional | The timestamp when the webhook will be deleted if there is no successful attempt to deliver events to the target Format: date-time Read only: true |
filters | array | Optional | 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[] | Model | Each item | Expand Get a webhook — response body — data data filters item |
Referenced models: Get a webhook — response body — data data filters item
Get multiple webhooks — response body — data, next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Get a webhook — response body — data data — sdk__Webhook Response |
next_page | Model | Optional | Expand Get goals — response body — data, next page next page |
Referenced models: Get goals — response body — data, next page next page, Get a webhook — response body — data data — sdk__Webhook Response
Update a webhook — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
filters | array | Optional | An array of WebhookFilter objects to specify a 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[] | JSON | Each item | |
filters[] (allOf 1) | Model | All variants apply | Expand Update a webhook — request body — body data filters item action, fields, resource subtype, resource type |
filters[] (allOf 2) | JSON | All variants apply | A set of filters to specify a whitelist for what types of events will be delivered. |
filters[] (allOf 3) | object | All variants apply |
Referenced models: Update a webhook — request body — body data filters item action, fields, resource subtype, resource type
Update a webhook — request body — body data filters item action, fields, resource subtype, resource type
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A WebhookFilter can be passed on creation of a webhook in order to filter the types of actions that trigger delivery of an [event](/reference/events) |
resource_type | string | Optional | The 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`. |
resource_subtype | string | Optional | The 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. |
action | string | Optional | The type of change on the **resource** to pass through the filter. For more information refer to `Event.action` in the [event](/reference/events) schema. This can be one of `changed`, `added`, `removed`, `deleted`, and `undeleted` depending on the nature of what has occurred on the resource. |
fields | array | Optional | *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.* |
fields[] | string | Each item |