Action Payload

This document describes the Action Network webhook payload for actions.

Actions are a catch-all payload, representing things that don't otherwise have representation on the API or in other webhook payloads. An action could be subscribing an via manual addition of activists in the user interface, report mass subscribe, ladder subscriptions, or other similar catch-all "actions".

The action format is closely related to the person signup helper on the Action Network API. Please refer to that documentation for a fuller explanation of fields, format, and how they relate to other resources.

Actions are linked to the person resource corresponding to the activist who was part of the action.

Unlike most webhook payloads, action payloads will contain full "core" fields such as first name or address from an activist, even if those fields were not specifically part of the action data. They will generally not contain any custom fields or tags. Finally, action payloads originating from manually adding an activist will not indicate whether the person was subscribed or not due to that action.

Sections:

Type

Action events are identified by their type, which is the JSON closure that surrounds the hash in the POSTed array.

The action type is action_network:action.

Back To Top ↑

Field names and descriptions

Action fields:
Field Name Type Description
created_date datetime The date and time the resource was created.
modified_date datetime The date and time the resource was last modified.
action_network:referrer_data Referrer Data Always a blank hash. Action Network-only.
person Person* A hash representing person data to associate with this action. Contains full core fields and typically no custom fields. See above for more explanation. See the people documentation for more information about people.
add_tags strings[] An array of strings representing tags that were added to the person's record during the action creation. Typically no tags will be sent on action payloads. Note: The person may have already had these tags applied to their record before taking action, and in a network these tags may not exist on parent groups. This array only represents what tags were attempted to be added to the person's record, not the actual result of those operations.
action_network:sponsor Sponsor A hash of sponsor data indicating the sponsoring group the action occurred on. Useful for determining where in a network the event originated. Action Network-only.
Sponsor fields:
Field Name Type Description
title string The name of the sponsoring group.
browser_url string The URL to the group's public page.
Back To Top ↑

Links

Link Name Description
osdi:person A link to the person who was part of the action. Click here for people documentation.
Back To Top ↑

Related resources

Back To Top ↑

Example

If an activist is manually added via the user interface and your webhook's trigger matches the event, an action webhook payload like the below will be fired off to your server's webhook URL. The below example does not show all possible fields. As noted above, all core fields but no custom fields or tags will be included in the payload.

Request

						
POST https://your-webhook-url.com

Header:
Content-Type: application/json


[
  {
    "action_network:action": {
      "created_date": "2018-11-07T19:49:26Z",
      "modified_date": "2018-11-07T19:49:26Z",
      "person": {
        "created_date": "2018-11-07T17:56:40Z",
        "modified_date": "2018-11-07T19:46:40Z",
        "family_name": "Smith",
        "postal_addresses": [
          {
            "primary": true,
            "address_lines": [
              "1600 Pennsylvania Ave NW"
            ],
            "locality": "Washington",
            "postal_code": "20036",
            "region": "District of Columbia",
            "country": "US",
            "location": {
              "latitude": 41.2967,
              "longitude": -73.6698,
              "accuracy": "Approximate"
            }
          }
        ],  
        "email_addresses": [
          {
            "primary": true,
            "address": "jsmith@mail.com",
            "status": "subscribed"
          }
        ],
        "languages_spoken": [
          "en"
        ]
      },
      "action_network:referrer_data": {},
      "_links": {
        "osdi:person": {
          "href": "https://actionnetwork.org/api/v2/people/0df69aaf-3614-4315-b73a-088866b404e8"
        }
      }
    },
    "action_network:sponsor": {
      "title": "Progressive Action Now",
      "url": "https://actionnetwork.org/groups/progressive-action-now"
    }
  }
]
					
Back To Top ↑