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

Individual Activity Status Endpoint

Use this endpoint to retrieve a status report for a specific activity. Bulk activities are each stored for 14 days. After that, they are deleted and you will receive a 404 trying to retrieve them.

Methods:

Click a method to view its documentation

GET

DescriptionTOP

Privileges required: contacts:write OR contacts:read

Retrieve a detailed status report for an activity specified by activityId path parameter. The URI to call with the activityId is returned in the bulk activity response's location header:

Location: https://api.constantcontact.com/v2/activities/<activityId>

Poll this URI to monitor the status until the status changes to either COMPLETE or ERROR, indicating that the activity processing is complete.

GET: https://api.constantcontact.com/v2/activities/{activity_id}

name

type

default

description

activity_id

path

Specifies the bulk activity to retrieve status for

api_key

query

REQUIRED; The API key for the application

Response CodesTOP

code

description

200

Request was successful

400

Bad Request; Error in validating a contact

401

Authentication failure

500

Internal server error occurred

StructureTOP

property

type(max length)

description

contact_count

integer

Number of contacts included the activity

created_date

string

Time and date that created the activity after importing the file, in ISO 8601 format

error_count

integer

Number of errors encountered during the activity

errors

array

This property is no longer used, returns an empty array if errors were encountered.

file_name

string

The URI pointing to the exported file. Make a GET call to the URI to retrieve the file.

finish_date

string

Time and date that activity was completed, in ISO-8601 format

id

string

Unique ID for the activity

start_date

string

Time and date that the API started processing the activity, in ISO 8601 format

status

string

The status of the activity, valid values are:

  • UNCONFIRMED - the activity has not been created yet
  • PENDING - initial state for an activity after it is created
  • QUEUED - the activity has been retrieved and is in the queue to be run
  • RUNNING - the activity has been picked up from the queue and is running
  • COMPLETE - the activity has completed without errors
  • CANCELLED - the activity was cancelled; activities can be cancelled using the product UI only.
  • ERROR - errors occurred when the job was run

type

string

Type of activity, valid values are:

  • ADD_CONTACTS - add the contacts to contact list(s) specified in the import file
  • CLEAR_CONTACTS_FROM_LISTS - removes all contacts from the contactlist(s) specified in the import file
  • EXPORT_CONTACTS - export contacts to a supported file type
  • REMOVE_CONTACTS_FROM_LISTS - remove the contacts from the list(s), all specified in the import file

Example ResponseTOP

{ 
  "id": "328177e0-4603-11e5-9d88-00163e56be7c", 
  "type": "ADD_CONTACTS", 
  "status": "COMPLETE", 
  "file_name": "upload_from_json.csv", 
  "start_date": "2015-08-18T23:45:30.000Z", 
  "finish_date": "2015-08-18T23:45:33.000Z", 
  "created_date": "2015-08-18T23:45:25.000Z", 
  "error_count": 2, 
  "errors": [ 
    "Line 2: Invalid birthday", 
    "Line 3: Invalid birthday" 
  ], 
  "contact_count": 3 
}