Use this endpoint to view (GET) all existing Library folders, and to create (POST) a new folder.
Click a method to view its documentation
Privileges required: campaign:list
Retrieves the email campaigns in a user's account as follows:
status
query parameter; see the parameter table below for status types and definitionsmodified_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 |
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.
Privileges required: mylibrary:file:read
Retrieve the upload status for one or more MyLibrary files using the fileId
path parameter; separate multiple fileId's with a comma. If the fileId
provided does not match any files in the MyLibrary account, the call returns a null set.
Privileges required: N/A
Retrieve MyLibrary product usage information for the authorized Constant Contact account.
Privileges required: mylibrary:file:read
Retrieve all files in the Trash folder. You can specify the type of files to retrieve using the type
query parameter. You can sort the output using the sort_by
query parameter.
Privileges required: mylibrary:folder:read
Retrieve a specific MyLibrary folder using the folderId
path parameter.
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.
Privileges required: mylibrary:file:read
The following options are available when retrieving Library files:
api_key
)type
query parameter (ALL, IMAGE, or Document)source
query parametertype
and source
query parametersThere are many options available for sorting the JSON response using the sort_by
query parameter.
Privileges required: mylibrary:file:read
Retrieve a MyLibrary file using the fileId
path parameter.
Privileges required: campaign:read
Retrieve a list of all items for an event specified using the eventId
path parameter.
Privileges required: campaign:read
Retrieve the collection of all registrants for the event specified using the event_id
path parameter.
GET: https://api.constantcontact.com/v2/library/folders |
|||
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 - 1000, default = 50. See Paginated Output for more information on using |
sort_by |
query |
CREATED_DATE_DESC |
Specifies how the list of folders is sorted; valid sort options are:
|
code |
description |
---|---|
200 |
Request was successful |
401 |
Authentication failure |
406 |
Unsupported accept header value, must be application/json |
500 |
Internal server error occurred |
property |
type(max length) |
description |
---|
{ "meta": { "pagination": { "next_link": "/v2/library/folders?next=b2Zmc2V0PTQmbGltaXQ9NA" } }, "results": [{ "id": "-8", "name": "backgrounds", "level": 1, "children": [], "item_count": 0, "parent_id": "", "modified_date": "1970-01-01T00:00:00.000Z", "created_date": "1970-01-01T00:00:00.000Z" }, { "id": "-1", "name": "Documents", "level": 0, "children": [{ "id": "-10", "name": "market_studies", "level": 2, "children": [], "item_count": 0, "parent_id": "-1", "modified_date": "1970-01-01T00:00:00.000Z", "created_date": "1970-01-01T00:00:00.000Z" }], "item_count": 0, "parent_id": "", "modified_date": "1970-01-01T00:00:00.000Z", "created_date": "1970-01-01T00:00:00.000Z" }, { "id": "-2", "name": "flowers", "level": 1, "children": [{ "id": "-7", "name": "cactus", "level": 2, "children": [], "item_count": 0, "parent_id": "-2", "modified_date": "1970-01-01T00:00:00.000Z", "created_date": "1970-01-01T00:00:00.000Z" }], "item_count": 1, "parent_id": "0", "modified_date": "1970-01-01T00:00:00.000Z", "created_date": "1970-01-01T00:00:00.000Z" }, { "id": "-3", "name": "tech", "level": 1, "children": [], "item_count": 0, "parent_id": "0", "modified_date": "1970-01-01T00:00:00.000Z", "created_date": "1970-01-01T00:00:00.000Z" }] }