Event Campaigns Version 2
This document describes the event campaigns collection and event campaign resource as implemented by the Action Network.
Event campaigns are groups of events under a common heading, created by the group associated with your API key. They correspond to event campaigns created in the Action Network user interface.
Event campaigns have names (corresponding to our administrative titles), titles, and can have descriptions and other fields. Events that are part of the event campaign are linked as a collection.
Event campaigns are not deduplicated except on identifiers, to keep identifiers unique. Identifiers are deduplicated globally, across groups and API keys, so ensure any you set are globally unique.
Note: Event campaign pages created via the API are not equivalent to event campaign pages created with our user interface. API-created event campaigns pages will not show up in lists of all of your actions on your dashboard of group page, they will not be given a URL on actionnetwork.org where people can find an event and RSVP, they will not have individual manage pages for statistics and counting of amounts, and they will not send autoresponses. Rather, they will show up as actions available for selection in our targeting interface, allowing you to select all people who have taken action on an event in that event campaign page for reports or email targeting.
You can post a new event to the event_campaigns/[event_campaign_id]/events
endpoint and an event resource will be created in our system. You can read more about the events resource here.
Sections:
- Endpoints and URL structures
- Field names and descriptions
- Links
- Related resources
- Scenario: Retrieving a collection of event campaign resources (GET)
- Scenario: Retrieving an individual event campaign resource (GET)
- Scenario: Creating a new event campaign (POST)
- Scenario: Creating a new event in an event campaign (POST)
- Scenario: Modifying an event campaign (PUT)
- Scenario: DELETE
Endpoints and URL structures
Endpoints:
https://actionnetwork.org/api/v2/event_campaigns
Event campaign resources live exclusively at the above endpoint. The endpoint returns a collection of all the event campaigns associated with your API key.
URL Structures:
https://actionnetwork.org/api/v2/event_campaigns/[id]
To address a specific event campaign, use the identifier without the action_network:
prefix to construct a URL, like https://actionnetwork.org/api/v2/event_campaigns/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3
Field names and descriptions
Field Name | Type | Required on POST | Description |
---|---|---|---|
identifiers | strings[] |
An array of identifiers in the format [system name]:[id] . See the general concepts document for more information about identifiers.
|
|
origin_system | string | Yes | A human readable string identifying where this event campaign page originated. May be used in the user interface for this purpose. |
created_date | datetime | The date and time the resource was created. | |
modified_date | datetime | The date and time the resource was last modified. | |
name | string | The event campaign's administrative title, only shown internally and not publicly. | |
title | string | Yes | The event campaign's public title. |
description | string | The event campaign's description as shown on the ZIP code search page. May contain HTML. | |
host_pitch | string | The text shown to hosts when they are signing up to host an event as part of this event campaign. | |
host_instructions | string | The text shown to hosts after they create an event as part of this event campaign. May contain HTML. | |
browser_url | string | The URL to this event campaign's ZIP code search page on the Action Network or a third party. | |
featured_image_url | string | The URL to this action's featured image on the Action Network, if a banner image has been set. Not editable. | |
host_url | string | The URL to this event campaign's host page to create new events for this event campaign on the Action Network. | |
total_events | integer | A system generated count of the number of events in this event campaign.Not editable. | |
total_rsvps | integer | A system generated count of the number of RSVPs in this event campaign.Not editable. | |
action_network:hidden | boolean | A read-only field indicating whether this action is hidden in our user interface or not. | |
action_network:sponsor | Sponsor | A hash of the sponsoring group of this event campaign. Action Network-only feature. System generated, not editable. |
Sponsor fields:
Field Name | Type | Required on POST | Description |
---|---|---|---|
title | string | The name of the sponsoring group. | |
browser_url | string | The URL to the group's public page. |
Links
Link Name | Description |
---|---|
self | A link to this individual event campaign resource. |
osdi:events | A link to a collection of all event resources associated with this event campaign. Click here for events documentation. |
action_network:embed | A link to embed code for this form. Action Network-only feature. Click here for embed documentation. |
Related resources
Back To Top ↑Scenario: Retrieving a collection of event campaign resources (GET)
Event campaign resources are sometimes presented as collections of event campaigns. For example, calling the event campaigns endpoint will return a collection of all the event campaigns associated with your API key.
Request
GET https://actionnetwork.org/api/v2/event_campaigns/
Header:
OSDI-API-Token: your_api_key_here
Response
Back To Top ↑200 OK Content-Type: application/hal+json Cache-Control: max-age=0, private, must-revalidate
{ "total_pages": 10, "per_page": 25, "page": 1, "total_records": 237, "_links": { "next": { "href": "https://actionnetwork.org/api/v2/event_campaigns?page=2" }, "self": { "href": "https://actionnetwork.org/api/v2/event_campaigns" }, "action_network:event_campaigns": [ { "href": "https://actionnetwork.org/api/v2/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710" }, { "href": "https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29" }, //truncated for brevity ], "curies": [ { "name": "osdi", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true }, { "name": "action_network", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true } ] }, "_embedded": { "action_network:event_campaigns": [ { "identifiers": [ "action_network:874e7e97-973d-4683-b992-61e1ca120710" ], "origin_system": "Action Network", "created_date": "2014-03-07T16:50:29Z", "modified_date": "2014-03-07T16:51:16Z", "title": "House parties to help us win!", "description": "<p>Host house parties next week to help us win our campaign!</p>", "host_pitch": "Hosting a house party is easy! Sign up and we'll give you what you need to know.", "host_instructions": "<p>Download our toolkit for all the instructions you need to host an event.</p>", "browser_url": "https://actionnetwork.org/event_campaigns/house-parties-to-help-us-win", "host_url": "https://actionnetwork.org/events/new?event_campaign_id=84", "featured_image_url": "https://actionnetwork.org/images/events.jpg", "total_events": 35, "total_rsvps": 467, "action_network:hidden": false, "action_network:sponsor": { "title": "Progressive Action Now", "url": "https://actionnetwork.org/groups/progressive-action-now" }, "_links": { "self": { "href": "https://actionnetwork.org/api/v2/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710" }, "osdi:events": { "href": "https://actionnetwork.org/api/v2/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710/events" }, "action_network:embed": { "href": "https://actionnetwork.org/api/v2/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710/embed" } } }, { "identifiers": [ "action_network:e948ff6c-9f1e-11e3-a2e9-12313d316c29" ], "origin_system": "Action Network", "created_date": "2014-02-03T16:32:34Z", "modified_date": "2014-02-03T16:42:10Z", "title": "Protest the bad bill in your town", "description": "<p>Help us stop this bad bill from becoming law by joining a local protest.</p>", "host_pitch": "Hosting is easy, we'll help you out, do it now!", "host_instructions": "<p>Here's everything you need to host a protest...</p>", "browser_url": "https://actionnetwork.org/event_campaigns/protest-the-bad-bill-in-your-town", "host_url": "https://actionnetwork.org/events/new?event_campaign_id=82", "total_events": 4, "total_rsvps": 11, "action_network:sponsor": { "title": "Progressive Action Now", "url": "https://actionnetwork.org/groups/progressive-action-now" }, "_links": { "self": { "href": "https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29" }, "osdi:events": { "href": "https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29/events" }, "action_network:embed": { "href": "https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29/embed" } } }, //truncated for brevity ] } }
Scenario: Retrieving an individual event campaign resource (GET)
Calling an individual event campaign resource will return the resource directly, along with all associated fields and appropriate links to additional information about the event campaign.
Request
GET https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29
Header:
OSDI-API-Token: your_api_key_here
Response
Back To Top ↑200 OK Content-Type: application/hal+json Cache-Control: max-age=0, private, must-revalidate
{ "identifiers": [ "action_network:e948ff6c-9f1e-11e3-a2e9-12313d316c29" ], "origin_system": "Action Network", "created_date": "2014-02-03T16:32:34Z", "modified_date": "2014-02-03T16:42:10Z", "title": "Protest the bad bill in your town", "description": "<p>Help us stop this bad bill from becoming law by joining a local protest.</p>", "host_pitch": "Hosting is easy, we'll help you out, do it now!", "host_instructions": "<p>Here's everything you need to host a protest...</p>", "browser_url": "https://actionnetwork.org/event_campaigns/protest-the-bad-bill-in-your-town", "host_url": "https://actionnetwork.org/events/new?event_campaign_id=82", "featured_image_url": "https://actionnetwork.org/images/events.jpg", "total_events": 4, "total_rsvps": 11, "action_network:hidden": false, "action_network:sponsor": { "title": "Progressive Action Now", "url": "https://actionnetwork.org/groups/progressive-action-now" }, "_links": { "self": { "href": "https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29" }, "osdi:events": { "href": "https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29/events" }, "action_network:embed": { "href": "https://actionnetwork.org/api/v2/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29/embed" }, "curies": [ { "name": "osdi", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true }, { "name": "action_network", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true } ] } }
Scenario: Creating a new event campaign (POST)
You can post a new event campaign to the event campaign endpoint and a event campaign resource will be created in our system.
Note: Event campaigns created via the API in this way are not equivalent to petitions created with our user interface. API-created event campaigns will not show up in lists of all of your actions on your dashboard or group page, they will not be given a URL on actionnetwork.org where people can sign, they will not send autoresponses, and they will not have individual manage pages for statistics and management. Rather, once they have at least one RSVP, they will show up as actions available for selection in our targeting interface, allowing you to select all people who have taken action on that event campaign for reports or email targeting.
In the targeting interface, they will show up in the format [1, (origin system) Event Campaign], (title). For example, an event campaign with the origin system 'EventCampaigns.com' and the title 'My Free Event Campaign' will show up in the targeting interface as [1, EventCampaigns.Com Event Campaign], Free Event Campaign so you can easily identify what it is and where it came from when doing your targeting.
Request
POST https://actionnetwork.org/api/v2/event_campaigns
Header:
Content-Type: application/json
OSDI-API-Token: your_api_key_here
{
"title": "Canvassing Events",
"origin_system": "AmyforTexas.com"
}
Response
Back To Top ↑200 OK Content-Type: application/hal+json Cache-Control: max-age=0, private, must-revalidate
{ "identifiers": [ "action_network:9f837109-710d-442f-8a99-857a21f36d25" ], "created_date": "2020-03-26T15:26:30Z", "modified_date": "2020-03-26T15:26:30Z", "title": "Canvassing Events", "total_events": 0, "origin_system": "AmyforTexas.com", "action_network:hidden": false, "_embedded": { "osdi:creator": { "given_name": "John", "family_name": "Doe", "created_date": "2020-03-20T21:04:31Z", "modified_date": "2020-03-20T21:04:31Z", "identifiers": [ "action_network:c945d6fe-929e-11e3-a2e9-12313d316c29" ], "email_addresses": [ { "primary": true, "address": "jdoe@mail.com", "status": "subscribed" } ], "phone_numbers": [ { "primary": true, "number": "12021234444", "number_type": "Mobile", "status": "subscribed" } ], "postal_addresses": [ { "primary": true, "address_lines": [ "1600 Pennsylvania Ave" ], "locality": "Washington", "region": "DC", "postal_code": "20009", "country": "US", "language": "en", "location": { "latitude": 32.249, "longitude": -73.0339, "accuracy": "Approximate" } } ], "languages_spoken": [ "en" ], "_links": { "self": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29" }, "osdi:attendances": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/attendances" }, "osdi:signatures": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/signatures" }, "osdi:submissions": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/submissions" }, "osdi:donations": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/donations" }, "osdi:outreaches": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/outreaches" }, "osdi:taggings": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/taggings" }, "curies": [ { "name": "osdi", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true }, { "name": "action_network", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true } ] } } }, "_links": { "self": { "href": "https://actionnetwork.org/api/v2/event_campaigns/d3e27e15-e5b5-4707-be96-8bc359462133" }, "osdi:events": { "href": "https://actionnetwork.org/api/v2/event_campaigns/c945d6fe-929e-11e3-a2e9-12313d316c29" }, "action_network:embed": { "href": "https://actionnetwork.org/api/v2/event_campaigns/9f837109-710d-442f-8a99-857a21f36d25/embed" }, "curies": [ { "name": "osdi", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true }, { "name": "action_network", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true } ] } }
Scenario: Creating a new event in an event campaign (POST)
You can post a new event to the event_campaign/[event_campaign_id]/events
endpoint and an event resource will be created in our system.
Note: Events created via the API in this way are not equivalent to events created with our user interface. API-created events will not show up in lists of all of your actions on your dashboard or group manage page, they will not be given a URL on actionnetwork.org where people can sign, they will not have individual manage pages for statistics, and they will not send out autoresponses or reminders. Rather, once they have at least one attendance, they will show up as actions available for selection in our targeting interface, allowing you to select all people who have taken action on that event for reports or email targeting.
In the targeting interface, they will show up in the format [1, (origin system) Event Campaign], (title). For example, an event campaign with the origin system 'EventCampaigns.com' and the title 'My Free Event Campaign' will show up in the targeting interface as [1, EventCampaigns.Com Event Campaign], Free Event Campaign so you can easily identify what it is and where it came from when doing your targeting.
Request
POST https://actionnetwork.org/api/v2/event_campaigns/[event_campaign_id]/events Header: Content-Type: application/json OSDI-API-Token: your_api_key_here
{ "title": "My Canvassing Event", "origin_system": "CanvassingEvents.com" }
Response
Back To Top ↑200 OK Content-Type: application/hal+json Cache-Control: max-age=0, private, must-revalidate
{ "origin_system": "CanvassingEvents.com", "identifiers": [ "action_network:21789f03-0180-45d3-853c-91bd6fdc8c07" ], "status": "confirmed", "created_date": "2020-03-26T21:02:09Z", "modified_date": "2020-03-26T21:02:09Z", "title": "My Canvassing Event", "transparence": "opaque", "visibility": "public", "guests_can_invite_others": true, "capacity": 10, "reminders": [ { "method": "email", "minutes": 1440 } ], "total_accepted": 0, "action_network:hidden": false, "location": { "region": "", "country": "US", "language": "en", "location": { "latitude": 39.7599977890005, "longitude": -98.4999989109997, "accuracy": "Approximate" } }, "_links": { "self": { "href": "https://actionnetwork.org/api/v2/events/21789f03-0180-45d3-853c-91bd6fdc8c07" }, "osdi:attendances": { "href": "https://actionnetwork.org/api/v2/events/21789f03-0180-45d3-853c-91bd6fdc8c07/attendances" }, "osdi:record_attendance_helper": { "href": "https://actionnetwork.org/api/v2/events/21789f03-0180-45d3-853c-91bd6fdc8c07/attendances" }, "osdi:organizer": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29" }, "osdi:creator": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29" }, "action_network:embed": { "href": "https://actionnetwork.org/api/v2/events/21789f03-0180-45d3-853c-91bd6fdc8c07/embed" }, "curies": [ { "name": "osdi", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true }, { "name": "action_network", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true } ] } }
Scenario: Modifying an event campaign (PUT)
You can modify an existing event campaign by using PUT on its individual endpoint.
Request
PUT https://actionnetwork.org/api/v2/event_campaigns/[event_campaign_id] Header: Content-Type: application/json OSDI-API-Token: your_api_key_here
{ "description": "This is my new event campaign description" }
Response
200 OK Content-Type: application/hal+json Cache-Control: max-age=0, private, must-revalidate
{ "identifiers": [ "action_network:9f837109-710d-442f-8a99-857a21f36d25" ], "created_date": "2020-03-26T15:26:30Z", "modified_date": "2020-03-26T15:26:30Z", "title": "Canvassing Events", "description": "This is my new event campaign description", "total_events": 0, "origin_system": "AmyforTexas.com", "action_network:hidden": false, "_embedded": { "osdi:creator": { "given_name": "John", "family_name": "Doe", "created_date": "2020-03-20T21:04:31Z", "modified_date": "2020-03-20T21:04:31Z", "identifiers": [ "action_network:c945d6fe-929e-11e3-a2e9-12313d316c29" ], "email_addresses": [ { "primary": true, "address": "jdoe@mail.com", "status": "subscribed" } ], "phone_numbers": [ { "primary": true, "number": "12021234444", "number_type": "Mobile", "status": "subscribed" } ], "postal_addresses": [ { "primary": true, "address_lines": [ "1600 Pennsylvania Ave" ], "locality": "Washington", "region": "DC", "postal_code": "20009", "country": "US", "language": "en", "location": { "latitude": 32.249, "longitude": -73.0339, "accuracy": "Approximate" } } ], "languages_spoken": [ "en" ], "_links": { "self": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29" }, "osdi:attendances": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/attendances" }, "osdi:signatures": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/signatures" }, "osdi:submissions": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/submissions" }, "osdi:donations": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/donations" }, "osdi:outreaches": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/outreaches" }, "osdi:taggings": { "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/taggings" }, "curies": [ { "name": "osdi", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true }, { "name": "action_network", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true } ] } } }, "_links": { "self": { "href": "https://actionnetwork.org/api/v2/event_campaigns/d3e27e15-e5b5-4707-be96-8bc359462133" }, "osdi:events": { "href": "https://actionnetwork.org/api/v2/event_campaigns/c945d6fe-929e-11e3-a2e9-12313d316c29" }, "action_network:embed": { "href": "https://actionnetwork.org/api/v2/event_campaigns/9f837109-710d-442f-8a99-857a21f36d25/embed" }, "curies": [ { "name": "osdi", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true }, { "name": "action_network", "href": "https://actionnetwork.org/docs/v2/{rel}", "templated": true } ] } }
The above example added a description. Identifiers are deduplicated globally, across groups and API keys, so ensure any you set are globally unique.
Editing of certain fields via PUT is not allowed, and is noted in the field names table above.
Scenario: DELETE
Deleting event campaigns is not allowed. Attempts will result in errors.
Back To Top ↑