Leads

The Lead object is used to represent a lead in the remote system.

The Lead object

Properties


idString
Required

remote_idString
Optional
The third-party API ID of the matching object.

ownerString
Optional

lead_sourceString
Optional
The lead's source.

titleString
Optional
The lead's title.

companyString
Optional
The lead's company.

first_nameString
Optional
The lead's first name.

last_nameString
Optional
The lead's last name.

addressesAddress[]
Required

The Address object

The Address object is used to represent an entity's address.
JSON
{
"street_1": "50 Bowling Green Dr",
"street_2": "Golden Gate Park",
"city": "San Francisco",
"state": "CA",
"postal_code": "94122",
"country": "USA",
"address_type": "Shipping"
}

Properties


street_1String
Optional
Line 1 of the address's street.

street_2String
Optional
Line 2 of the address's street.

cityString
Optional
The address's city.

stateString
Optional
The address's state.

postal_codeString
Optional
The address's postal code.

countryEnum
Optional
The address's country. Possible values include: AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, CV, KH, CM, CA, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, SZ, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, KP, MK, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, UM, US, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW, or - in cases where there is no clear mapping - the original value passed through.

address_typeEnum
Optional
The address type. Possible values include: BILLING, SHIPPING, or - in cases where there is no clear mapping - the original value passed through.

email_addressesEmailAddress[]
Required

The EmailAddress object

The EmailAddress object is used to represent an entity's email address.
JSON
{
"email_address": "merge_is_hiring@merge.dev",
"email_address_type": "Work"
}

Properties


email_addressString
Optional
The email address.

email_address_typeString
Optional
The email address's type.

phone_numbersPhoneNumber[]
Required

The PhoneNumber object

The PhoneNumber object is used to represent an entity's phone number.
JSON
{
"phone_number": "+3198675309",
"phone_number_type": "Mobile"
}

Properties


phone_numberString
Optional
The phone number.

phone_number_typeString
Optional
The phone number's type.

remote_updated_atString
Optional
When the third party's lead was updated.

remote_created_atString
Optional
When the third party's lead was created.

converted_dateString
Optional
When the lead was converted.

converted_contactString
Optional

converted_accountString
Optional

remote_dataRemoteData[]
Optional

remote_was_deletedBoolean
Required

The Lead object
JSON
{
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"lead_source": "API Blogger",
"title": "Co-Founder",
"company": "Merge API",
"first_name": "Gil",
"last_name": "Feig",
"addresses": [
{
"street_1": "50 Bowling Green Dr",
"street_2": "Golden Gate Park",
"city": "San Francisco",
"state": "CA",
"postal_code": "94122",
"country": "USA",
"address_type": "Shipping"
}
],
"email_addresses": [
{
"email_address": "hello@merge.dev",
"email_address_type": "Work"
}
],
"phone_numbers": [
{
"phone_number": "+16789932455",
"phone_number_type": "Mobile"
}
],
"remote_updated_at": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"converted_date": "2022-03-10T00:00:00Z",
"converted_contact": "025fjlc6-6000-430a-848e-aafacbadf4fe",
"converted_account": "9c9de072-29cf-48e3-9578-1ca5b145b40e",
"remote_data": [
{
"path": "/leads",
"data": [
"Varies by platform"
]
}
],
"remote_was_deleted": true
}

GET

/leads

Returns a list of Lead objects.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


converted_account_idString
Optional
If provided, will only return leads with this account.

converted_contact_idString
Optional
If provided, will only return leads with this contact.

created_afterString
Optional
If provided, will only return objects created after this datetime.

created_beforeString
Optional
If provided, will only return objects created before this datetime.

cursorString
Optional
The pagination cursor value.

expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

include_deleted_dataBoolean
Optional
Whether to include data that was marked as deleted by third party webhooks.

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

modified_afterString
Optional
If provided, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

owner_idString
Optional
If provided, will only return leads with this owner.

page_sizeInteger
Optional
Number of results to return per page.

remote_idString
Optional
The API provider's ID for the given object.

Response
JSON
{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"lead_source": "API Blogger",
"title": "Co-Founder",
"company": "Merge API",
"first_name": "Gil",
"last_name": "Feig",
"addresses": [
{
"street_1": "50 Bowling Green Dr",
"street_2": "Golden Gate Park",
"city": "San Francisco",
"state": "CA",
"postal_code": "94122",
"country": "USA",
"address_type": "Shipping"
}
],
"email_addresses": [
{
"email_address": "hello@merge.dev",
"email_address_type": "Work"
}
],
"phone_numbers": [
{
"phone_number": "+16789932455",
"phone_number_type": "Mobile"
}
],
"remote_updated_at": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"converted_date": "2022-03-10T00:00:00Z",
"converted_contact": "025fjlc6-6000-430a-848e-aafacbadf4fe",
"converted_account": "9c9de072-29cf-48e3-9578-1ca5b145b40e",
"remote_data": [
{
"path": "/leads",
"data": [
"Varies by platform"
]
}
],
"remote_was_deleted": true
}
]
}
Field support by platform

Microsoft Dynamics 365 Sales

Microsoft Dynamics 365 Sales

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Pipeliner

Pipeliner

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Salesforce

Salesforce

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

converted_dateString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Teamwork CRM

Teamwork CRM

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Zendesk Sell

Zendesk Sell

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

converted_dateString

email_addressesEmailAddress[]

first_nameString

last_nameString

lead_sourceString

ownerString

phone_numbersPhoneNumber[]

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Zoho CRM

Zoho CRM

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString
Not seeing a platform that you're looking for? Submit a request for it here.
Hint: Use the /linked-accounts endpoint to pull platform support information.
POST

/leads

Creates a Lead object with the given values.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


is_debug_modeBoolean
Optional
Whether to include debug fields (such as log file links) in the response.

run_asyncBoolean
Optional
Whether or not third-party updates should be run asynchronously.

Body Parameters


modelObject
Required
Find available fields below under “Model Parameters”.

Model Parameters


remote_idString
Optional
The third-party API ID of the matching object.

ownerString
Optional
Must pass in a valid Merge ID, which can be obtained from the id field in the Owner table.

lead_sourceString
Optional
The lead's source.

titleString
Optional
The lead's title.

companyString
Optional
The lead's company.

first_nameString
Optional
The lead's first name.

last_nameString
Optional
The lead's last name.

remote_updated_atString
Optional
When the third party's lead was updated.

remote_created_atString
Optional
When the third party's lead was created.

converted_dateString
Optional
When the lead was converted.

converted_contactString
Optional
Must pass in a valid Merge ID, which can be obtained from the id field in the Converted_contact table.

converted_accountString
Optional
Must pass in a valid Merge ID, which can be obtained from the id field in the Converted_account table.

integration_paramsObject
Optional

linked_account_paramsObject
Optional

Response
JSON
{
"model": {
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"lead_source": "API Blogger",
"title": "Co-Founder",
"company": "Merge API",
"first_name": "Gil",
"last_name": "Feig",
"addresses": [
{
"street_1": "50 Bowling Green Dr",
"street_2": "Golden Gate Park",
"city": "San Francisco",
"state": "CA",
"postal_code": "94122",
"country": "USA",
"address_type": "Shipping"
}
],
"email_addresses": [
{
"email_address": "hello@merge.dev",
"email_address_type": "Work"
}
],
"phone_numbers": [
{
"phone_number": "+16789932455",
"phone_number_type": "Mobile"
}
],
"remote_updated_at": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"converted_date": "2022-03-10T00:00:00Z",
"converted_contact": "025fjlc6-6000-430a-848e-aafacbadf4fe",
"converted_account": "9c9de072-29cf-48e3-9578-1ca5b145b40e",
"remote_data": [
{
"path": "/leads",
"data": [
"Varies by platform"
]
}
],
"remote_was_deleted": true
},
"warnings": [
{
"source": {
"pointer": "/age"
},
"title": "Unrecognized Field",
"detail": "An unrecognized field, age, was passed in with request data.",
"problem_type": "UNRECOGNIZED_FIELD"
}
],
"errors": [
{
"source": {
"pointer": "/model/custom_fields"
},
"title": "Missing Required Field",
"detail": "custom_fields is a required field on model.",
"problem_type": "MISSING_REQUIRED_FIELD"
}
],
"logs": [
{
"log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
"dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
"log_summary": {
"url": "https://harvest.greenhouse.io/v1/candidates/",
"method": "POST",
"status_code": 200
}
}
]
}
GET

/leads/{id}

Returns a Lead object with the given id.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

idString
Required

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.
Response
JSON
{
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"lead_source": "API Blogger",
"title": "Co-Founder",
"company": "Merge API",
"first_name": "Gil",
"last_name": "Feig",
"addresses": [
{
"street_1": "50 Bowling Green Dr",
"street_2": "Golden Gate Park",
"city": "San Francisco",
"state": "CA",
"postal_code": "94122",
"country": "USA",
"address_type": "Shipping"
}
],
"email_addresses": [
{
"email_address": "hello@merge.dev",
"email_address_type": "Work"
}
],
"phone_numbers": [
{
"phone_number": "+16789932455",
"phone_number_type": "Mobile"
}
],
"remote_updated_at": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"converted_date": "2022-03-10T00:00:00Z",
"converted_contact": "025fjlc6-6000-430a-848e-aafacbadf4fe",
"converted_account": "9c9de072-29cf-48e3-9578-1ca5b145b40e",
"remote_data": [
{
"path": "/leads",
"data": [
"Varies by platform"
]
}
],
"remote_was_deleted": true
}
Field support by platform

Microsoft Dynamics 365 Sales

Microsoft Dynamics 365 Sales

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Pipeliner

Pipeliner

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Salesforce

Salesforce

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

converted_dateString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Teamwork CRM

Teamwork CRM

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Zendesk Sell

Zendesk Sell

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

converted_dateString

email_addressesEmailAddress[]

first_nameString

last_nameString

lead_sourceString

ownerString

phone_numbersPhoneNumber[]

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Zoho CRM

Zoho CRM

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString
Not seeing a platform that you're looking for? Submit a request for it here.
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET

/leads/meta/post

Returns metadata for Lead POSTs.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Response
JSON
{
"request_schema": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
Field support by platform

Microsoft Dynamics 365 Sales

Microsoft Dynamics 365 Sales

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Pipeliner

Pipeliner

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Salesforce

Salesforce

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

converted_dateString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Teamwork CRM

Teamwork CRM

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Zendesk Sell

Zendesk Sell

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

converted_accountString

converted_contactString

converted_dateString

email_addressesEmailAddress[]

first_nameString

last_nameString

lead_sourceString

ownerString

phone_numbersPhoneNumber[]

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString

titleString

Zoho CRM

Zoho CRM

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


companyString

first_nameString

last_nameString

lead_sourceString

ownerString

remote_created_atString

remote_dataRemoteData[]

remote_idString

remote_updated_atString
Not seeing a platform that you're looking for? Submit a request for it here.
Hint: Use the /linked-accounts endpoint to pull platform support information.

Previous

Engagements

Next Up

Notes