Surveys Version 2

This document describes the surveys collection and survey resource as implemented by the Action Network.

Surveys are a type of action created by the organizer or group associated with your API key that involves activists filling out questions and storing information about themselves..

Surveys have names (corresponding to our administrative titles), titles, and can have descriptions and other fields, and when activists sign them response resources are created representing the response an activist made on that survey.

Surveys 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: Surveys created via the API are not equivalent to surveys created with our user interface. API-created surveys 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 fill them out, they will not send autoresponses, and they will not have individual manage pages for statistics. Rather, once they have at least one response, 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 survey for reports or email targeting.

Sections:

Endpoints and URL structures

Endpoints:

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

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

URL Structures:

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

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

Back To Top ↑

Field names and descriptions

Survey fields:
Field Name Type Required on POST Description
identifiers strings[] An array of identifiers in the format [system name]:[id]. Must be globally unique. See the general concepts document for more information about identifiers.
origin_system string Yes A human readable string identifying where this survey originated. May be used in the user interface for this purpose.
created_date datetime The date and time the resource was created. System generated, not editable.
modified_date datetime The date and time the resource was last modified. System generated, not editable.
name string The survey's administrative title, only shown internally and not publicly.
title string Yes The survey's public title.
description string The survey's description. May contain HTML.
browser_url string The URL to this survey's 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. Only present for surveys created with our user interface.Not editable.
call_to_action string A call to action signifying what an activist does by submitting the survey. (ex: Tell us about yourself)
total_responses integer A system generated count of the number of responses on this survey.Not editable.
action_network:hidden boolean A read-only field indicating whether this action is hidden in our user interface or not.
osdi:creator* Person* An embedded person representing the user who created this survey. If you do not assign a creator, we will assign one based on your API key. Cannot be edited once created.
action_network:sponsor Sponsor A hash of the sponsoring group of this survey. Action Network-only feature. Automatically added if you post using a group API key. 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 survey resource.
action_network:responses A link to a collection of all response resources associated with this survey. Click here for responses documentation. Action Network-only feature.
osdi:creator A link to the person who created this survey. Click here for people documentation.
action_network:embed A link to embed code for this survey. Action Network-only feature. Click here for embed documentation.
action_network:record_response_helper A link to the record response helper for this survey. Click here for the record response helper documentation. Action Network-only feature.
Back To Top ↑

Related resources

Back To Top ↑

Scenario: Retrieving a collection of survey resources (GET)

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

Request

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

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/surveys?page=2"
    },
    "self": {
      "href": "https://actionnetwork.org/api/v2/surveys"
    },
    "action_network:surveys": [
      {
        "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d"
      },
      {
        "href": "https://actionnetwork.org/api/v2/surveys/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": {
    "action_network:surveys": [
      {
        "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",
        "title": "Tell us about yourself!",
        "description": "<p>Tell us a bit more about yourself.</p>",
        "call_to_action": "Let us know",
        "browser_url": "https://actionnetwork.org/surveys/tell-us-about-yourself",
        "featured_image_url": "https://actionnetwork.org/images/tell-us-about-yourself.jpg",
        "total_responses": 2354,
        "action_network:hidden": false,
        "_embedded": {
          "osdi:creator": {
            "given_name": "John",
            "family_name": "Doe",
            "identifiers": [
              "action_network:c945d6fe-929e-11e3-a2e9-12313d316c29"
            ],
            "created_date": "2014-03-24T18:03:45Z",
            "modified_date": "2014-03-25T15:00:22Z",
            "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": 35.919,
                  "longitude": -72.0379,
                  "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"
              },
              "action_network:responses": {
                "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/responses"
              }
            }
          }
        },
        "_links": {
          "self": {
            "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d"
          },
          "action_network:responses": {
            "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d/responses"
          },
          "action_network:record_response_helper": {
            "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d/responses"
          },
          "osdi:creator": {
            "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29"
          },
          "action_network:embed": {
            "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d/embed"
          }
        }
      },
      {
        "identifiers": [
          "action_network:a27178b9-45c3-4844-8ebf-ebd5da74a1e3",
          "foreign_system:1"
        ],
        "origin_system": "Another System",
        "created_date": "2014-03-14T15:21:05Z",
        "modified_date": "2014-03-17T19:56:11Z",
        "title": "Volunteer survey",
        "total_responses": 123,
        "action_network:hidden": false,
        "_embedded": {
          "osdi:creator": {
            "given_name": "John",
            "family_name": "Doe",
            "identifiers": [
              "action_network:c945d6fe-929e-11e3-a2e9-12313d316c29"
            ],
            "created_date": "2014-03-24T18:03:45Z",
            "modified_date": "2014-03-25T15:00:22Z",
            "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": 35.919,
                  "longitude": -72.0379,
                  "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"
              },
              "action_network:responses": {
                "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/responses"
              }
            }
          }
        },
        "action_network:sponsor": {
          "title": "Progressive Action Now",
          "url": "https://actionnetwork.org/groups/progressive-action-now"
        },
        "_links": {
          "self": {
            "href": "https://actionnetwork.org/api/v2/surveys/a27178b9-45c3-4844-8ebf-ebd5da74a1e3"
          },
          "action_network:responses": {
            "href": "https://actionnetwork.org/api/v2/surveys/a27178b9-45c3-4844-8ebf-ebd5da74a1e3/responses"
          },
          "action_network:record_response_helper": {
            "href": "https://actionnetwork.org/api/v2/surveys/a27178b9-45c3-4844-8ebf-ebd5da74a1e3/respnoses"
          },
          "osdi:creator": {
            "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29"
          },
          "action_network:embed": {
            "href": "https://actionnetwork.org/api/v2/surveys/a27178b9-45c3-4844-8ebf-ebd5da74a1e3/embed"
          }
        }
      },
      //truncated for brevity
    ]
  }
}
					
Back To Top ↑

Scenario: Retrieving an individual survey resource (GET)

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

Request

						
GET https://actionnetwork.org/api/v2/surveys/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",
  "title": "Tell us about yourself",
  "description": "<p>Tell us a bit more about yourself.</p>",
  "call_to_action": "Let us know",
  "browser_url": "https://actionnetwork.org/surveys/tell-us-about-yourself",
  "featured_image_url": "https://actionnetwork.org/images/tell-us-about-yourself.jpg",
  "total_responses": 2354,
  "action_network:hidden": false,
  "_embedded": {
    "osdi:creator": {
      "given_name": "John",
      "family_name": "Doe",
      "identifiers": [
        "action_network:c945d6fe-929e-11e3-a2e9-12313d316c29"
      ],
      "origin_system": "Action Network",
      "created_date": "2014-03-24T18:03:45Z",
      "modified_date": "2014-03-25T15:00:22Z",
      "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": 35.919,
            "longitude": -72.0379,
            "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"
        },
        "action_network:responses": {
          "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/responses"
        },
        "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/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d"
    },
    "action_network:responses": {
      "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d/responses"
    },
    "action_network:record_response_helper": {
      "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d/responses"
    },
    "osdi:creator": {
      "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29"
    },
    "action_network:embed": {
      "href": "https://actionnetwork.org/api/v2/surveys/a4dde5b6-0512-48ea-b4ad-63a71117b43d/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: Creating a new survey (POST)

You can post a new survey to the surveys endpoint and a survey resource will be created in our system.

Note: Surveys created via the API in this way are not equivalent to surveys created with our user interface. API-created surveys 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 sign, they will not send autoresponses, and they will not have individual manage pages for statistics. Rather, once they have at least one response, 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 survey for reports or email targeting.

In the targeting interface, they will show up in the format [1, (origin system) Survey], (title). For example, a surveys with the origin system 'FreeSurveys.com' and the title 'My Free Survey' will show up in the targeting interface as [1, FreeSurveys.com Survey], My Free Survey so you can easily identify what it is and where it came from when doing your targeting.

Request

						
POST https://actionnetwork.org/api/v2/surveys

Header:
Content-Type: application/json
OSDI-API-Token: your_api_key_here
						

{	
  "title": "My Free Survey",
  "origin_system": "FreeSurveys.com"
}
					

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": "2014-03-26T15:26:30Z",
  "modified_date": "2014-03-26T15:26:30Z",
  "title": "My Free Survey",
  "total_responses": 0,
  "origin_system": "FreeSurveys.com",
  "action_network:hidden": false,
  "_embedded": {
    "osdi:creator": {
      "given_name": "John",
      "family_name": "Doe",
      "created_date": "2014-03-20T21:04:31Z",
      "modified_date": "2014-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"
        },
        "action_network:responses": {
          "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/responses"
        },
        "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": {
    "osdi:creator": {
      "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29"
    },
    "self": {
      "href": "https://actionnetwork.org/api/v2/surveys/9f837109-710d-442f-8a99-857a21f36d25"
    },
    "action_network:responses": {
      "href": "https://actionnetwork.org/api/v2/surveys/9f837109-710d-442f-8a99-857a21f36d25/responses"
    },
    "action_network:record_response_helper": {
      "href": "https://actionnetwork.org/api/v2/surveys/9f837109-710d-442f-8a99-857a21f36d25/responses"
    },
    "action_network:embed": {
      "href": "https://actionnetwork.org/api/v2/surveys/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
      }
    ]
  }
}
					

In the above example, you can see how the foreign identifier being posted is merged into the identifiers array. We will intelligently search and deduplicate based on foreign and native identifiers. So if you post a survey with an identifier that matches one already assigned to a survey resource, your POST request will update that resource with new information instead of creating a duplicate. Identifiers are deduplicated globally, across groups and API keys, so ensure any you set are globally unique.

You can post a survey with a creator link as well, if you want to assign the survey to a specific Action Network user, like so:

						
POST https://actionnetwork.org/api/v2/surveys

Header:
Content-Type: application/json
OSDI-API-Token: your_api_key_here
						

{	
  "title": "My Free Survey",
  "origin_system": "FreeSurveys.com",
  "_links" : {
    "osdi:creator" : { 
      "href" : "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29" 
    }
  }
}
					

The link must be a valid person resource and must be associated with your API key for it to be accepted. If your API key is for an individual account, then the link must be to your account's person resource. If your API key is for a group, then the link must be to a member of administrator of your group. If no link or an invalid link is provided, the survey will be assigned to your API key's account person record or to the original creator of the group, whichever is appropriate. If a creator is explicitly set, people who take action will be added to that creator's personal email list. Otherwise, who the creator is has no effect on what email list people who take the survey are subscribed to.

And of course you can post a survey with more fields (such as description) if you'd like, but they are not required.

Back To Top ↑

Scenario: Modifying a survey (PUT)

You can modify an existing survey by using PUT on its individual endpoint.

Request

						
PUT https://actionnetwork.org/api/v2/surveys/9f837109-710d-442f-8a99-857a21f36d25

Header:
Content-Type: application/json
OSDI-API-Token: your_api_key_here
						

{	
  "title": "My Free Survey With A New Name",
  "description": "This is my free survey 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": "2014-03-26T15:26:30Z",
  "modified_date": "2014-03-26T15:39:48Z",
  "title": "My Free Survey With A New Name",
  "description": "This is my free survey description",
  "total_responses": 0,
  "origin_system": "FreeSurveys.com",
  "action_network:hidden": false,
  "_embedded": {
    "osdi:creator": {
      "given_name": "John",
      "family_name": "Doe",
      "created_date": "2014-03-20T21:04:31Z",
      "modified_date": "2014-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"
        },
        "action_network:responses": {
          "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29/responses"
        },
        "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/surveys/9f837109-710d-442f-8a99-857a21f36d25"
    },
    "action_network:responses": {
      "href": "https://actionnetwork.org/api/v2/surveys/9f837109-710d-442f-8a99-857a21f36d25/responses"
    },
    "action_network:record_response_helper": {
      "href": "https://actionnetwork.org/api/v2/surveys/9f837109-710d-442f-8a99-857a21f36d25/responses"
    },
    "osdi:creator": {
      "href": "https://actionnetwork.org/api/v2/people/c945d6fe-929e-11e3-a2e9-12313d316c29"
    },
    "action_network:embed": {
      "href": "https://actionnetwork.org/api/v2/surveys/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 changed the title and added a description.

Editing of certain fields via PUT is not allowed, and is noted in the field names table above. For example, you can't change the total_responses count -- that is a system generated number reflecting a count of the underlying responses. And you can't change a creator of a survey. Invalid entries will be ignored.

Back To Top ↑

Scenario: Deleting a survey (DELETE)

Deleting surveys is not allowed via the API. DELETE requests will return an error.

Back To Top ↑