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.

Note: Event campaigns are read-only and can only be created and manipulated by groups, so they will not appear using an individual API key.

Sections:

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

Back To Top ↑

Field names and descriptions

Field Name Type Required on POST Description
identifiers strings[] n/a An array of identifiers in the format [system name]:[id]. See the general concepts document for more information about identifiers.
origin_system string n/a A human readable string identifying where this event campaign originated. May be used in the user interface for this purpose.
created_date datetime n/a The date and time the resource was created. System generated, not editable.
modified_date datetime n/a The date and time the resource was last modified. System generated, not editable.
name string The event campaign's administrative title, only shown internally and not publicly.
title string n/a The event campaign's public title.
description string n/a The event campaign's description as shown on the ZIP code search page. May contain HTML.
host_pitch string n/a The text shown to hosts when they are signing up to host an event as part of this event campaign.
host_instructions string n/a The text shown to hosts after they create an event as part of this event campaign. May contain HTML.
browser_url string n/a The URL to this event campaign's ZIP code search page on the Action Network.
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 n/a The URL to this event campaign's host page to create new events for this event campaign on the Action Network.
total_events integer n/a A system generated count of the number of events in this event campaign. Not editable.
total_rsvps integer n/a 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.
Back To Top ↑

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.
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

						
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
    ]
  }
}
					
Back To Top ↑

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

						
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
      }
    ]
  }
}
					
Back To Top ↑

Scenario: POST/PUT/DELETE

Posting, putting, and deleting event campaigns is not allowed. Attempts will result in errors.

Back To Top ↑