Our v3 API is now available! Learn more by visiting the v3 developer portal. Creating new v2 API keys is no longer supported.

Events Collection Endpoint

Use this API endpoint to view (GET) all existing events, or create (POST) a new event.

Methods:

Click a method to view its documentation

GET POST

DescriptionTOP

Privileges required: campaign:list

Retrieves the email campaigns in a user's account as follows:

  • all campaigns in the user's account (no query parameter specified)
  • campaigns with the status specified using the status query parameter; see the parameter table below for status types and definitions
  • campaigns modified on or after the date/time specified using the modified_since query parameter. This is useful for syncing email campaigns across applications.

Campaign sort order depends on the campaign status:

Status Campaign sort order
DRAFT by the latest modified_date
SENT by the latest last_run_date
SCHEDULED    by the next_run_date
DELETED by the latest last_run_date if it was sent, or by the latest modified_date, if it was never sent

About DELETED campaigns

Deleted campaigns are included in a GET response only when status=DELETED query parameter is used. They  are not included in the GET collection by default. You cannot retrieve an individual deleted campaign object using the API.

DescriptionTOP

Privileges required: mylibrary:file:read

Retrieve a list of MyLibrary folders and their properties for the authorized Constant Contact account. MyLibrary supports a folder hierarchy with 3 levels of nesting. Primary, child (2nd level) and grandchild (3rd level) folders all have the same properties associated with them. This endpoint returns an empty results array if there are no folders in the user's account.

DescriptionTOP

Privileges required: mylibrary:file:read

The following options  are available when retrieving Library files:

  • Retrieve all files in all folders in the account - do not use any query parameters (except for api_key)
  • Retrieve all files with a specific type - use the type query parameter (ALL, IMAGE, or Document)
  • Retrieve all files from a specific source - use the source query parameter
  • Retrieve a specific file type from a specific source - use both the type and source query parameters

There are many options available for sorting the JSON response using the sort_by query parameter.

DescriptionTOP

Privileges required: campaign:read

Retrieve an event item by using the eventId and itemId path parameters to specify the event and item. 

DescriptionTOP

Privileges required: campaign:read

Retrieve a list of all items for an event specified using the eventId path parameter.

DescriptionTOP

Privileges required: campaign:read

Get a specific event object (specified by the event_id path parameter). Properties with a null value are not returned in the JSON response.

DescriptionTOP

Privileges required: campaign:read

Retrieve detailed information about a specific registrant (specified by registrantId) for an event (specified by eventId).

DescriptionTOP

Privileges required: campaign:read

Retrieve the collection of all registrants for the event specified using the event_id path parameter. 

DescriptionTOP

Privileges required: campaign:read

Retrieve a specific promotional code for an event; use the promocodeId and eventId path parameters to specify the code and the event it belongs to.

DescriptionTOP

Privileges required: campaign:read

Retrieve all promocodes for an event specified by the eventId path parameter.

GET: https://api.constantcontact.com/v2/eventspot/events

Test API

name

type

default

description

api_key

query

REQUIRED; The API key for the application

limit

query

50

Specifies the number of results displayed per page of output, from 1 - 500, default = 50. See Paginated Output for more information on using limit.

Response CodesTOP

code

description

200

Request was successful

401

Authentication failure

401

The eventId provided does not exist

406

Unsupported Accept Header value, must be application/json

500

Internal server error occurred

StructureTOP

property

type(max length)

description

Example ResponseTOP

{
    "meta":{
        "pagination":{
        }
    },
    "results":[
        {
        "id":"a07e1iw09oscc73adfe",
        "name":"Sep 30, 2013 - Apps-R-Us Event",
        "title":"My First Event",
        "status":"ACTIVE",
        "location":"The Great Room",
        "type":"CLASSES_WORKSHOPS",
        "address":{
          "city":"AnyCity",
          "state":"Massachusetts",
          "country":"United States",
          "latitude":42.125515,
          "longitude":-71.49862,
          "line1":"123 Maple Street",
          "line2":"",
          "line3":"",
          "state_code":"MA",
          "country_code":"us",
          "postal_code":"99999"
        },
        "description":"Please join our monthly seminar and learn some new skills while meeting new friends, and catching up with old friends.",
        "start_date":"2013-10-28T13:00:00.000Z",
        "end_date":"2013-10-28T21:00:00.000Z",
        "created_date":"2013-09-30T19:29:40.630Z",
        "time_zone_id":"US/Eastern",
        "active_date":"2013-09-30T19:37:44.006Z",
        "is_checkin_available":false,
        "event_detail_url":"/v2/eventspot/events/a07e1iw09oscc73adfe"
        }
    ]
}