Leads

Fetch all leads


Return all the leads
GET /leads
pipeline_id Unique identifier of the pipeline to which the leads belong to Required
page Page number of leads to return. Returns empty array if the page has no leads. If page parameter isn't present, returns the first page Optional
size Number of leads to return in a page. If size parameter isn't present, returns the page with 25 leads Optional
Response Body
[
    {
        "_id": "521f26eccce8b4310e000074",
        "name": "[Sample] Foo",
        "size": 1500,
        "archived": false,
        "user": {
            "_id": "521f26ebcce8b4310e000064",
            "name": "Claire Parson",
            "photo_url": "https://s3.amazonaws.com/..."
        },
        "stage": {
            "_id": "521f26eccce8b4310e00006f",
            "name": "Prospect"
        }
    },
    {
        "_id": "5224419acce8b4d8a6000003",
        "name": "Archive Test",
        "size": null,
        "archived": false,
        "user": null,
        "stage": {
            "_id": "521f26eccce8b4310e00006c",
            "name": "Closing"
        }
    }
]

Show a lead


Show details of an individual lead
GET /leads/:lead_id
lead_id Unique identifier of the lead Required
Response Body
{
    "_id": "521f26eccce8b4310e000074",
    "name": "[Sample] Foo",
    "size": 1500,
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson",
        "photo_url": "https://s3.amazonaws.com/..."
    },
    "stage": {
        "_id": "521f26eccce8b4310e00006f",
        "name": "Prospect"
    }
}

Create a lead


Create a new lead
POST /leads
name Name of the lead Required
pipeline_id Unique identifier of the pipeline to which the lead is to be added Required
size Value of the lead (numeric only) Optional
user_id Unique identifier of the user you want to assign the lead to Optional
Response Body
{
    "_id": "521f26eccce8b4310e000074",
    "name": "[Sample] Foo",
    "size": 1500,
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson",
        "photo_url": "https://s3.amazonaws.com/..."
    },
    "stage": {
        "_id": "521f26eccce8b4310e00006f",
        "name": "Prospect"
    }
}

Update a lead


Update the name of a lead
PUT /leads/:lead_id
lead_id Unique identifier of the lead Required
name Name of the lead Optional
size Value of the lead (numeric only) Optional
user_id Unique identifier of the user you want to assign the lead to Optional
stage_id Unique identifier of the stage you want to move the lead to Optional
archived Archive or restore a lead (must be either true or false) Optional
Response Body
{
    "_id": "521f26eccce8b4310e000074",
    "name": "[Sample] Foo",
    "size": 1500,
    "user": {
        "_id": "521f26ebcce8b4310e000064",
        "name": "Claire Parson",
        "photo_url": "https://s3.amazonaws.com/..."
    },
    "stage": {
        "_id": "521f26eccce8b4310e00006f",
        "name": "Prospect"
    }
}

Delete a lead


Delete a lead
DELETE /leads/:lead_id
lead_id Unique identifier of the lead Required
Response Body
{}