Activities

Fetch all activities


Return all the activities
GET /activities
page Page number of activities to return. Returns empty array if the page has no activities. If page parameter isn't present, returns the first page Optional
size Number of activities to return in a page. If size parameter isn't present, returns the page with 25 activities Optional
filter_type Filter by type of activity (e.g. lead:created, lead:moved). Accepts multiple types separated by a comma (,) Optional
Response Body
[
    {
        "_id": "52d8d8749a21f6518f000015",
        "created_at": "2014-01-17T07:15:00Z",
        "type": "product:added",
        "lead_name": "[Sample] Foo",
        "user_name": "Claire Parson",
        "pipeline_name": "Default",
        "product_name": "Product 1",
        "product_price": 105,
        "product_quantity": 2,
        "user": {
            "_id": "521f26ebcce8b4310e000064",
            "name": "Claire Parson",
            "photo_url": "https://s3.amazonaws.com/..."
        },
        "lead": {
            "_id": "521f26eccce8b4310e000074",
            "name": "[Sample] Foo"
        },
        "pipeline": {
            "_id": "521f26eccce8b4310e00006b",
            "name":"Default"
        }
    },
    {
        "_id": "52d8d86b9a21f61e8f000011",
        "created_at": "2014-01-17T07:14:51Z",
        "type": "contact:added",
        "lead_name": "Archive Test",
        "user_name": "Roger Parson",
        "pipeline_name": "Default",
        "contact_name": "Contact 1",
        "user": {
            "_id": "5221931acce8b45ab700003d",
            "name": "Roger Parson",
            "photo_url": "https://s3.amazonaws.com/..."
        },
        "lead": {
            "_id": "5224419acce8b4d8a6000003",
            "name": "Archive Test"
        },
        "pipeline": {
            "_id": "52219a33cce8b46dd400006a",
            "name": "Pipeline 1"
        }
    }
]

Show an activity


Show details of an individual activity
GET /activities/:activity_id
activity_id Unique identifier of the activity Required
Response Body
{
    "_id": "52d8d8749a21f6518f000015",
    "created_at": "2014-01-17T07:15:00Z",
    "type": "product:added",
    "lead_name": "[Sample] Foo",
    "user_name": "Claire Parson",
    "pipeline_name": "Default",
    "product_name": "Product 1",
    "product_price": 105,
    "product_quantity": 2,
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson",
        "photo_url": "https://s3.amazonaws.com/..."
    },
    "lead": {
        "_id": "521f26eccce8b4310e000074",
        "name": "[Sample] Foo"
    },
    "pipeline": {
        "_id": "521f26eccce8b4310e00006b",
        "name":"Default"
    }
}

Fetch all activities for a lead


Return all the activities for a specified lead
GET /leads/:lead_id/activities
lead_id Unique identifier of the lead Required
page Page number of activities to return. Returns empty array if the page has no activities. If page parameter isn't present, returns the first page Optional
size Number of activities to return in a page. If size parameter isn't present, returns the page with 25 activities Optional
filter_type Filter by type of activity (e.g. lead:created, lead:moved). Accepts multiple types separated by a comma (,) Optional
Response Body
[
    {
        "_id": "52d8d8749a21f6518f000015",
        "created_at": "2014-01-17T07:15:00Z",
        "type": "product:added",
        "lead_name": "[Sample] Foo",
        "user_name": "Claire Parson",
        "pipeline_name": "Default",
        "product_name": "Product 1",
        "product_price": 105,
        "product_quantity": 2,
        "user": {
            "_id": "521f26ebcce8b4310e000064",
            "name": "Claire Parson",
            "photo_url": "https://s3.amazonaws.com/..."
        },
        "lead": {
            "_id": "521f26eccce8b4310e000074",
            "name": "[Sample] Foo"
        },
        "pipeline": {
            "_id": "521f26eccce8b4310e00006b",
            "name":"Default"
        }
    },
    {
        "_id": "52d8d86b9a21f61e8f000015",
        "created_at": "2014-01-17T07:14:51Z",
        "type": "contact:added",
        "lead_name": "[Sample] Foo",
        "user_name": "Roger Parson",
        "pipeline_name": "Default",
        "contact_name": "Contact 1",
        "user": {
            "_id": "5221931acce8b45ab700003d",
            "name": "Roger Parson",
            "photo_url": "https://s3.amazonaws.com/..."
        },
        "lead": {
            "_id": "521f26eccce8b4310e000074",
            "name": "[Sample] Foo"
        },
        "pipeline": {
            "_id": "52219a33cce8b46dd400006a",
            "name": "Pipeline 1"
        }
    }
]

Show an activity for a lead


Show details of an individual activity associated with a specified lead
GET /leads/:lead_id/activities/:activity_id
lead_id Unique identifier of the lead Required
activity_id Unique identifier of the activity Required
Response Body
{
    "_id": "52d8d8749a21f6518f000015",
    "created_at": "2014-01-17T07:15:00Z",
    "type": "product:added",
    "lead_name": "[Sample] Foo",
    "user_name": "Claire Parson",
    "pipeline_name": "Default",
    "product_name": "Product 1",
    "product_price": 105,
    "product_quantity": 2,
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson",
        "photo_url": "https://s3.amazonaws.com/..."
    },
    "lead": {
        "_id": "521f26eccce8b4310e000074",
        "name": "[Sample] Foo"
    },
    "pipeline": {
        "_id": "521f26eccce8b4310e00006b",
        "name":"Default"
    }
}


Types of Activities


There are 33 different types of activities, listed below. Depending on the type of activities, additional fields may be present (e.g. note_content for note added activity). The full list of activities and the fields associated with them is shown in the table below.

Activity Type Activity Description Fields
lead:created A lead was created
lead:moved A lead was moved from one stage to another old_stage_name, new_stage_name
lead:name_changed A lead's name was changed old_lead_name
lead:won A lead was marked as won
lead:lost A lead was marked as lost
lead:assigned A lead was assigned to a user lead_assigned_to_name
lead:unassigned A lead was unassigned from a user old_lead_assigned_to_name
lead:size_changed The value of the lead was changed lead_size, old_lead_size (if applicable)
lead:restored Lead was restored from archived leads
todo:created A todo was created todo_name, todo_type, todo_date(if applicable), todo_time (if applicable)
todo:name_changed Name of a todo was changed todo_name, old_todo_name
todo:type_changed Type of a todo was changed todo_name, todo_type, old_todo_type
todo:date_changed Date of a todo was changed todo_name, todo_date, old_todo_date (if applicable)
todo:time_changed Time of a todo was changed todo_name, todo_time, old_todo_time (if applicable)
todo:done_changed Status of a todo was changed todo_name, todo_done (true or false)
todo:deleted A Todo was deleted todo_name
note:created A note was added to a lead note_content
note:updated A note was updated note_content
note:deleted A note was deleted note_content
attachment:created A file was added to a lead attachment_filename, attachment_url
attachment:deleted A file was deleted attachment_filename
record:created A field was added to a lead record_name, record_value
record:updated A field value was updated record_name, record_value, old_record_value (if applicable)
record:deleted A field was deleted record_name, record_value
contact:added A contact was added to a lead contact_name
contact:removed A contact was removed from a lead contact_name
product:added A product was added to a lead product_name, product_quantity, product_price (if applicable)
product:removed A product was removed from a lead product_name, product_quantity
zone:added A zone was added to a lead zone_name
zone:removed A zone was removed from a lead zone_name
source:added A source was added to a lead source_name
source:removed A source was removed from a lead source_name
email:received A email was added to a lead subject