Event Campaigns Version 1

Note: This documentation describes Version 1 of our API, which is now depreciated. It will continue to work, but it will not reveive any updates or bug fixes. We recommend you use Version 2 instead. Documentation for this resource for Version 2 of our API is available here.

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 summaries (titles), 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/v1/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/v1/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/v1/event_campaigns/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3

Back To Top ↑

Field names and descriptions

Field Name Type Required on POST Description
identifiers array[] n/a An array of identifiers in the format [system name]:[id]. See the general concepts document for more information about identifiers.
originating_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_at datetime n/a The date and time the resource was created. System generated, not editable.
modified_at datetime n/a The date and time the resource was last modified. System generated, not editable.
summary string n/a The event campaign's 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.
url string n/a The URL to this event campaign's ZIP code search page on the Action Network.
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:sponsor hash n/a A hash of the sponsoring group of this event campaign. Action Network-only feature. Automatically added if you post using a group API key. System generated, not editable.
action_network:sponsor.summary string n/a The name of the sponsoring group.
action_network:sponsor.url string n/a 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/v1/event_campaigns/

Header:
api-key:[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/v1/event_campaigns?page=2"
    },
    "self": {
      "href": "https://actionnetwork.org/api/v1/event_campaigns"
    },
    "action_network:event_campaigns": [
      {
        "href": "https://actionnetwork.org/api/v1/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710"
      },
      {
        "href": "https://actionnetwork.org/api/v1/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29"
      },
      //truncated for brevity
    ],
    "curies": [
      {
        "name": "osdi",
        "href": "https://actionnetwork.org/docs/v1/{rel}",
        "templated": true
      },
      {
        "name": "action_network",
        "href": "https://actionnetwork.org/docs/v1/{rel}",
        "templated": true
      }
    ]
  },
  "_embedded": {
    "action_network:event_campaigns": [
      {
        "identifiers": [
          "action_network:874e7e97-973d-4683-b992-61e1ca120710"
        ],
        "originating_system": "Action Network",
        "created_at": "2014-03-07T16:50:29Z",
        "modified_at": "2014-03-07T16:51:16Z",
        "summary": "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>",
        "url": "https://actionnetwork.org/event_campaigns/house-parties-to-help-us-win",
        "host_url": "https://actionnetwork.org/events/new?event_campaign_id=84",
        "total_events": 35,
        "total_rsvps": 467,
        "action_network:sponsor": {
          "summary": "Progressive Action Now",
          "url": "https://actionnetwork.org/groups/progressive-action-now"
        },
        "_links": {
          "self": {
            "href": "https://actionnetwork.org/api/v1/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710"
          },
          "osdi:events": {
            "href": "https://actionnetwork.org/api/v1/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710/events"
          },
          "action_network:embed": {
            "href": "https://actionnetwork.org/api/v1/event_campaigns/874e7e97-973d-4683-b992-61e1ca120710/embed"
          }
        }
      },
      {
        "identifiers": [
          "action_network:e948ff6c-9f1e-11e3-a2e9-12313d316c29"
        ],
        "originating_system": "Action Network",
        "created_at": "2014-02-03T16:32:34Z",
        "modified_at": "2014-02-03T16:42:10Z",
        "summary": "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>",
        "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": {
          "summary": "Progressive Action Now",
          "url": "https://actionnetwork.org/groups/progressive-action-now"
        },
        "_links": {
          "self": {
            "href": "https://actionnetwork.org/api/v1/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29"
          },
          "osdi:events": {
            "href": "https://actionnetwork.org/api/v1/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29/events"
          },
          "action_network:embed": {
            "href": "https://actionnetwork.org/api/v1/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/v1/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29

Header:
api-key:[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"
  ],
  "originating_system": "Action Network",
  "created_at": "2014-02-03T16:32:34Z",
  "modified_at": "2014-02-03T16:42:10Z",
  "summary": "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>",
  "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": {
    "summary": "Progressive Action Now",
    "url": "https://actionnetwork.org/groups/progressive-action-now"
  },
  "_links": {
    "self": {
      "href": "https://actionnetwork.org/api/v1/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29"
    },
    "osdi:events": {
      "href": "https://actionnetwork.org/api/v1/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29/events"
    },
    "action_network:embed": {
      "href": "https://actionnetwork.org/api/v1/event_campaigns/e948ff6c-9f1e-11e3-a2e9-12313d316c29/embed"
    },
    "curies": [
      {
        "name": "osdi",
        "href": "https://actionnetwork.org/docs/v1/{rel}",
        "templated": true
      },
      {
        "name": "action_network",
        "href": "https://actionnetwork.org/docs/v1/{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 ↑