Wrappers Version 2

This document describes the OSDI wrappers collection and wrapper resource as implemented by the Action Network.

Wrappers are email wrappers created by the organizer or group associated with your API key that are added around mass emails that are sent via Action Network to add things like consistent branding.

Wrappers have names, header and footer HTML, optional suffixes, and other fields.

Note: Wrappers are read only.

Sections:

Endpoints and URL structures

Endpoints:

https://actionnetwork.org/api/v2/wrappers

Wrapper resources live exclusively at the above endpoint. The endpoint returns a collection of all the wrappers associated with your API key.

URL Structures:

https://actionnetwork.org/api/v2/wrappers/[id]

To address a specific wrapper, use the identifier without the action_network: prefix to construct a URL, like https://actionnetwork.org/api/v2/wrappers/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3

Back To Top ↑

Field names and descriptions

Wrapper fields:
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 wrapper 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 n/a The wrapper's name, only shown internally and not publicly.
header string n/a The HTML that makes up the header portion of the wrapper, displayed before the content of the mass email.
footer string n/a The HTML that makes up the footer portion of the wrapper, displayed after the content of the mass email.
action_network:suffix string n/a An optional suffix that is added to the end of the from line of the email when sent using this wrapper.
administrative_url string n/a The URL to this wrapper's editing page on the Action Network.
wrapper_type enum n/a The type of wrapper. Always "email".
default boolean n/a Indicates whether this wrapper is the default for the group or not.
Back To Top ↑

Links

Link Name Description
self A link to this individual wrapper resource.
Back To Top ↑

Scenario: Retrieving a collection of wrapper resources (GET)

Wrapper resources are sometimes presented as collections of wrappers. For example, calling the wrappers endpoint will return a collection of all the wrappers associated with your API key.

Request

						
GET https://actionnetwork.org/api/v2/wrappers/

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": 7,
  "per_page": 25,
  "page": 1,
  "total_records": 162,
  "_links": {
    "next": {
      "href": "https://actionnetwork.org/api/v2/wrappers?page=2"
    },
    "self": {
      "href": "https://actionnetwork.org/api/v2/wrappers"
    },
    "osdi:wrappers": [
      {
        "href": "https://actionnetwork.org/api/v2/wrappers/a4dde5b6-0512-48ea-b4ad-63a71117b43d"
      },
      {
        "href": "https://actionnetwork.org/api/v2/wrappers/a27178b9-45c3-4844-8ebf-ebd5da74a1e3"
      },
      //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": {
    "osdi:wrappers": [
      {
        "identifiers": [
          "action_network:a4dde5b6-0512-48ea-b4ad-63a71117b43d"
        ],
        "origin_system": "Action Network",
        "created_date": "2014-03-24T18:03:45Z",
        "modified_date": "2014-03-25T15:00:22Z",
        "name": "Default wrapper -- logo only",
        "administrative_url": "https://actionnetwork.org/wrappers/1/edit",
        "header": "<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" style=\"border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\">\r\n  <tr>\r\n    <td valign=\"top\" style=\"border-collapse: collapse; background-color: #FFFFFF; padding:10px 10px 40px;\">\r\n      <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" style=\"border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\">\r\n        <tr>\r\n          <td valign=\"top\" style=\"border-collapse: collapse;\" width=\"600\">\r\n            <div style=\"color: #505050;font-family: Arial;font-size: 14px;line-height: 150%;text-align: left;\">\r\n<img src=\"https://actionnetwork.org/images/logo.png\" />",
        "footer": "\r\n</div>\r\n          </td>\r\n        </tr>\r\n      </table>\r\n    </td>\r\n  </tr>\r\n</table>",
        "action_network:suffix": " via ProgressivePower.org",
        "wrapper_type": "email",
        "default": true
        "_links": {
          "self": {
            "href": "https://actionnetwork.org/api/v2/wrappers/a4dde5b6-0512-48ea-b4ad-63a71117b43d"
          }
        }
      },
      {
        "identifiers": [
          "action_network:a27178b9-45c3-4844-8ebf-ebd5da74a1e3"
        ],
        "origin_system": "Action Network",
        "created_date": "2014-03-14T15:21:05Z",
        "modified_date": "2014-03-17T19:56:11Z",
        "name": "No logo",
        "administrative_url": "https://actionnetwork.org/wrappers/2/edit",
        "header": "<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" style=\"border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\">\r\n  <tr>\r\n    <td valign=\"top\" style=\"border-collapse: collapse; background-color: #FFFFFF; padding:10px 10px 40px;\">\r\n      <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" style=\"border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\">\r\n        <tr>\r\n          <td valign=\"top\" style=\"border-collapse: collapse;\" width=\"600\">\r\n            <div style=\"color: #505050;font-family: Arial;font-size: 14px;line-height: 150%;text-align: left;\">\r\n",
        "footer": "\r\n</div>\r\n          </td>\r\n        </tr>\r\n      </table>\r\n    </td>\r\n  </tr>\r\n</table>",
        "wrapper_type": "email",
        "default": false
        "_links": {
          "self": {
            "href": "https://actionnetwork.org/api/v2/wrappers/a27178b9-45c3-4844-8ebf-ebd5da74a1e3"
          }
        }
      },
      //truncated for brevity
    ]
  }
}
					
Back To Top ↑

Scenario: Retrieving an individual wrapper resource (GET)

Calling an individual wrapper resource will return the resource directly, along with all associated fields and appropriate links to additional information about the wrapper.

Request

						
GET https://actionnetwork.org/api/v2/wrappers/a4dde5b6-0512-48ea-b4ad-63a71117b43d

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:a4dde5b6-0512-48ea-b4ad-63a71117b43d"
  ],
  "origin_system": "Action Network",
  "created_date": "2014-03-24T18:03:45Z",
  "modified_date": "2014-03-25T15:00:22Z",
  "name": "Default wrapper -- logo only",
  "administrative_url": "https://actionnetwork.org/wrappers/1/edit",
  "header": "<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" style=\"border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\">\r\n  <tr>\r\n    <td valign=\"top\" style=\"border-collapse: collapse; background-color: #FFFFFF; padding:10px 10px 40px;\">\r\n      <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" style=\"border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\">\r\n        <tr>\r\n          <td valign=\"top\" style=\"border-collapse: collapse;\" width=\"600\">\r\n            <div style=\"color: #505050;font-family: Arial;font-size: 14px;line-height: 150%;text-align: left;\">\r\n<img src=\"https://actionnetwork.org/images/logo.png\" />",
  "footer": "\r\n</div>\r\n          </td>\r\n        </tr>\r\n      </table>\r\n    </td>\r\n  </tr>\r\n</table>",
  "action_network:suffix": " via ProgressivePower.org",
  "wrapper_type": "email",
  "default": true
  "_links": {
    "self": {
      "href": "https://actionnetwork.org/api/v2/wrappers/a4dde5b6-0512-48ea-b4ad-63a71117b43d"
    },
    "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 wrappers is not allowed. Attempts will result in errors.

Back To Top ↑