You can pass Meta campaign attribution fields inside meta_attribution (utm_source, utm_medium, utm_campaign) and custom field values defined for leads inside custom_fields.
Workspace API key header. The key implicitly determines your workspace isolation. Scopes: crm:read for GET/HEAD/OPTIONS, crm:write for POST/PATCH/PUT/DELETE.
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/schema.json","name":"Automate Business","colors":{"primary":"#4F46E5","light":"#6366F1","dark":"#4338CA"},"logo":{"light":"https://mintcdn.com/automatebusiness/Beu61mgwTpSiAjxs/logo/logo.png?fit=max\u0026auto=format\u0026n=Beu61mgwTpSiAjxs\u0026q=85\u0026s=ff0bc6380e126b5d69295878ace444c1","dark":"https://mintcdn.com/automatebusiness/Beu61mgwTpSiAjxs/logo/logo.png?fit=max\u0026auto=format\u0026n=Beu61mgwTpSiAjxs\u0026q=85\u0026s=ff0bc6380e126b5d69295878ace444c1"},"favicon":"https://mintcdn.com/automatebusiness/5oI6ULPysOIASn3N/favicon.svg?fit=max\u0026auto=format\u0026n=5oI6ULPysOIASn3N\u0026q=85\u0026s=16015876b0d9a3b32296308beeb8f08b","footer":{"socials":{"x":"https://x.com/automatebusiness","github":"https://github.com/automatebusiness"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"automatebusiness","hasAudioNarration":false,"actualSubdomain":"automatebusiness","customDomains":["docs.automatebusiness.com"],"gitSource":{"type":"github","owner":"team-automate-business","repo":"automate-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae1a465201cdb70a5218f34","collectionId":"dd69bd42-b559-44ba-988a-23979378f1ed","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae1a465201cdb70a5218f34"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae1a465201cdb70a5218f34","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"API Reference","count":55},{"language":"default","tag":"Automate CRM","count":36},{"language":"default","tag":"Automate Chats","count":35},{"language":"default","tag":"Contacts","count":15},{"language":"default","tag":"Core Features","count":11},{"language":"default","tag":"Messages","count":9},{"language":"default","tag":"Custom Fields","count":9},{"language":"default","tag":"Getting Started","count":5},{"language":"default","tag":"Templates","count":3},{"language":"default","tag":"Contact Follow-ups","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"automate-crm/api-reference/leads/create-lead","slug":"/automate-crm/api-reference/leads/create-lead","pageMetadata":{"title":"Create lead","openapi":"POST /leads","description":"Creates a new lead. When creating a lead, supply `stage_name` to assign the initial pipeline stage. Requires `crm:write` scope.","href":"/automate-crm/api-reference/leads/create-lead"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Creates a new lead. When creating a lead, supply \", _jsx(_components.code, {\n children: \"stage_name\"\n }), \" to assign the initial pipeline stage. Requires \", _jsx(_components.code, {\n children: \"crm:write\"\n }), \" scope.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Creates a new lead deal record in your workspace.`}),`\n`,_jsx(Heading,{level:`3`,id:`stage-assignment-behavior`,children:`Stage assignment behavior`}),`\n`,_jsxs(_components.p,{children:[`When creating a lead, supply the target stage name in the `,_jsx(_components.code,{children:`stage_name`}),` body field (for example, `,_jsx(_components.code,{children:`\"stage_name\": \"New Lead\"`}),`).`]}),`\n`,_jsx(Heading,{level:`3`,id:`attribution-and-custom-fields`,children:`Attribution and custom fields`}),`\n`,_jsxs(_components.p,{children:[`You can pass Meta campaign attribution fields inside `,_jsx(_components.code,{children:`meta_attribution`}),` (`,_jsx(_components.code,{children:`utm_source`}),`, `,_jsx(_components.code,{children:`utm_medium`}),`, `,_jsx(_components.code,{children:`utm_campaign`}),`) and custom field values defined for leads inside `,_jsx(_components.code,{children:`custom_fields`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`required-permissions`,children:`Required permissions`}),`\n`,_jsxs(_components.p,{children:[`Requires an API key with the `,_jsx(_components.code,{children:`crm:write`}),` scope.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create lead","openapi":"POST /leads","description":"Creates a new lead. When creating a lead, supply `stage_name` to assign the initial pipeline stage. Requires `crm:write` scope.","href":"/automate-crm/api-reference/leads/create-lead"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Stage assignment behavior","slug":"stage-assignment-behavior","depth":3,"children":[]},{"title":"Attribution and custom fields","slug":"attribution-and-custom-fields","depth":3,"children":[]},{"title":"Required permissions","slug":"required-permissions","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create Lead","description":"Creates a new lead. When creating a lead, supply `stage_name` to assign the initial pipeline stage. Requires `crm:write` scope.","operationId":"createLead","security":["632fccc9-bdb2-4dca-a85c-5be64190c69a"],"requestBody":"74e0c395-1e62-4efa-9d27-9b5300c6e960","responses":{"201":"1b5c7461-4ae2-426c-8a57-c5edd0b3c3aa","400":"56890501-c477-4544-8bf7-17f885d9ac85","401":"9ff36762-d233-42f1-b174-c4016f6d84ca","403":"2180b032-01c8-4a85-9501-117ff4fe262e","409":"70f81948-031a-4908-b4e2-73657e7d076a"},"method":"post","type":"path","servers":["f0092bbc-9c63-46a0-afae-276f5d14d3c9"],"path":"/leads","baseUrlOptions":["https://crm-api.automatebusiness.com/api/v1/integrations-public"],"title":"Create Lead","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Lead title or organization name","example":"Acme Corp Enterprise Deal","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"email":{"type":"string","format":"email","example":"lead@acmecorp.com","uniqueKey":"email","typeLabel":"string\u003cemail>"},"phone":{"type":"string","example":"+15559876543","uniqueKey":"phone","typeLabel":"string"},"pipeline_id":{"type":"string","description":"Optional pipeline identifier; defaults to primary pipeline if omitted","example":"pipe_default","uniqueKey":"pipeline_id","typeLabel":"string"},"stage_name":{"type":"string","description":"Name of the target stage when creating the lead (e.g. 'New Lead', 'Qualified')","example":"New Lead","uniqueKey":"stage_name","typeLabel":"string"},"assigned_to":{"type":"string","description":"Team member user ID","example":"user_sarah","uniqueKey":"assigned_to","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","uniqueKey":"tags.items.[INDEX]","typeLabel":"string"},"example":["enterprise","inbound"],"uniqueKey":"tags","typeLabel":"string[]"},"custom_fields":{"type":"object","additionalProperties":true,"example":{"deal_value":50000},"uniqueKey":"custom_fields","typeLabel":"object"},"meta_attribution":{"type":"object","properties":{"utm_source":{"type":"string","uniqueKey":"meta_attribution.utm_source","typeLabel":"string"},"utm_medium":{"type":"string","uniqueKey":"meta_attribution.utm_medium","typeLabel":"string"},"utm_campaign":{"type":"string","uniqueKey":"meta_attribution.utm_campaign","typeLabel":"string"}},"uniqueKey":"meta_attribution","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"Acme Corp Enterprise Deal","email":"lead@acmecorp.com","phone":"+15559876543","pipeline_id":"pipe_default","stage_name":"New Lead","assigned_to":"user_sarah","tags":["enterprise","inbound"],"custom_fields":{"deal_value":50000},"meta_attribution":{"utm_source":"\u003cstring>","utm_medium":"\u003cstring>","utm_campaign":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"1b5c7461-4ae2-426c-8a57-c5edd0b3c3aa":{"description":"Lead created successfully","content":{"application/json":{"schema":{"type":"object","description":"Standard envelope returned by POST, PATCH, PUT, and DELETE (mutation) endpoints","required":["success","data","error"],"properties":{"success":{"type":"boolean","example":true,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"object","description":"The created or updated entity","properties":{"id":{"type":"string","example":"lead_890ef12a","uniqueKey":"data.id","typeLabel":"string"},"name":{"type":"string","example":"Acme Corp Enterprise Deal","uniqueKey":"data.name","typeLabel":"string"},"email":{"type":"string","format":"email","example":"lead@acmecorp.com","uniqueKey":"data.email","typeLabel":"string\u003cemail>"},"phone":{"type":"string","example":"+15559876543","uniqueKey":"data.phone","typeLabel":"string"},"pipeline_id":{"type":"string","example":"pipe_default","uniqueKey":"data.pipeline_id","typeLabel":"string"},"stage_id":{"type":"string","example":"stage_contacted","uniqueKey":"data.stage_id","typeLabel":"string"},"stage_name":{"type":"string","example":"Contacted","uniqueKey":"data.stage_name","typeLabel":"string"},"assigned_to":{"type":"string","example":"user_sarah","uniqueKey":"data.assigned_to","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","uniqueKey":"data.tags.items.[INDEX]","typeLabel":"string"},"example":["enterprise","q4-inbound"],"uniqueKey":"data.tags","typeLabel":"string[]"},"custom_fields":{"type":"object","additionalProperties":true,"example":{"deal_value":50000,"industry":"Technology"},"uniqueKey":"data.custom_fields","typeLabel":"object"},"meta_attribution":{"type":"object","properties":{"utm_source":{"type":"string","example":"google","uniqueKey":"data.meta_attribution.utm_source","typeLabel":"string"},"utm_medium":{"type":"string","example":"cpc","uniqueKey":"data.meta_attribution.utm_medium","typeLabel":"string"},"utm_campaign":{"type":"string","example":"fall_promo","uniqueKey":"data.meta_attribution.utm_campaign","typeLabel":"string"}},"uniqueKey":"data.meta_attribution","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","example":"2026-10-26T09:30:00.000Z","uniqueKey":"data.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","example":"2026-10-26T09:30:00.000Z","uniqueKey":"data.updated_at","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"},"error":{"type":"null","example":null,"isRequired":true,"uniqueKey":"error","typeLabel":"null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"data":{"id":"lead_890ef12a","name":"Acme Corp Enterprise Deal","email":"lead@acmecorp.com","phone":"+15559876543","pipeline_id":"pipe_default","stage_id":"stage_contacted","stage_name":"Contacted","assigned_to":"user_sarah","tags":["enterprise","q4-inbound"],"custom_fields":{"deal_value":50000,"industry":"Technology"},"meta_attribution":{"utm_source":"google","utm_medium":"cpc","utm_campaign":"fall_promo"},"created_at":"2026-10-26T09:30:00.000Z","updated_at":"2026-10-26T09:30:00.000Z"},"error":null}}},"exampleType":"generated"}},"exampleType":"generated"},"56890501-c477-4544-8bf7-17f885d9ac85":{"description":"Validation failed (e.g., missing required fields, invalid format)","content":{"application/json":{"schema":{"type":"object","description":"Standard error envelope returned when a request fails","properties":{"success":{"type":"boolean","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"null","example":null,"isRequired":true,"uniqueKey":"data","typeLabel":"null"},"error":{"type":"object","properties":{"message":{"type":"string","example":"Validation failed","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","example":"Required","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"},"field":{"type":"string","example":"email","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","example":"invalid_type","uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"required":["message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["success","data","error"],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"data":null,"error":{"message":"Validation failed","details":[{"message":"Required","field":"email","code":"invalid_type"}]}},"examples":{"Example":{"title":"Example","value":{"success":false,"data":null,"error":{"message":"Validation failed","details":[{"message":"Required","field":"email","code":"invalid_type"}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"9ff36762-d233-42f1-b174-c4016f6d84ca":{"description":"Unauthorized (invalid or missing x-api-key)","content":{"application/json":{"schema":{"type":"object","description":"Standard error envelope returned when a request fails","properties":{"success":{"type":"boolean","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"null","example":null,"isRequired":true,"uniqueKey":"data","typeLabel":"null"},"error":{"type":"object","properties":{"message":{"type":"string","example":"Validation failed","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","example":"Required","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"},"field":{"type":"string","example":"email","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","example":"invalid_type","uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"required":["message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["success","data","error"],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"data":null,"error":{"message":"Invalid or missing API key."}},"examples":{"Example":{"title":"Example","value":{"success":false,"data":null,"error":{"message":"Invalid or missing API key."}}}},"exampleType":"examples"}},"exampleType":"examples"},"2180b032-01c8-4a85-9501-117ff4fe262e":{"description":"Forbidden (API key lacks required crm:read or crm:write scope)","content":{"application/json":{"schema":{"type":"object","description":"Standard error envelope returned when a request fails","properties":{"success":{"type":"boolean","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"null","example":null,"isRequired":true,"uniqueKey":"data","typeLabel":"null"},"error":{"type":"object","properties":{"message":{"type":"string","example":"Validation failed","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","example":"Required","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"},"field":{"type":"string","example":"email","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","example":"invalid_type","uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"required":["message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["success","data","error"],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"data":null,"error":{"message":"Forbidden: insufficient permissions for this operation."}},"examples":{"Example":{"title":"Example","value":{"success":false,"data":null,"error":{"message":"Forbidden: insufficient permissions for this operation."}}}},"exampleType":"examples"}},"exampleType":"examples"},"70f81948-031a-4908-b4e2-73657e7d076a":{"description":"Resource conflict (e.g. duplicate unique code)","content":{"application/json":{"schema":{"type":"object","description":"Standard error envelope returned when a request fails","properties":{"success":{"type":"boolean","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"null","example":null,"isRequired":true,"uniqueKey":"data","typeLabel":"null"},"error":{"type":"object","properties":{"message":{"type":"string","example":"Validation failed","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","example":"Required","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"},"field":{"type":"string","example":"email","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","example":"invalid_type","uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"required":["message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["success","data","error"],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"data":null,"error":{"message":"Conflict: resource with unique identifier already exists."}},"examples":{"Example":{"title":"Example","value":{"success":false,"data":null,"error":{"message":"Conflict: resource with unique identifier already exists."}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"632fccc9-bdb2-4dca-a85c-5be64190c69a":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Workspace API key header. The key implicitly determines your workspace isolation. Scopes: `crm:read` for GET/HEAD/OPTIONS, `crm:write` for POST/PATCH/PUT/DELETE.","scopes":["crm:write"],"schemeName":"apiKeyAuth"}}},"servers":{"f0092bbc-9c63-46a0-afae-276f5d14d3c9":{"url":"https://crm-api.automatebusiness.com/api/v1/integrations-public","description":"Production Integration Server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Workspace API key header. The key implicitly determines your workspace isolation. Scopes: `crm:read` for GET/HEAD/OPTIONS, `crm:write` for POST/PATCH/PUT/DELETE.","scopes":["crm:write"],"schemeName":"apiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"Workspace API key header. The key implicitly determines your workspace isolation. Scopes: `crm:read` for GET/HEAD/OPTIONS, `crm:write` for POST/PATCH/PUT/DELETE.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKeyAuth","name":"x-api-key"}],"title":"apiKeyAuth"}]},"originalFileLocation":"automate-crm/api-reference/openapi.json"},"subdomain":"automatebusiness","siteName":"Automate Business","title":"Create lead - Automate Business","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T07:29:48.734Z","originalFileLocation":"automate-crm/api-reference/leads/create-lead.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a new lead. When creating a lead, supply stage_name to assign the initial pipeline stage. Requires crm:write scope.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Automate Business\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintcdn.com/automatebusiness/5oI6ULPysOIASn3N/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5oI6ULPysOIASn3N\u0026amp;q=85\u0026amp;s=16015876b0d9a3b32296308beeb8f08b\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/automatebusiness/5oI6ULPysOIASn3N/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5oI6ULPysOIASn3N\u0026amp;q=85\u0026amp;s=16015876b0d9a3b32296308beeb8f08b\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/automatebusiness/5oI6ULPysOIASn3N/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5oI6ULPysOIASn3N\u0026amp;q=85\u0026amp;s=16015876b0d9a3b32296308beeb8f08b\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/automatebusiness/5oI6ULPysOIASn3N/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5oI6ULPysOIASn3N\u0026amp;q=85\u0026amp;s=16015876b0d9a3b32296308beeb8f08b\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create lead - Automate Business\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a new lead. When creating a lead, supply stage_name to assign the initial pipeline stage. Requires crm:write scope.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Automate Business\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://automatebusiness.mintlify.site/_mintlify/api/og/v2?division=Leads\u0026amp;title=Create+lead\u0026amp;description=Creates+a+new+lead.+When+creating+a+lead%2C+supply+%60stage_name%60+to+assign+the+initial+pipeline+stage.+Requires+%60crm%3Awrite%60+scope.\u0026amp;theme=f5b14f5041704a126020c7fb\u0026amp;signature=a606763b3c9dac45938cda1da1edbea265f7d28c2ba6e08f8da887d068e2345f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create lead - Automate Business\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a new lead. When creating a lead, supply stage_name to assign the initial pipeline stage. Requires crm:write scope.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://automatebusiness.mintlify.site/_mintlify/api/og/v2?division=Leads\u0026amp;title=Create+lead\u0026amp;description=Creates+a+new+lead.+When+creating+a+lead%2C+supply+%60stage_name%60+to+assign+the+initial+pipeline+stage.+Requires+%60crm%3Awrite%60+scope.\u0026amp;theme=f5b14f5041704a126020c7fb\u0026amp;signature=a606763b3c9dac45938cda1da1edbea265f7d28c2ba6e08f8da887d068e2345f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/automatebusiness/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Automate Business\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F46E5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/automate-crm/api-reference/leads/create-lead.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.automatebusiness.com/#organization\",\"name\":\"Automate Business\",\"url\":\"https://docs.automatebusiness.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/automatebusiness/Beu61mgwTpSiAjxs/logo/logo.png?fit=max\u0026auto=format\u0026n=Beu61mgwTpSiAjxs\u0026q=85\u0026s=ff0bc6380e126b5d69295878ace444c1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.automatebusiness.com#website\",\"name\":\"Automate Business\",\"url\":\"https://docs.automatebusiness.com\",\"publisher\":{\"@id\":\"https://docs.automatebusiness.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead#webpage\",\"url\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead\",\"name\":\"Create lead\",\"description\":\"Creates a new lead. When creating a lead, supply stage_name to assign the initial pipeline stage. Requires crm:write scope.\",\"dateModified\":\"2026-10-28T07:29:48.734Z\",\"isPartOf\":{\"@id\":\"https://docs.automatebusiness.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.automatebusiness.com/automate-crm/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Leads\",\"item\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/list-leads\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create lead\",\"item\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead#apireference\",\"headline\":\"Create lead\",\"name\":\"Create lead\",\"description\":\"Creates a new lead. When creating a lead, supply stage_name to assign the initial pipeline stage. Requires crm:write scope.\",\"url\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead\",\"mainEntityOfPage\":{\"@id\":\"https://docs.automatebusiness.com/automate-crm/api-reference/leads/create-lead#webpage\"},\"dateModified\":\"2026-10-28T07:29:48.734Z\",\"publisher\":{\"@id\":\"https://docs.automatebusiness.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.automatebusiness.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Automate Business\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Automate Business","nav":{"global":null,"tabs":[{"tab":"Automate Chats","pages":[{"title":"Automate Chats","href":"/automate-chats/introduction"}]},{"tab":"Automate CRM","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/automate-crm/introduction"},{"title":"Quickstart","href":"/automate-crm/quickstart"}]},{"group":"Core Features","pages":[{"title":"Leads","href":"/automate-crm/features/leads"},{"title":"Contacts","href":"/automate-crm/features/contacts"},{"title":"Products","href":"/automate-crm/features/products"},{"title":"Follow-ups","href":"/automate-crm/features/follow-ups"},{"title":"Custom fields","href":"/automate-crm/features/custom-fields"},{"title":"Inbox lookup","href":"/automate-crm/features/inbox-lookup"}]},{"group":"API Reference","pages":[{"title":"API overview","href":"/automate-crm/api-reference/introduction"},{"title":"Authentication","href":"/automate-crm/api-reference/authentication"},{"group":"Leads","pages":[{"title":"List leads","openapi":"GET /leads","description":"Retrieves a paginated list of leads sorted newest first. Requires `crm:read` scope.","href":"/automate-crm/api-reference/leads/list-leads"},{"title":"Create lead","openapi":"POST /leads","href":"/automate-crm/api-reference/leads/create-lead"},{"title":"Update lead","openapi":"PATCH /leads/{id}","description":"Updates an existing lead. When updating a lead's stage, supply `stage_id` instead of `stage_name`. Requires `crm:write` scope.","href":"/automate-crm/api-reference/leads/update-lead"}]},{"group":"Contacts","pages":[{"title":"List contacts","openapi":"GET /contacts","href":"/automate-crm/api-reference/contacts/list-contacts"},{"title":"Get contact","openapi":"GET /contacts/{id}","href":"/automate-crm/api-reference/contacts/get-contact"},{"title":"Create contact","openapi":"POST /contacts","href":"/automate-crm/api-reference/contacts/create-contact"},{"title":"Update contact","openapi":"PATCH /contacts/{id}","href":"/automate-crm/api-reference/contacts/update-contact"}]},{"group":"Products","pages":[{"title":"List products","openapi":"GET /products","href":"/automate-crm/api-reference/products/list-products"},{"title":"Create product","openapi":"POST /products","href":"/automate-crm/api-reference/products/create-product"},{"title":"Update product","openapi":"PATCH /products/{id}","href":"/automate-crm/api-reference/products/update-product"}]},{"group":"Lead Follow-ups","pages":[{"title":"List lead follow-ups","openapi":"GET /lead-followups","href":"/automate-crm/api-reference/follow-ups/list-lead-followups"},{"title":"Create lead follow-up","openapi":"POST /lead-followups","href":"/automate-crm/api-reference/follow-ups/create-lead-followup"},{"title":"Update lead follow-up","openapi":"PATCH /lead-followups/{id}","href":"/automate-crm/api-reference/follow-ups/update-lead-followup"}]},{"group":"Contact Follow-ups","pages":[{"title":"List contact follow-ups","openapi":"GET /contact-followups","href":"/automate-crm/api-reference/follow-ups/list-contact-followups"},{"title":"Create contact follow-up","openapi":"POST /contact-followups","href":"/automate-crm/api-reference/follow-ups/create-contact-followup"},{"title":"Update contact follow-up","openapi":"PATCH /contact-followups/{id}","href":"/automate-crm/api-reference/follow-ups/update-contact-followup"}]},{"group":"Custom Fields","pages":[{"title":"List lead custom fields","openapi":"GET /leads/custom-fields","href":"/automate-crm/api-reference/custom-fields/list-lead-custom-fields"},{"title":"Create lead custom field","openapi":"POST /leads/custom-fields","href":"/automate-crm/api-reference/custom-fields/create-lead-custom-field"},{"title":"Update lead custom field","openapi":"PATCH /leads/custom-fields/{id}","href":"/automate-crm/api-reference/custom-fields/update-lead-custom-field"},{"title":"List contact custom fields","openapi":"GET /contacts/custom-fields","href":"/automate-crm/api-reference/custom-fields/list-contact-custom-fields"},{"title":"Create contact custom field","openapi":"POST /contacts/custom-fields","href":"/automate-crm/api-reference/custom-fields/create-contact-custom-field"},{"title":"Update contact custom field","openapi":"PATCH /contacts/custom-fields/{id}","href":"/automate-crm/api-reference/custom-fields/update-contact-custom-field"},{"title":"List product custom fields","openapi":"GET /products/custom-fields","href":"/automate-crm/api-reference/custom-fields/list-product-custom-fields"},{"title":"Create product custom field","openapi":"POST /products/custom-fields","href":"/automate-crm/api-reference/custom-fields/create-product-custom-field"},{"title":"Update product custom field","openapi":"PATCH /products/custom-fields/{id}","href":"/automate-crm/api-reference/custom-fields/update-product-custom-field"}]},{"group":"Inbox Lookup","pages":[{"title":"Lookup by phone","openapi":"GET /inbox/by-phone","href":"/automate-crm/api-reference/inbox-lookup/lookup-by-phone"}]}]}]}]},"basePath":"","title":"Create lead - Automate Business","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-BUDYNlhG.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}