For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
Get startedAPI referenceImplementation
Get startedAPI referenceImplementation
    • Overview
          • The Lead object
          • GET/leads
          • POST/leads
          • GET/leads/{id}
          • GET/leads/meta/post
          • GET/leads/remote-field-classes
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsLeads

/leads

POST
/crm/v1/leads
POST
/api/crm/v1/leads
$curl -X POST https://api.merge.dev/api/crm/v1/leads \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {}
>}'
201Created
1{
2 "model": {
3 "id": "550e8400-e29b-41d4-a716-446655440000",
4 "remote_id": "19202938",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
8 "lead_source": "API Blogger",
9 "title": "Co-Founder",
10 "company": "Merge API",
11 "first_name": "Gil",
12 "last_name": "Feig",
13 "addresses": [
14 {
15 "created_at": "2021-09-15T00:00:00Z",
16 "modified_at": "2021-10-16T00:00:00Z",
17 "street_1": "50 Bowling Green Dr",
18 "street_2": "Golden Gate Park",
19 "city": "San Francisco",
20 "state": "CA",
21 "postal_code": "94122",
22 "country": "US",
23 "address_type": "BILLING"
24 }
25 ],
26 "email_addresses": [
27 {
28 "email_address": "hello@merge.dev",
29 "email_address_type": "Work"
30 }
31 ],
32 "phone_numbers": [
33 {
34 "created_at": "2021-09-15T00:00:00Z",
35 "modified_at": "2021-10-16T00:00:00Z",
36 "phone_number": "+16789932455",
37 "phone_number_type": "Mobile"
38 }
39 ],
40 "remote_updated_at": "2022-02-10T00:00:00Z",
41 "remote_created_at": "2021-11-10T00:00:00Z",
42 "converted_date": "2022-03-10T00:00:00Z",
43 "converted_contact": "025fjlc6-6000-430a-848e-aafacbadf4fe",
44 "converted_account": "9c9de072-29cf-48e3-9578-1ca5b145b40e",
45 "status": "OPEN",
46 "remote_was_deleted": true,
47 "field_mappings": {
48 "organization_defined_targets": {
49 "custom_key": "custom_value"
50 },
51 "linked_account_defined_targets": {
52 "custom_key": "custom_value"
53 }
54 },
55 "remote_data": [
56 {
57 "path": "/leads",
58 "data": null
59 }
60 ],
61 "remote_fields": [
62 {
63 "remote_field_class": {
64 "id": "string",
65 "display_name": "string",
66 "remote_key_name": "string",
67 "description": "string",
68 "is_custom": true,
69 "is_common_model_field": true,
70 "is_required": true,
71 "field_type": "string",
72 "field_format": "string",
73 "field_choices": [
74 "string"
75 ],
76 "item_schema": {
77 "item_type": "string",
78 "item_format": "string",
79 "item_choices": [
80 "string"
81 ]
82 }
83 },
84 "value": "string"
85 }
86 ]
87 },
88 "warnings": [
89 {
90 "title": "Unrecognized Field",
91 "detail": "An unrecognized field, age, was passed in with request data.",
92 "problem_type": "UNRECOGNIZED_FIELD",
93 "source": {
94 "pointer": "/age"
95 },
96 "block_merge_link": true,
97 "raw_error": "string",
98 "error_code": 1
99 }
100 ],
101 "errors": [
102 {
103 "title": "Missing Required Field",
104 "detail": "custom_fields is a required field on model.",
105 "problem_type": "MISSING_REQUIRED_FIELD",
106 "source": {
107 "pointer": "/model/custom_fields"
108 },
109 "block_merge_link": true,
110 "raw_error": "string",
111 "error_code": 1
112 }
113 ],
114 "logs": [
115 {
116 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
117 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
118 "log_summary": {
119 "url": "www.exampleintegration.com/api/v1/exampleapi",
120 "method": "POST",
121 "status_code": 200
122 }
123 }
124 ]
125}

Creates a Lead object with the given values.

Field support by integration

See all supported fields

Use the /linked-accounts endpoint to pull platform support information

Was this page helpful?
Previous

/leads

Next

/leads/{id}

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

is_debug_modebooleanOptional

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

run_asyncbooleanOptional

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

Request

This endpoint expects an object.
modelobjectRequired

Description

The Lead object is used to represent an individual who is a potential customer.

Usage Example

TODO

Response

modelobject

Description

The Lead object is used to represent an individual who is a potential customer.

Usage Example

TODO

warningslist of objects
errorslist of objects
logslist of objects