Embeds Version 2

This document describes the embed resource as implemented by the Action Network.

Embeds are copy-and-paste javascript code that will embed the related action form on any website. This is an Action Network-only feature.

Embed resources have six embed fields describing the six embed formats we offer, allowing you to control the look of your embed. This endpoint will always serve the latest version of our embeds.

Note: Embeds are read-only and only available for actions created with our user interface.

Sections:

URL Structures

URL Structures:

https://actionnetwork.org/api/v2/[action_type]/[action_id]/embed

To address a specific embed resource, use the identifier of the specific action you want embed code for without the <code>action_network:</code> prefix to construct a URL, like https://actionnetwork.org/api/v2/events/21789f03-0180-45d3-853c-91bd6fdc8c07/embed

Back To Top ↑

Field names and descriptions

Field Name Type Required on POST Description
embed_standard_default_styles string n/a An HTML representation of the embed code for a standard widget with default styles. Copy and paste into any web page to embed this action page's form. Action Network-only, system generated, not editable.
embed_standard_layout_only_styles string n/a An HTML representation of the embed code for a standard widget with layout-only styles. Copy and paste into any web page to embed this action page's form. Action Network-only, system generated, not editable.
embed_standard_no_styles string n/a An HTML representation of the embed code for a standard widget with no styles. Copy and paste into any web page to embed this action page's form. Action Network-only, system generated, not editable.
embed_full_default_styles string n/a An HTML representation of the embed code for a full layout widget with default styles. Copy and paste into any web page to embed this action page's form. Action Network-only, system generated, not editable.
embed_full_layout_only_styles string n/a An HTML representation of the embed code for a full layout widget with default styles. Copy and paste into any web page to embed this action page's form. Action Network-only, system generated, not editable.
embed_full_no_styles string n/a An HTML representation of the embed code for a full layout widget with default styles. Copy and paste into any web page to embed this action page's form. Action Network-only, system generated, not editable.
Back To Top ↑

Links

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

Scenario: Retrieving an embed resource for an individual action (GET)

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

Request

						
GET https://actionnetwork.org/api/v2/events/21789f03-0180-45d3-853c-91bd6fdc8c07/embed

Header:
OSDI-API-Token: your_api_key_here
					

Response

						
200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate


{
  "embed_standard_default_styles": "<link href='https://actionnetwork.org/css/style-embed.css' rel='stylesheet' type='text/css' /><script src='https://actionnetwork.org/widgets/event/my-free-event?format=js&source=widget'></script><div id='can-event-area-my-free-event' style='width: 100%'><!-- this div is the target for our HTML insertion --></div>",
  "embed_standard_layout_only_styles": "<link href='https://actionnetwork.org/css/style-embed-whitelabel.css' rel='stylesheet' type='text/css' /><script src='https://actionnetwork.org/widgets/event/my-free-event?format=js&source=widget'></script><div id='can-event-area-my-free-event' style='width: undefined'><!-- this div is the target for our HTML insertion --></div>",
  "embed_standard_no_styles": "<script src='https://actionnetwork.org/widgets/event/my-free-event?format=js&source=widget'></script><div id='can-event-area-my-free-event' style='width: undefined'><!-- this div is the target for our HTML insertion --></div>",
  "embed_full_default_styles": "<link href='https://actionnetwork.org/css/style-embed.css' rel='stylesheet' type='text/css' /><script src='https://actionnetwork.org/widgets/event/my-free-event?format=js&source=widget&style=full'></script><div id='can-event-area-my-free-event' style='width: undefined'><!-- this div is the target for our HTML insertion --></div>",
  "embed_full_layout_only_styles": "<link href='https://actionnetwork.org/css/style-embed-whitelabel.css' rel='stylesheet' type='text/css' /><script src='https://actionnetwork.org/widgets/event/my-free-event?format=js&source=widget&style=full'></script><div id='can-event-area-my-free-event' style='width: undefined'><!-- this div is the target for our HTML insertion --></div>",
  "embed_full_no_styles": "<script src='https://actionnetwork.org/widgets/event/my-free-event?format=js&source=widget&style=full'></script><div id='can-event-area-my-free-event' style='width: undefined'><!-- this div is the target for our HTML insertion --></div>",
  "_links": {
    "self": {
      "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
      }
    ]
  }
}
					
Back To Top ↑

Scenario: POST/PUT/DELETE

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

Back To Top ↑