Use this endpoint to retrieve (GET) a collection of Library files in the Constant Contact account. To add a file to the collection, see Library File Multipart POST API.
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: mylibrary:file:read
Get a list of all files in a Library folder specified by the folderId
path parameter.
Privileges required: campaign:read
Retrieve a list of all items for an event specified using the eventId
path parameter.
GET: https://api.constantcontact.com/v2/library/files |
|||
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 files is sorted; valid sort options are:
|
source |
query |
ALL |
Specifies to retrieve files from a particular source:
|
type |
query |
ALL |
Specifies the type of files to retrieve, ALL, IMAGES, or DOCUMENTS |
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": {} }, "results": [ { "name": "IMG_0341.JPG", "id": "9", "description": "buildings_steel", "folder": "wildflowers", "height": 612, "width": 792, "size": 304560, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/9.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/9.jpg", "height": 154, "width": 200 }, "created_date": "2013-09-26T10:52:46.000-04:00", "modified_date": "2013-09-26T12:32:41.000-04:00", "folder_id": "-1", "is_image": true, "file_type": "JPG" }, { "name": "IMG_0268.JPG", "id": "8", "description": "buildings_glass", "folder": "wildflowers", "height": 480, "width": 640, "size": 114637, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/8.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/8.jpg", "height": 150, "width": 200 }, "created_date": "2013-09-26T10:51:59.000-04:00", "modified_date": "2013-09-26T12:32:41.000-04:00", "folder_id": "-1", "is_image": true, "file_type": "JPG" }, { "name": "IMG_0267.JPG", "id": "7", "description": "daisy_snow2", "folder": "images", "height": 600, "width": 800, "size": 42217, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/7.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/7.jpg", "height": 150, "width": 200 }, "created_date": "2013-09-26T10:51:28.000-04:00", "modified_date": "2013-09-26T10:51:28.000-04:00", "folder_id": null, "is_image": true, "file_type": "JPG" }, { "name": "IMG_0266.JPG", "id": "6", "description": "daisy_snow", "folder": "images", "height": 600, "width": 800, "size": 39952, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/6.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/6.jpg", "height": 150, "width": 200 }, "created_date": "2013-09-26T10:50:55.000-04:00", "modified_date": "2013-09-26T10:50:56.000-04:00", "folder_id": null, "is_image": true, "file_type": "JPG" }, { "name": "IMG_0255.JPG", "id": "5", "description": "wrestler_compete2", "folder": "images", "height": 240, "width": 320, "size": 118608, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/5.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/5.jpg", "height": 150, "width": 200 }, "created_date": "2013-09-26T10:50:06.000-04:00", "modified_date": "2013-09-26T10:50:06.000-04:00", "folder_id": null, "is_image": true, "file_type": "JPG" }, { "name": "IMG_0256.JPG", "id": "4", "description": "wrestler_compete1", "folder": "images", "height": 240, "width": 320, "size": 119043, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/4.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/4.jpg", "height": 150, "width": 200 }, "created_date": "2013-09-26T10:49:25.000-04:00", "modified_date": "2013-09-26T10:49:25.000-04:00", "folder_id": null, "is_image": true, "file_type": "JPG" }, { "name": "IMG_0257.JPG", "id": "3", "description": "wrestler_compete", "folder": "images", "height": 320, "width": 240, "size": 130761, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/3.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/3.jpg", "height": 200, "width": 150 }, "created_date": "2013-09-26T10:48:45.000-04:00", "modified_date": "2013-09-26T10:48:45.000-04:00", "folder_id": null, "is_image": true, "file_type": "JPG" }, { "name": "IMG_0248.JPG", "id": "2", "description": "profile_left", "folder": "images", "height": 480, "width": 640, "size": 152592, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/2.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/2.jpg", "height": 150, "width": 200 }, "created_date": "2013-09-26T10:47:02.000-04:00", "modified_date": "2013-09-26T10:48:10.000-04:00", "folder_id": null, "is_image": true, "file_type": "JPG" }, { "name": "IMG_0250.JPG", "id": "1", "description": "bio_photo", "folder": "images", "height": 480, "width": 640, "size": 121559, "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/1.jpg", "source": "MyComputer", "status": "Active", "thumbnail": { "url": "https://origin.ih.l1.constantcontact.com/fs134/1100394770946/img/1.jpg", "height": 150, "width": 200 }, "created_date": "2013-09-26T10:46:27.000-04:00", "modified_date": "2013-09-26T10:46:27.000-04:00", "folder_id": null, "is_image": true, "file_type": "JPG" } ] }