Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.
A unique value for each new request, such as a UUID. Send the same value to retry a request safely. The same key and payload replay the first response with Idempotency-Replayed: true.
Key or current label of a workspace lead type. RoofKit stores the key. When omitted, a new Contact gets external. When omitted on an upsert that matches an existing Contact, an empty lead type becomes external and a set lead type stays. A sent value always replaces the current one. An unknown value returns VALIDATION_ERROR.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"RoofKit Docs","colors":{"primary":"#037ff7","light":"#4da3ff","dark":"#037ff7"},"logo":{"light":"https://mintcdn.com/roofkit/TR022mpIPWwv8ies/logo/light.svg?fit=max\u0026auto=format\u0026n=TR022mpIPWwv8ies\u0026q=85\u0026s=ea7c8373b5ac8f54d47abdb424492281","dark":"https://mintcdn.com/roofkit/TR022mpIPWwv8ies/logo/dark.svg?fit=max\u0026auto=format\u0026n=TR022mpIPWwv8ies\u0026q=85\u0026s=966fdf8d7d86ca531f8a710196433a06","href":"https://roofkit.ai"},"favicon":"https://mintcdn.com/roofkit/TR022mpIPWwv8ies/favicon.svg?fit=max\u0026auto=format\u0026n=TR022mpIPWwv8ies\u0026q=85\u0026s=19cff8bdf79109cda52e561c820967b8","api":{"playground":{"display":"interactive","proxy":false}},"appearance":{"default":"light","strict":false},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"navbar":{"primary":{"type":"button","label":"Open RoofKit","href":"https://app.roofkit.ai"}},"href":""},{"language":"es","navbar":{"primary":{"type":"button","label":"Abrir RoofKit","href":"https://app.roofkit.ai"}},"href":"es"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"roofkit","hasAudioNarration":false,"actualSubdomain":"roofkit","customDomains":["docs.roofkit.ai"],"gitSource":{"type":"github","owner":"verveai-hq","repo":"roofkit","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":"","_id":"6ae2324d9d8996b75b794f92"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae4bbe7a0e61751fdae9b24","collectionId":"38d96dba-f419-45f0-b6dd-5b8666232a5d","liveDeploymentHistoryId":"6ae4bbe7a0e61751fdae9b24","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae8c1c1d2d285fc6f47301b","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"en","tag":"API reference","count":62},{"language":"es","tag":"Referencia de la API","count":62},{"language":"en","tag":"Data Objects","count":23},{"language":"es","tag":"Data Objects","count":23},{"language":"en","tag":"Guides","count":11},{"language":"es","tag":"Guías","count":11},{"language":"en","tag":"MCP","count":9},{"language":"en","tag":"Leads","count":9},{"language":"en","tag":"Reports","count":9},{"language":"en","tag":"Visualizer","count":9},{"language":"es","tag":"MCP","count":9},{"language":"es","tag":"Contactos","count":9},{"language":"es","tag":"Reportes","count":9},{"language":"es","tag":"Visualizador","count":9},{"language":"en","tag":"Tools","count":8},{"language":"es","tag":"Herramientas","count":8},{"language":"en","tag":"Attribution","count":6},{"language":"es","tag":"Atribución","count":6},{"language":"en","tag":"Install","count":4},{"language":"es","tag":"Instalación","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/leads/create-or-update-lead","slug":"/api-reference/leads/create-or-update-lead","pageMetadata":{"title":"Create or update lead","description":"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\n","deprecated":null,"version":null,"sidebarTitle":"Create or update lead","openapi":"/api-reference/openapi.yaml post /api/v1/leads","href":"/api-reference/leads/create-or-update-lead","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\"\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{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components};return _jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Required scopes:`}),` `,_jsx(_components.code,{children:`leads.write`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create or update lead","description":"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\n","deprecated":null,"version":null,"sidebarTitle":"Create or update lead","openapi":"/api-reference/openapi.yaml post /api/v1/leads","href":"/api-reference/leads/create-or-update-lead","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Leads"],"operationId":"Upsert lead","summary":"Create or update lead","description":"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\n","x-required-scopes":["leads.write"],"parameters":["3cba8599-c78f-4a55-8677-84d9d281895d"],"requestBody":"077f0c07-f2d8-4e15-8741-7ae4152b0c97","responses":{"200":"dfb762de-ddef-45bb-83a4-059adc6a852b","201":"2b5ffdd8-815c-46f3-a0ec-770e2f29063d","400":"5b9d8ecb-865d-454e-a1ac-ac051113d3fc","401":"3884cab5-241d-4a5b-8c4c-b7002151ba01","403":"c52b89a8-a77b-49fa-8eee-411119ef2f99","409":"959b6a70-e639-4515-9c82-96168e45a43a","429":"8a693ef6-a55a-448f-ac54-f0d803ad5ff8","500":"01f49a2c-c593-4131-ad92-c2902b5c1721"},"x-mint":{"href":"/api-reference/leads/create-or-update-lead","metadata":{"title":"Create or update lead","sidebarTitle":"Create or update lead"},"content":"**Required scopes:** `leads.write`"},"method":"post","type":"path","servers":["af90f5c1-c298-41db-b4de-b5f584b84f29"],"security":["85fea81a-923e-4d80-a24b-4ae4963791cc"],"path":"/api/v1/leads","baseUrlOptions":["https://api.roofkit.ai"],"title":"Create or update lead","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{"3cba8599-c78f-4a55-8677-84d9d281895d":{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value for each new request, such as a UUID. Send the same value to retry a request safely. The same key and payload replay the first response with `Idempotency-Replayed: true`.","schema":{"type":"string","minLength":1,"maxLength":160,"isRequired":true,"description":"A unique value for each new request, such as a UUID. Send the same value to retry a request safely. The same key and payload replay the first response with `Idempotency-Replayed: true`.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"external_id":{"oneOf":[{"type":"string","maxLength":200,"uniqueKey":"external_id.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":200,"uniqueKey":"external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"external_id","typeLabel":"string | null"},"external_source":{"oneOf":[{"type":"string","maxLength":120,"uniqueKey":"external_source.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":120,"uniqueKey":"external_source.oneOf.1","typeLabel":"null"}],"uniqueKey":"external_source","typeLabel":"string | null"},"session_id":{"oneOf":[{"type":"string","maxLength":500,"uniqueKey":"session_id.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":500,"uniqueKey":"session_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"session_id","typeLabel":"string | null"},"contact_name":{"oneOf":[{"type":"string","maxLength":200,"uniqueKey":"contact_name.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":200,"uniqueKey":"contact_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"contact_name","typeLabel":"string | null"},"contact_email":{"oneOf":[{"type":"string","format":"email","uniqueKey":"contact_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","uniqueKey":"contact_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"contact_email","typeLabel":"string\u003cemail> | null"},"contact_phone":{"oneOf":[{"description":"US-only phone. Invalid or non-US values return VALIDATION_ERROR.","type":"string","uniqueKey":"contact_phone.oneOf.0","typeLabel":"string"},{"description":"US-only phone. Invalid or non-US values return VALIDATION_ERROR.","type":"null","uniqueKey":"contact_phone.oneOf.1","typeLabel":"null"}],"uniqueKey":"contact_phone","typeLabel":"string | null"},"property_address":{"oneOf":[{"description":"Optional property address. Empty, explicit US country, or US state + ZIP formats are accepted; clearly non-US values return VALIDATION_ERROR.","type":"string","maxLength":500,"uniqueKey":"property_address.oneOf.0","typeLabel":"string"},{"description":"Optional property address. Empty, explicit US country, or US state + ZIP formats are accepted; clearly non-US values return VALIDATION_ERROR.","type":"null","maxLength":500,"uniqueKey":"property_address.oneOf.1","typeLabel":"null"}],"uniqueKey":"property_address","typeLabel":"string | null"},"form_data":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"form_data.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"form_data.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"form_data.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"form_data.additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"type":"string","uniqueKey":"form_data.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string"},"uniqueKey":"form_data.additionalProperties.oneOf.4","typeLabel":"string[]"}],"uniqueKey":"form_data.additionalProperties","typeLabel":"string | number | boolean | null | string[]"},"uniqueKey":"form_data","typeLabel":"object"},"custom_fields":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"custom_fields.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"custom_fields.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"custom_fields.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"custom_fields.additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"type":"string","uniqueKey":"custom_fields.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string"},"uniqueKey":"custom_fields.additionalProperties.oneOf.4","typeLabel":"string[]"}],"uniqueKey":"custom_fields.additionalProperties","typeLabel":"string | number | boolean | null | string[]"},"uniqueKey":"custom_fields","typeLabel":"object"},"selected_material_id":{"oneOf":[{"type":"string","uniqueKey":"selected_material_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"selected_material_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"selected_material_id","typeLabel":"string | null"},"selected_color_id":{"oneOf":[{"type":"string","uniqueKey":"selected_color_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"selected_color_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"selected_color_id","typeLabel":"string | null"},"selected_shape_id":{"oneOf":[{"type":"string","uniqueKey":"selected_shape_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"selected_shape_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"selected_shape_id","typeLabel":"string | null"},"status_stage_id":{"type":"string","uniqueKey":"status_stage_id","typeLabel":"string"},"attribution":{"type":"object","additionalProperties":false,"properties":{"source":{"oneOf":[{"type":"string","uniqueKey":"attribution.source.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"attribution.source.oneOf.1","typeLabel":"null"}],"uniqueKey":"attribution.source","typeLabel":"string | null"},"medium":{"oneOf":[{"type":"string","uniqueKey":"attribution.medium.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"attribution.medium.oneOf.1","typeLabel":"null"}],"uniqueKey":"attribution.medium","typeLabel":"string | null"},"campaign":{"oneOf":[{"type":"string","uniqueKey":"attribution.campaign.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"attribution.campaign.oneOf.1","typeLabel":"null"}],"uniqueKey":"attribution.campaign","typeLabel":"string | null"},"content":{"oneOf":[{"type":"string","uniqueKey":"attribution.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"attribution.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"attribution.content","typeLabel":"string | null"},"conversion_url":{"oneOf":[{"type":"string","format":"uri","uniqueKey":"attribution.conversion_url.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","uniqueKey":"attribution.conversion_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"attribution.conversion_url","typeLabel":"string\u003curi> | null"},"entry":{"description":"Website entry for this touch. Omitted when unset. Does not replace source.","type":"string","enum":["button","embed","direct"],"uniqueKey":"attribution.entry","typeLabel":"enum\u003cstring>"}},"uniqueKey":"attribution","typeLabel":"object"},"marketing_attribution_overrides":{"type":"object","additionalProperties":false,"properties":{"source":{"oneOf":[{"type":"string","uniqueKey":"marketing_attribution_overrides.source.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"marketing_attribution_overrides.source.oneOf.1","typeLabel":"null"}],"uniqueKey":"marketing_attribution_overrides.source","typeLabel":"string | null"},"medium":{"oneOf":[{"type":"string","uniqueKey":"marketing_attribution_overrides.medium.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"marketing_attribution_overrides.medium.oneOf.1","typeLabel":"null"}],"uniqueKey":"marketing_attribution_overrides.medium","typeLabel":"string | null"},"campaign":{"oneOf":[{"type":"string","uniqueKey":"marketing_attribution_overrides.campaign.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"marketing_attribution_overrides.campaign.oneOf.1","typeLabel":"null"}],"uniqueKey":"marketing_attribution_overrides.campaign","typeLabel":"string | null"},"content":{"oneOf":[{"type":"string","uniqueKey":"marketing_attribution_overrides.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"marketing_attribution_overrides.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"marketing_attribution_overrides.content","typeLabel":"string | null"}},"uniqueKey":"marketing_attribution_overrides","typeLabel":"object"},"notes":{"oneOf":[{"type":"string","maxLength":5000,"uniqueKey":"notes.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":5000,"uniqueKey":"notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"notes","typeLabel":"string | null"},"quote_value":{"oneOf":[{"type":"number","description":"Number or numeric string accepted on write. Serialized responses use number or null.","maximum":10000000,"minimum":0,"uniqueKey":"quote_value.oneOf.0","typeLabel":"number"},{"type":"string","description":"Number or numeric string accepted on write. Serialized responses use number or null.","pattern":"^[0-9]+(\\.[0-9]+)?$","uniqueKey":"quote_value.oneOf.1","typeLabel":"string"},{"type":"null","description":"Number or numeric string accepted on write. Serialized responses use number or null.","uniqueKey":"quote_value.oneOf.2","typeLabel":"null"}],"uniqueKey":"quote_value","typeLabel":"number | string | null"},"sales_value":{"oneOf":[{"type":"number","description":"Number or numeric string accepted on write. Serialized responses use number or null.","maximum":10000000,"minimum":0,"uniqueKey":"sales_value.oneOf.0","typeLabel":"number"},{"type":"string","description":"Number or numeric string accepted on write. Serialized responses use number or null.","pattern":"^[0-9]+(\\.[0-9]+)?$","uniqueKey":"sales_value.oneOf.1","typeLabel":"string"},{"type":"null","description":"Number or numeric string accepted on write. Serialized responses use number or null.","uniqueKey":"sales_value.oneOf.2","typeLabel":"null"}],"uniqueKey":"sales_value","typeLabel":"number | string | null"},"follow_up_date":{"oneOf":[{"type":"string","format":"date-time","description":"ISO 8601 date-time with Z or a ±HH:MM offset. Stored as UTC.","uniqueKey":"follow_up_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"ISO 8601 date-time with Z or a ±HH:MM offset. Stored as UTC.","uniqueKey":"follow_up_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"follow_up_date","typeLabel":"string\u003cdate-time> | null"},"lead_type":{"description":"Key or current label of a workspace lead type. RoofKit stores the key. When omitted, a new Contact gets external. When omitted on an upsert that matches an existing Contact, an empty lead type becomes external and a set lead type stays. A sent value always replaces the current one. An unknown value returns VALIDATION_ERROR.","type":"string","minLength":1,"maxLength":100,"uniqueKey":"lead_type","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"external_id":"\u003cstring>","external_source":"\u003cstring>","session_id":"\u003cstring>","contact_name":"\u003cstring>","contact_email":"jsmith@example.com","contact_phone":"\u003cstring>","property_address":"\u003cstring>","form_data":{},"custom_fields":{},"selected_material_id":"\u003cstring>","selected_color_id":"\u003cstring>","selected_shape_id":"\u003cstring>","status_stage_id":"\u003cstring>","attribution":{"source":"\u003cstring>","medium":"\u003cstring>","campaign":"\u003cstring>","content":"\u003cstring>","conversion_url":"\u003cstring>"},"marketing_attribution_overrides":{"source":"\u003cstring>","medium":"\u003cstring>","campaign":"\u003cstring>","content":"\u003cstring>"},"notes":"\u003cstring>","quote_value":5000000,"sales_value":5000000,"follow_up_date":"2023-11-07T05:31:56Z","lead_type":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"dfb762de-ddef-45bb-83a4-059adc6a852b":{"description":"Existing lead updated.","headers":{"X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"ISO timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time"}},"Deprecation":{"description":"Present only when the request sent a date-time without a UTC offset. That form is deprecated and was read as UTC. The value is the RFC 9745 deprecation date as `@` and Unix seconds.\n","schema":{"type":"string","example":"@1791763200"}},"Sunset":{"description":"Present only with Deprecation. The RFC 8594 HTTP-date from which a date-time without a UTC offset returns 400.\n","schema":{"type":"string","example":"Sun, 10 Jan 2027 00:00:00 GMT"}},"Idempotency-Replayed":{"description":"Present and true when a stored successful write response was replayed.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["lead","created"],"properties":{"lead":{"type":"object","additionalProperties":false,"required":["id","contact_name","contact_email","contact_phone","property_address","status","status_stage_id","attribution","communication_summary","created_at","updated_at"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"lead.id","typeLabel":"string"},"contact_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.contact_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.contact_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.contact_name","typeLabel":"string | null"},"contact_email":{"oneOf":[{"type":"string","format":"email","isRequired":true,"uniqueKey":"lead.contact_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","isRequired":true,"uniqueKey":"lead.contact_email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.contact_email","typeLabel":"string\u003cemail> | null"},"contact_phone":{"oneOf":[{"description":"Stored phone digits for the lead.","type":"string","isRequired":true,"uniqueKey":"lead.contact_phone.oneOf.0","typeLabel":"string"},{"description":"Stored phone digits for the lead.","type":"null","isRequired":true,"uniqueKey":"lead.contact_phone.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.contact_phone","typeLabel":"string | null"},"property_address":{"oneOf":[{"description":"Property address text for the lead.","type":"string","isRequired":true,"uniqueKey":"lead.property_address.oneOf.0","typeLabel":"string"},{"description":"Property address text for the lead.","type":"null","isRequired":true,"uniqueKey":"lead.property_address.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.property_address","typeLabel":"string | null"},"status":{"description":"Compatibility bucket of the Contacts status (not_set, pending, appointment_scheduled, sold, or lost). A workspace that imports its CRM keeps the deal Stage on Opportunities, and its leads can stay on not_set.","type":"string","isRequired":true,"uniqueKey":"lead.status","typeLabel":"string"},"status_stage_id":{"oneOf":[{"description":"Id of the Contacts status.","type":"string","isRequired":true,"uniqueKey":"lead.status_stage_id.oneOf.0","typeLabel":"string"},{"description":"Id of the Contacts status.","type":"null","isRequired":true,"uniqueKey":"lead.status_stage_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.status_stage_id","typeLabel":"string | null"},"attribution":{"type":"object","additionalProperties":false,"properties":{"source":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.source.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.source.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.source","typeLabel":"string | null"},"medium":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.medium.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.medium.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.medium","typeLabel":"string | null"},"campaign":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.campaign.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.campaign.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.campaign","typeLabel":"string | null"},"content":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.content","typeLabel":"string | null"},"conversion_url":{"oneOf":[{"type":"string","format":"uri","uniqueKey":"lead.attribution.conversion_url.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","uniqueKey":"lead.attribution.conversion_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.conversion_url","typeLabel":"string\u003curi> | null"},"entry":{"description":"Website entry for this touch. Omitted when unset. Does not replace source.","type":"string","enum":["button","embed","direct"],"uniqueKey":"lead.attribution.entry","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"lead.attribution","typeLabel":"object"},"communication_summary":{"type":"object","additionalProperties":false,"required":["last_call_at","last_sms_at","call_count","answered_call_count","missed_call_count","sms_inbound_count","sms_outbound_count","last_tracking_number","last_communication_source","last_communication_campaign"],"properties":{"last_call_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_call_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_call_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_call_at","typeLabel":"string\u003cdate-time> | null"},"last_sms_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_sms_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_sms_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_sms_at","typeLabel":"string\u003cdate-time> | null"},"call_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.call_count","typeLabel":"integer"},"answered_call_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.answered_call_count","typeLabel":"integer"},"missed_call_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.missed_call_count","typeLabel":"integer"},"sms_inbound_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.sms_inbound_count","typeLabel":"integer"},"sms_outbound_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.sms_outbound_count","typeLabel":"integer"},"last_tracking_number":{"oneOf":[{"type":"object","required":["label","phone_last4","national_format"],"properties":{"label":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.label.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.label.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.label","typeLabel":"string | null"},"phone_last4":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.phone_last4.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.phone_last4.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.phone_last4","typeLabel":"string | null"},"national_format":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.national_format.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.national_format.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.national_format","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number","typeLabel":"object | null"},"last_communication_source":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_source.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_source.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_source","typeLabel":"string | null"},"last_communication_campaign":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_campaign.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_campaign.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_campaign","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"lead.communication_summary","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.updated_at","typeLabel":"string\u003cdate-time>"},"external_id":{"oneOf":[{"type":"string","uniqueKey":"lead.external_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.external_id","typeLabel":"string | null"},"external_source":{"oneOf":[{"type":"string","uniqueKey":"lead.external_source.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.external_source.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.external_source","typeLabel":"string | null"},"status_label":{"oneOf":[{"description":"Label of the Contacts status.","type":"string","uniqueKey":"lead.status_label.oneOf.0","typeLabel":"string"},{"description":"Label of the Contacts status.","type":"null","uniqueKey":"lead.status_label.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.status_label","typeLabel":"string | null"},"status_sort_order":{"oneOf":[{"type":"integer","uniqueKey":"lead.status_sort_order.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"lead.status_sort_order.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.status_sort_order","typeLabel":"integer | null"},"is_conversion_stage":{"type":"boolean","uniqueKey":"lead.is_conversion_stage","typeLabel":"boolean"},"stage_timestamps":{"oneOf":[{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.stage_timestamps.oneOf.0.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.stage_timestamps.oneOf.0.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.stage_timestamps.oneOf.0.additionalProperties","typeLabel":"string | null"},"uniqueKey":"lead.stage_timestamps.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.stage_timestamps.oneOf.1.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.stage_timestamps.oneOf.1.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.stage_timestamps.oneOf.1.additionalProperties","typeLabel":"string | null"},"uniqueKey":"lead.stage_timestamps.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.stage_timestamps","typeLabel":"object | null"},"funnel_gap_summary":{"oneOf":[{"type":"object","additionalProperties":true,"uniqueKey":"lead.funnel_gap_summary.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"uniqueKey":"lead.funnel_gap_summary.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.funnel_gap_summary","typeLabel":"object | null"},"lead_type":{"oneOf":[{"description":"Lead type key. It tells how the contact came in. Null when unset.","type":"string","uniqueKey":"lead.lead_type.oneOf.0","typeLabel":"string"},{"description":"Lead type key. It tells how the contact came in. Null when unset.","type":"null","uniqueKey":"lead.lead_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.lead_type","typeLabel":"string | null"},"lead_type_label":{"oneOf":[{"description":"Current workspace label of lead_type. Null when lead_type is null.","type":"string","uniqueKey":"lead.lead_type_label.oneOf.0","typeLabel":"string"},{"description":"Current workspace label of lead_type. Null when lead_type is null.","type":"null","uniqueKey":"lead.lead_type_label.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.lead_type_label","typeLabel":"string | null"},"landing_url":{"oneOf":[{"description":"First page that the contact converted on, without the query string.","type":"string","uniqueKey":"lead.landing_url.oneOf.0","typeLabel":"string"},{"description":"First page that the contact converted on, without the query string.","type":"null","uniqueKey":"lead.landing_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.landing_url","typeLabel":"string | null"},"first_form_name":{"oneOf":[{"description":"Name of the first form that the contact sent.","type":"string","uniqueKey":"lead.first_form_name.oneOf.0","typeLabel":"string"},{"description":"Name of the first form that the contact sent.","type":"null","uniqueKey":"lead.first_form_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.first_form_name","typeLabel":"string | null"},"form_data":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.form_data.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.form_data.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.form_data.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.form_data.additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.3","typeLabel":"null"}],"uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string | number | boolean | null"},"uniqueKey":"lead.form_data.additionalProperties.oneOf.4","typeLabel":"(string | number | boolean | null)[]"}],"uniqueKey":"lead.form_data.additionalProperties","typeLabel":"string | number | boolean | null | (string | number | boolean | null)[]"},"uniqueKey":"lead.form_data","typeLabel":"object"},"custom_fields":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.3","typeLabel":"null"}],"uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string | number | boolean | null"},"uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4","typeLabel":"(string | number | boolean | null)[]"}],"uniqueKey":"lead.custom_fields.additionalProperties","typeLabel":"string | number | boolean | null | (string | number | boolean | null)[]"},"uniqueKey":"lead.custom_fields","typeLabel":"object"},"selected_material_id":{"oneOf":[{"type":"string","uniqueKey":"lead.selected_material_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.selected_material_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.selected_material_id","typeLabel":"string | null"},"selected_color_id":{"oneOf":[{"type":"string","uniqueKey":"lead.selected_color_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.selected_color_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.selected_color_id","typeLabel":"string | null"},"selected_shape_id":{"oneOf":[{"type":"string","uniqueKey":"lead.selected_shape_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.selected_shape_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.selected_shape_id","typeLabel":"string | null"},"notes":{"oneOf":[{"type":"string","uniqueKey":"lead.notes.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.notes","typeLabel":"string | null"},"quote_value":{"oneOf":[{"type":"number","uniqueKey":"lead.quote_value.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"lead.quote_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.quote_value","typeLabel":"number | null"},"sales_value":{"oneOf":[{"type":"number","uniqueKey":"lead.sales_value.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"lead.sales_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.sales_value","typeLabel":"number | null"},"follow_up_date":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"lead.follow_up_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"lead.follow_up_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.follow_up_date","typeLabel":"string\u003cdate-time> | null"},"converted_at":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"lead.converted_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"lead.converted_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.converted_at","typeLabel":"string\u003cdate-time> | null"}},"isRequired":true,"uniqueKey":"lead","typeLabel":"object"},"created":{"type":"boolean","isRequired":true,"uniqueKey":"created","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"lead":{"id":"\u003cstring>","contact_name":"\u003cstring>","contact_email":"jsmith@example.com","contact_phone":"\u003cstring>","property_address":"\u003cstring>","status":"\u003cstring>","status_stage_id":"\u003cstring>","attribution":{"source":"\u003cstring>","medium":"\u003cstring>","campaign":"\u003cstring>","content":"\u003cstring>","conversion_url":"\u003cstring>","entry":"button"},"communication_summary":{"last_call_at":"2023-11-07T05:31:56Z","last_sms_at":"2023-11-07T05:31:56Z","call_count":123,"answered_call_count":123,"missed_call_count":123,"sms_inbound_count":123,"sms_outbound_count":123,"last_tracking_number":{"label":"\u003cstring>","phone_last4":"\u003cstring>","national_format":"\u003cstring>"},"last_communication_source":"\u003cstring>","last_communication_campaign":"\u003cstring>"},"created_at":"2023-11-07T05:31:56Z","updated_at":"2023-11-07T05:31:56Z","external_id":"\u003cstring>","external_source":"\u003cstring>","status_label":"\u003cstring>","status_sort_order":123,"is_conversion_stage":true,"stage_timestamps":{},"funnel_gap_summary":{},"lead_type":"\u003cstring>","lead_type_label":"\u003cstring>","landing_url":"\u003cstring>","first_form_name":"\u003cstring>","form_data":{},"custom_fields":{},"selected_material_id":"\u003cstring>","selected_color_id":"\u003cstring>","selected_shape_id":"\u003cstring>","notes":"\u003cstring>","quote_value":123,"sales_value":123,"follow_up_date":"2023-11-07T05:31:56Z","converted_at":"2023-11-07T05:31:56Z"},"created":true}}},"exampleType":"generated"}},"exampleType":"generated"},"2b5ffdd8-815c-46f3-a0ec-770e2f29063d":{"description":"New lead created.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["lead","created"],"properties":{"lead":{"type":"object","additionalProperties":false,"required":["id","contact_name","contact_email","contact_phone","property_address","status","status_stage_id","attribution","communication_summary","created_at","updated_at"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"lead.id","typeLabel":"string"},"contact_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.contact_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.contact_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.contact_name","typeLabel":"string | null"},"contact_email":{"oneOf":[{"type":"string","format":"email","isRequired":true,"uniqueKey":"lead.contact_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","isRequired":true,"uniqueKey":"lead.contact_email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.contact_email","typeLabel":"string\u003cemail> | null"},"contact_phone":{"oneOf":[{"description":"Stored phone digits for the lead.","type":"string","isRequired":true,"uniqueKey":"lead.contact_phone.oneOf.0","typeLabel":"string"},{"description":"Stored phone digits for the lead.","type":"null","isRequired":true,"uniqueKey":"lead.contact_phone.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.contact_phone","typeLabel":"string | null"},"property_address":{"oneOf":[{"description":"Property address text for the lead.","type":"string","isRequired":true,"uniqueKey":"lead.property_address.oneOf.0","typeLabel":"string"},{"description":"Property address text for the lead.","type":"null","isRequired":true,"uniqueKey":"lead.property_address.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.property_address","typeLabel":"string | null"},"status":{"description":"Compatibility bucket of the Contacts status (not_set, pending, appointment_scheduled, sold, or lost). A workspace that imports its CRM keeps the deal Stage on Opportunities, and its leads can stay on not_set.","type":"string","isRequired":true,"uniqueKey":"lead.status","typeLabel":"string"},"status_stage_id":{"oneOf":[{"description":"Id of the Contacts status.","type":"string","isRequired":true,"uniqueKey":"lead.status_stage_id.oneOf.0","typeLabel":"string"},{"description":"Id of the Contacts status.","type":"null","isRequired":true,"uniqueKey":"lead.status_stage_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.status_stage_id","typeLabel":"string | null"},"attribution":{"type":"object","additionalProperties":false,"properties":{"source":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.source.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.source.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.source","typeLabel":"string | null"},"medium":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.medium.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.medium.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.medium","typeLabel":"string | null"},"campaign":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.campaign.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.campaign.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.campaign","typeLabel":"string | null"},"content":{"oneOf":[{"type":"string","uniqueKey":"lead.attribution.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.attribution.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.content","typeLabel":"string | null"},"conversion_url":{"oneOf":[{"type":"string","format":"uri","uniqueKey":"lead.attribution.conversion_url.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","uniqueKey":"lead.attribution.conversion_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.attribution.conversion_url","typeLabel":"string\u003curi> | null"},"entry":{"description":"Website entry for this touch. Omitted when unset. Does not replace source.","type":"string","enum":["button","embed","direct"],"uniqueKey":"lead.attribution.entry","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"lead.attribution","typeLabel":"object"},"communication_summary":{"type":"object","additionalProperties":false,"required":["last_call_at","last_sms_at","call_count","answered_call_count","missed_call_count","sms_inbound_count","sms_outbound_count","last_tracking_number","last_communication_source","last_communication_campaign"],"properties":{"last_call_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_call_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_call_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_call_at","typeLabel":"string\u003cdate-time> | null"},"last_sms_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_sms_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"lead.communication_summary.last_sms_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_sms_at","typeLabel":"string\u003cdate-time> | null"},"call_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.call_count","typeLabel":"integer"},"answered_call_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.answered_call_count","typeLabel":"integer"},"missed_call_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.missed_call_count","typeLabel":"integer"},"sms_inbound_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.sms_inbound_count","typeLabel":"integer"},"sms_outbound_count":{"type":"integer","isRequired":true,"uniqueKey":"lead.communication_summary.sms_outbound_count","typeLabel":"integer"},"last_tracking_number":{"oneOf":[{"type":"object","required":["label","phone_last4","national_format"],"properties":{"label":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.label.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.label.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.label","typeLabel":"string | null"},"phone_last4":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.phone_last4.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.phone_last4.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.phone_last4","typeLabel":"string | null"},"national_format":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.national_format.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.national_format.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0.national_format","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_tracking_number","typeLabel":"object | null"},"last_communication_source":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_source.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_source.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_source","typeLabel":"string | null"},"last_communication_campaign":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_campaign.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_campaign.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lead.communication_summary.last_communication_campaign","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"lead.communication_summary","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lead.updated_at","typeLabel":"string\u003cdate-time>"},"external_id":{"oneOf":[{"type":"string","uniqueKey":"lead.external_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.external_id","typeLabel":"string | null"},"external_source":{"oneOf":[{"type":"string","uniqueKey":"lead.external_source.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.external_source.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.external_source","typeLabel":"string | null"},"status_label":{"oneOf":[{"description":"Label of the Contacts status.","type":"string","uniqueKey":"lead.status_label.oneOf.0","typeLabel":"string"},{"description":"Label of the Contacts status.","type":"null","uniqueKey":"lead.status_label.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.status_label","typeLabel":"string | null"},"status_sort_order":{"oneOf":[{"type":"integer","uniqueKey":"lead.status_sort_order.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"lead.status_sort_order.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.status_sort_order","typeLabel":"integer | null"},"is_conversion_stage":{"type":"boolean","uniqueKey":"lead.is_conversion_stage","typeLabel":"boolean"},"stage_timestamps":{"oneOf":[{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.stage_timestamps.oneOf.0.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.stage_timestamps.oneOf.0.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.stage_timestamps.oneOf.0.additionalProperties","typeLabel":"string | null"},"uniqueKey":"lead.stage_timestamps.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.stage_timestamps.oneOf.1.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.stage_timestamps.oneOf.1.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.stage_timestamps.oneOf.1.additionalProperties","typeLabel":"string | null"},"uniqueKey":"lead.stage_timestamps.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.stage_timestamps","typeLabel":"object | null"},"funnel_gap_summary":{"oneOf":[{"type":"object","additionalProperties":true,"uniqueKey":"lead.funnel_gap_summary.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"uniqueKey":"lead.funnel_gap_summary.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.funnel_gap_summary","typeLabel":"object | null"},"lead_type":{"oneOf":[{"description":"Lead type key. It tells how the contact came in. Null when unset.","type":"string","uniqueKey":"lead.lead_type.oneOf.0","typeLabel":"string"},{"description":"Lead type key. It tells how the contact came in. Null when unset.","type":"null","uniqueKey":"lead.lead_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.lead_type","typeLabel":"string | null"},"lead_type_label":{"oneOf":[{"description":"Current workspace label of lead_type. Null when lead_type is null.","type":"string","uniqueKey":"lead.lead_type_label.oneOf.0","typeLabel":"string"},{"description":"Current workspace label of lead_type. Null when lead_type is null.","type":"null","uniqueKey":"lead.lead_type_label.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.lead_type_label","typeLabel":"string | null"},"landing_url":{"oneOf":[{"description":"First page that the contact converted on, without the query string.","type":"string","uniqueKey":"lead.landing_url.oneOf.0","typeLabel":"string"},{"description":"First page that the contact converted on, without the query string.","type":"null","uniqueKey":"lead.landing_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.landing_url","typeLabel":"string | null"},"first_form_name":{"oneOf":[{"description":"Name of the first form that the contact sent.","type":"string","uniqueKey":"lead.first_form_name.oneOf.0","typeLabel":"string"},{"description":"Name of the first form that the contact sent.","type":"null","uniqueKey":"lead.first_form_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.first_form_name","typeLabel":"string | null"},"form_data":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.form_data.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.form_data.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.form_data.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.form_data.additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX].oneOf.3","typeLabel":"null"}],"uniqueKey":"lead.form_data.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string | number | boolean | null"},"uniqueKey":"lead.form_data.additionalProperties.oneOf.4","typeLabel":"(string | number | boolean | null)[]"}],"uniqueKey":"lead.form_data.additionalProperties","typeLabel":"string | number | boolean | null | (string | number | boolean | null)[]"},"uniqueKey":"lead.form_data","typeLabel":"object"},"custom_fields":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX].oneOf.3","typeLabel":"null"}],"uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string | number | boolean | null"},"uniqueKey":"lead.custom_fields.additionalProperties.oneOf.4","typeLabel":"(string | number | boolean | null)[]"}],"uniqueKey":"lead.custom_fields.additionalProperties","typeLabel":"string | number | boolean | null | (string | number | boolean | null)[]"},"uniqueKey":"lead.custom_fields","typeLabel":"object"},"selected_material_id":{"oneOf":[{"type":"string","uniqueKey":"lead.selected_material_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.selected_material_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.selected_material_id","typeLabel":"string | null"},"selected_color_id":{"oneOf":[{"type":"string","uniqueKey":"lead.selected_color_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.selected_color_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.selected_color_id","typeLabel":"string | null"},"selected_shape_id":{"oneOf":[{"type":"string","uniqueKey":"lead.selected_shape_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.selected_shape_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.selected_shape_id","typeLabel":"string | null"},"notes":{"oneOf":[{"type":"string","uniqueKey":"lead.notes.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"lead.notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.notes","typeLabel":"string | null"},"quote_value":{"oneOf":[{"type":"number","uniqueKey":"lead.quote_value.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"lead.quote_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.quote_value","typeLabel":"number | null"},"sales_value":{"oneOf":[{"type":"number","uniqueKey":"lead.sales_value.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"lead.sales_value.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.sales_value","typeLabel":"number | null"},"follow_up_date":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"lead.follow_up_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"lead.follow_up_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.follow_up_date","typeLabel":"string\u003cdate-time> | null"},"converted_at":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"lead.converted_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"lead.converted_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"lead.converted_at","typeLabel":"string\u003cdate-time> | null"}},"isRequired":true,"uniqueKey":"lead","typeLabel":"object"},"created":{"type":"boolean","isRequired":true,"uniqueKey":"created","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"lead":{"id":"\u003cstring>","contact_name":"\u003cstring>","contact_email":"jsmith@example.com","contact_phone":"\u003cstring>","property_address":"\u003cstring>","status":"\u003cstring>","status_stage_id":"\u003cstring>","attribution":{"source":"\u003cstring>","medium":"\u003cstring>","campaign":"\u003cstring>","content":"\u003cstring>","conversion_url":"\u003cstring>","entry":"button"},"communication_summary":{"last_call_at":"2023-11-07T05:31:56Z","last_sms_at":"2023-11-07T05:31:56Z","call_count":123,"answered_call_count":123,"missed_call_count":123,"sms_inbound_count":123,"sms_outbound_count":123,"last_tracking_number":{"label":"\u003cstring>","phone_last4":"\u003cstring>","national_format":"\u003cstring>"},"last_communication_source":"\u003cstring>","last_communication_campaign":"\u003cstring>"},"created_at":"2023-11-07T05:31:56Z","updated_at":"2023-11-07T05:31:56Z","external_id":"\u003cstring>","external_source":"\u003cstring>","status_label":"\u003cstring>","status_sort_order":123,"is_conversion_stage":true,"stage_timestamps":{},"funnel_gap_summary":{},"lead_type":"\u003cstring>","lead_type_label":"\u003cstring>","landing_url":"\u003cstring>","first_form_name":"\u003cstring>","form_data":{},"custom_fields":{},"selected_material_id":"\u003cstring>","selected_color_id":"\u003cstring>","selected_shape_id":"\u003cstring>","notes":"\u003cstring>","quote_value":123,"sales_value":123,"follow_up_date":"2023-11-07T05:31:56Z","converted_at":"2023-11-07T05:31:56Z"},"created":true}}},"exampleType":"generated"}},"exampleType":"generated"},"5b9d8ecb-865d-454e-a1ac-ac051113d3fc":{"description":"Request payload, query, or required header is invalid.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","RATE_LIMITED","VALIDATION_ERROR","NOT_FOUND","CONFLICT","INSUFFICIENT_CREDITS","INTERNAL_ERROR"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","message":"\u003cstring>","request_id":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"3884cab5-241d-4a5b-8c4c-b7002151ba01":{"description":"Missing, malformed, revoked, deleted, or unknown API key.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","RATE_LIMITED","VALIDATION_ERROR","NOT_FOUND","CONFLICT","INSUFFICIENT_CREDITS","INTERNAL_ERROR"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","message":"\u003cstring>","request_id":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"c52b89a8-a77b-49fa-8eee-411119ef2f99":{"description":"The API key lacks a required scope, or the workspace is not active. A scope failure names a missing scope in `details.required_scope`. When the key lookup refuses the call, `details.missing_scopes` lists every required scope that the key does not hold.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","RATE_LIMITED","VALIDATION_ERROR","NOT_FOUND","CONFLICT","INSUFFICIENT_CREDITS","INTERNAL_ERROR"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missing_scope":{"title":"missing_scope","value":{"error":{"code":"FORBIDDEN","message":"API key does not include the required scope: leads.write.","request_id":"req_123","details":{"required_scope":"leads.write","missing_scopes":["leads.write"]}}}}},"exampleType":"examples"}},"exampleType":"examples"},"959b6a70-e639-4515-9c82-96168e45a43a":{"description":"Request conflicts with idempotency or external event identity.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","RATE_LIMITED","VALIDATION_ERROR","NOT_FOUND","CONFLICT","INSUFFICIENT_CREDITS","INTERNAL_ERROR"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","message":"\u003cstring>","request_id":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"8a693ef6-a55a-448f-ac54-f0d803ad5ff8":{"description":"Rate limit exceeded for this key and endpoint or invalid-auth bucket.","headers":{"X-RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"ISO timestamp when the current rate-limit window resets.","schema":{"type":"string","format":"date-time"}},"Retry-After":{"description":"Seconds until the caller should retry.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","RATE_LIMITED","VALIDATION_ERROR","NOT_FOUND","CONFLICT","INSUFFICIENT_CREDITS","INTERNAL_ERROR"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","message":"\u003cstring>","request_id":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"01f49a2c-c593-4131-ad92-c2902b5c1721":{"description":"Internal authentication or server error.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","RATE_LIMITED","VALIDATION_ERROR","NOT_FOUND","CONFLICT","INSUFFICIENT_CREDITS","INTERNAL_ERROR"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","message":"\u003cstring>","request_id":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"85fea81a-923e-4d80-a24b-4ae4963791cc":{"ApiKeyBearer":{"type":"http","scheme":"bearer","bearerFormat":"RoofKit API key","description":"Use `Authorization: Bearer rk_live_...`.","scopes":[],"schemeName":"ApiKeyBearer"}}},"servers":{"af90f5c1-c298-41db-b4de-b5f584b84f29":{"url":"https://api.roofkit.ai","description":"Canonical RoofKit Partner API origin"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"RoofKit API key","description":"Use `Authorization: Bearer rk_live_...`.","scopes":[],"schemeName":"ApiKeyBearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Use `Authorization: Bearer rk_live_...`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyBearer","name":"Authorization"}],"title":"ApiKeyBearer"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"roofkit","siteName":"RoofKit Docs","title":"Create or update lead - RoofKit Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/leads/create-or-update-lead","matchLevel":0},"es":{"href":"/es/api-reference/leads/create-or-update-lead","matchLevel":1}}},"lastModified":"2026-10-29T22:36:05.757Z","originalFileLocation":"api-reference/leads/create-or-update-lead.mdx","locale":"en"},"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=\"light\"}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 lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\">\u003cmeta data-mint-head name=\"application-name\" content=\"RoofKit Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create or update lead - RoofKit Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"RoofKit Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://roofkit.mintlify.app/_mintlify/api/og/v2?division=Leads\u0026amp;title=Create+or+update+lead\u0026amp;description=Creates+a+lead+or+updates+the+matching+active+lead.+external_id+plus+external_source+wins+when+provided%3B+otherwise+normalized+phone+dedupe+is+used+as+fallback.%0A\u0026amp;theme=b453b03470eec720e115f260\u0026amp;signature=c5746461c60ce077705ca4697ab750ae0e5a25777ec5bc1520942f666ad3e7f9\">\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 or update lead - RoofKit Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://roofkit.mintlify.app/_mintlify/api/og/v2?division=Leads\u0026amp;title=Create+or+update+lead\u0026amp;description=Creates+a+lead+or+updates+the+matching+active+lead.+external_id+plus+external_source+wins+when+provided%3B+otherwise+normalized+phone+dedupe+is+used+as+fallback.%0A\u0026amp;theme=b453b03470eec720e115f260\u0026amp;signature=c5746461c60ce077705ca4697ab750ae0e5a25777ec5bc1520942f666ad3e7f9\">\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=\"/mintlify-assets/_mintlify/favicons/roofkit/1k7U4tefrMIm-Blt/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"RoofKit Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#037ff7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/leads/create-or-update-lead.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.roofkit.ai/es/api-reference/leads/create-or-update-lead\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.roofkit.ai/#organization\",\"name\":\"RoofKit Docs\",\"url\":\"https://docs.roofkit.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/roofkit/TR022mpIPWwv8ies/logo/light.svg?fit=max\u0026auto=format\u0026n=TR022mpIPWwv8ies\u0026q=85\u0026s=ea7c8373b5ac8f54d47abdb424492281\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.roofkit.ai#website\",\"name\":\"RoofKit Docs\",\"url\":\"https://docs.roofkit.ai\",\"publisher\":{\"@id\":\"https://docs.roofkit.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead#webpage\",\"url\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead\",\"name\":\"Create or update lead\",\"description\":\"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\",\"dateModified\":\"2026-10-29T22:36:05.757Z\",\"isPartOf\":{\"@id\":\"https://docs.roofkit.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Leads\",\"item\":\"https://docs.roofkit.ai/api-reference/leads/list-leads\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create or update lead\",\"item\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead#apireference\",\"headline\":\"Create or update lead\",\"name\":\"Create or update lead\",\"description\":\"Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.\",\"url\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead\",\"mainEntityOfPage\":{\"@id\":\"https://docs.roofkit.ai/api-reference/leads/create-or-update-lead#webpage\"},\"dateModified\":\"2026-10-29T22:36:05.757Z\",\"publisher\":{\"@id\":\"https://docs.roofkit.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.roofkit.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"RoofKit Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"RoofKit Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"navbar":{"primary":{"type":"button","label":"Open RoofKit","href":"https://app.roofkit.ai"}},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Get started","pages":[{"title":"Partner API","href":"/api-reference/introduction"},{"title":"Roof report requests","href":"/api-reference/report-requests"}]},{"group":"Foundation","pages":[{"title":"Verify API key","deprecated":null,"version":null,"sidebarTitle":"Verify API key","openapi":"/api-reference/openapi.yaml get /api/v1/me","href":"/api-reference/foundation/verify-api-key"}]},{"group":"Leads","pages":[{"title":"List leads","description":"Lists active leads for incremental CRM sync. One page holds at most limit leads (up to 100) and reads at most 1,000 leads, or 250 when a conversion_type or communication_channel filter is set. A page can hold fewer leads than limit, or none, while has_more is true. Request again with next_cursor until has_more is false. Do not use the page size to decide that the list is finished. A limit above 100 is accepted, and the response holds the first page of 100.","deprecated":null,"version":null,"sidebarTitle":"List leads","openapi":"/api-reference/openapi.yaml get /api/v1/leads","href":"/api-reference/leads/list-leads"},{"title":"Create or update lead","deprecated":null,"version":null,"sidebarTitle":"Create or update lead","openapi":"/api-reference/openapi.yaml post /api/v1/leads","href":"/api-reference/leads/create-or-update-lead"},{"title":"Export leads","description":"Exports formula-safe CSV using the same filters as list leads. One response holds at most 500 leads, or 250 when a conversion_type or communication_channel filter is set. A response can hold fewer, or none, while more leads follow. When X-Export-Truncated is true, request again with the cursor from X-Export-Next-Cursor until it is false. Do not use the row count to decide that the export is finished. The export ignores limit, so a limit above 100 is accepted and the response holds the first page.","deprecated":null,"version":null,"sidebarTitle":"Export leads","openapi":"/api-reference/openapi.yaml get /api/v1/leads/export","href":"/api-reference/leads/export-leads"},{"title":"Get lead","deprecated":null,"version":null,"sidebarTitle":"Get lead","openapi":"/api-reference/openapi.yaml get /api/v1/leads/{lead_id}","href":"/api-reference/leads/get-lead"},{"title":"Patch lead","deprecated":null,"version":null,"sidebarTitle":"Patch lead","openapi":"/api-reference/openapi.yaml patch /api/v1/leads/{lead_id}","href":"/api-reference/leads/patch-lead"},{"title":"Delete lead","deprecated":null,"version":null,"sidebarTitle":"Delete lead","openapi":"/api-reference/openapi.yaml delete /api/v1/leads/{lead_id}","href":"/api-reference/leads/delete-lead"},{"title":"List lead conversions","deprecated":null,"version":null,"sidebarTitle":"List lead conversions","openapi":"/api-reference/openapi.yaml get /api/v1/leads/{lead_id}/conversions","href":"/api-reference/leads/list-lead-conversions"},{"title":"Create lead conversion","deprecated":null,"version":null,"sidebarTitle":"Create lead conversion","openapi":"/api-reference/openapi.yaml post /api/v1/leads/{lead_id}/conversions","href":"/api-reference/leads/create-lead-conversion"},{"title":"Get lead roof","deprecated":null,"version":null,"sidebarTitle":"Get lead roof","openapi":"/api-reference/openapi.yaml get /api/v1/leads/{lead_id}/roof","href":"/api-reference/leads/get-lead-roof"}]},{"group":"Reports","pages":[{"title":"List reports","deprecated":null,"version":null,"sidebarTitle":"List reports","openapi":"/api-reference/openapi.yaml get /api/v1/reports","href":"/api-reference/reports/list-reports"},{"title":"Import report","deprecated":null,"version":null,"sidebarTitle":"Import report","openapi":"/api-reference/openapi.yaml post /api/v1/reports/import","href":"/api-reference/reports/import-report"},{"title":"Get report","deprecated":null,"version":null,"sidebarTitle":"Get report","openapi":"/api-reference/openapi.yaml get /api/v1/reports/{report_id}","href":"/api-reference/reports/get-report"},{"title":"Export report","deprecated":null,"version":null,"sidebarTitle":"Export report","openapi":"/api-reference/openapi.yaml post /api/v1/reports/{report_id}/export","href":"/api-reference/reports/export-report"},{"title":"Get report export","deprecated":null,"version":null,"sidebarTitle":"Get report export","openapi":"/api-reference/openapi.yaml get /api/v1/reports/exports/{export_id}","href":"/api-reference/reports/get-report-export"},{"title":"Download report export","deprecated":null,"version":null,"sidebarTitle":"Download report export","openapi":"/api-reference/openapi.yaml get /api/v1/reports/exports/{export_id}/download","href":"/api-reference/reports/download-report-export"},{"title":"Create report request","deprecated":null,"version":null,"sidebarTitle":"Create report request","openapi":"/api-reference/openapi.yaml post /api/v1/report-requests","href":"/api-reference/reports/create-report-request"},{"title":"Get report request","deprecated":null,"version":null,"sidebarTitle":"Get report request","openapi":"/api-reference/openapi.yaml get /api/v1/report-requests/{request_id}","href":"/api-reference/reports/get-report-request"},{"title":"Download report request 3D model","deprecated":null,"version":null,"sidebarTitle":"Download report request 3D model","openapi":"/api-reference/openapi.yaml get /api/v1/report-requests/{request_id}/render-3d","href":"/api-reference/reports/download-report-request-3d-model"}]},{"group":"Visualizer","pages":[{"title":"Create visualization","deprecated":null,"version":null,"sidebarTitle":"Create visualization","openapi":"/api-reference/openapi.yaml post /api/v1/visualizations","href":"/api-reference/visualizer/create-visualization"},{"title":"Get visualization","deprecated":null,"version":null,"sidebarTitle":"Get visualization","openapi":"/api-reference/openapi.yaml get /api/v1/visualizations/{visualization_id}","href":"/api-reference/visualizer/get-visualization"},{"title":"Generate visualization","deprecated":null,"version":null,"sidebarTitle":"Generate visualization","openapi":"/api-reference/openapi.yaml post /api/v1/visualizations/{visualization_id}/generate","href":"/api-reference/visualizer/generate-visualization"},{"title":"List session visualizations","deprecated":null,"version":null,"sidebarTitle":"List session visualizations","openapi":"/api-reference/openapi.yaml get /api/v1/sessions/{session_id}/visualizations","href":"/api-reference/visualizer/list-session-visualizations"},{"title":"Create share link","deprecated":null,"version":null,"sidebarTitle":"Create share link","openapi":"/api-reference/openapi.yaml post /api/v1/share-links","href":"/api-reference/visualizer/create-share-link"},{"title":"Get share link","deprecated":null,"version":null,"sidebarTitle":"Get share link","openapi":"/api-reference/openapi.yaml get /api/v1/share-links/{token}","href":"/api-reference/visualizer/get-share-link"},{"title":"Create upload session","deprecated":null,"version":null,"sidebarTitle":"Create upload session","openapi":"/api-reference/openapi.yaml post /api/v1/upload-sessions","href":"/api-reference/visualizer/create-upload-session"},{"title":"Get upload session","deprecated":null,"version":null,"sidebarTitle":"Get upload session","openapi":"/api-reference/openapi.yaml get /api/v1/upload-sessions/{upload_session_id}","href":"/api-reference/visualizer/get-upload-session"},{"title":"Get visualization image","deprecated":null,"version":null,"sidebarTitle":"Get visualization image","openapi":"/api-reference/openapi.yaml get /api/v1/visualizations/{visualization_id}/image","href":"/api-reference/visualizer/get-visualization-image"}]},{"group":"Budget Estimates","pages":[{"title":"Create budget estimate","deprecated":null,"version":null,"sidebarTitle":"Create budget estimate","openapi":"/api-reference/openapi.yaml post /api/v1/budget-estimates","href":"/api-reference/estimates/create-budget-estimate"},{"title":"Get budget estimate","deprecated":null,"version":null,"sidebarTitle":"Get budget estimate","openapi":"/api-reference/openapi.yaml get /api/v1/budget-estimates/{estimate_id}","href":"/api-reference/estimates/get-budget-estimate"}]},{"group":"Attribution","pages":[{"title":"List lead sources","deprecated":null,"version":null,"sidebarTitle":"List lead sources","openapi":"/api-reference/openapi.yaml get /api/v1/lead-sources","href":"/api-reference/attribution/list-lead-sources"},{"title":"Get lead source","deprecated":null,"version":null,"sidebarTitle":"Get lead source","openapi":"/api-reference/openapi.yaml get /api/v1/lead-sources/{source_id}","href":"/api-reference/attribution/get-lead-source"},{"title":"List campaigns","deprecated":null,"version":null,"sidebarTitle":"List campaigns","openapi":"/api-reference/openapi.yaml get /api/v1/campaigns","href":"/api-reference/attribution/list-campaigns"},{"title":"Get campaign metrics","deprecated":null,"version":null,"sidebarTitle":"Get campaign metrics","openapi":"/api-reference/openapi.yaml get /api/v1/campaigns/{campaign}/metrics","href":"/api-reference/attribution/get-campaign-metrics"},{"title":"Track page view","deprecated":null,"version":null,"sidebarTitle":"Track page view","openapi":"/api-reference/openapi.yaml post /api/v1/events/page-view","href":"/api-reference/attribution/track-page-view"},{"title":"Track form submission","deprecated":null,"version":null,"sidebarTitle":"Track form submission","openapi":"/api-reference/openapi.yaml post /api/v1/events/form-submission","href":"/api-reference/attribution/track-form-submission"}]},{"group":"Pipeline","pages":[{"title":"List pipeline stages","deprecated":null,"version":null,"sidebarTitle":"List pipeline stages","openapi":"/api-reference/openapi.yaml get /api/v1/pipeline/stages","href":"/api-reference/pipeline/list-pipeline-stages"}]},{"group":"Data Objects","pages":[{"title":"List objects","deprecated":null,"version":null,"sidebarTitle":"List objects","openapi":"/api-reference/openapi.yaml get /api/v1/objects","href":"/api-reference/objects/list-objects"},{"title":"Create object","deprecated":null,"version":null,"sidebarTitle":"Create object","openapi":"/api-reference/openapi.yaml post /api/v1/objects","href":"/api-reference/objects/create-object"},{"title":"List trashed objects","deprecated":null,"version":null,"sidebarTitle":"List trashed objects","openapi":"/api-reference/openapi.yaml get /api/v1/objects/trashed","href":"/api-reference/objects/list-trashed-objects"},{"title":"Get object","deprecated":null,"version":null,"sidebarTitle":"Get object","openapi":"/api-reference/openapi.yaml get /api/v1/objects/{object_id}","href":"/api-reference/objects/get-object"},{"title":"Update object","deprecated":null,"version":null,"sidebarTitle":"Update object","openapi":"/api-reference/openapi.yaml patch /api/v1/objects/{object_id}","href":"/api-reference/objects/update-object"},{"title":"Get object schema","deprecated":null,"version":null,"sidebarTitle":"Get object schema","openapi":"/api-reference/openapi.yaml get /api/v1/objects/{object_id}/schema","href":"/api-reference/objects/get-object-schema"},{"title":"Save object schema","deprecated":null,"version":null,"sidebarTitle":"Save object schema","openapi":"/api-reference/openapi.yaml put /api/v1/objects/{object_id}/schema","href":"/api-reference/objects/save-object-schema"},{"title":"Archive object","deprecated":null,"version":null,"sidebarTitle":"Archive object","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/archive","href":"/api-reference/objects/archive-object"},{"title":"Restore object","deprecated":null,"version":null,"sidebarTitle":"Restore object","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/restore","href":"/api-reference/objects/restore-object"},{"title":"List object records","deprecated":null,"version":null,"sidebarTitle":"List object records","openapi":"/api-reference/openapi.yaml get /api/v1/objects/{object_id}/records","href":"/api-reference/objects/list-object-records"},{"title":"Create object record","deprecated":null,"version":null,"sidebarTitle":"Create object record","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/records","href":"/api-reference/objects/create-object-record"},{"title":"Get object record","deprecated":null,"version":null,"sidebarTitle":"Get object record","openapi":"/api-reference/openapi.yaml get /api/v1/objects/{object_id}/records/{record_id}","href":"/api-reference/objects/get-object-record"},{"title":"Patch object record","deprecated":null,"version":null,"sidebarTitle":"Patch object record","openapi":"/api-reference/openapi.yaml patch /api/v1/objects/{object_id}/records/{record_id}","href":"/api-reference/objects/patch-object-record"},{"title":"Archive object record","deprecated":null,"version":null,"sidebarTitle":"Archive object record","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/records/{record_id}/archive","href":"/api-reference/objects/archive-object-record"},{"title":"Restore object record","deprecated":null,"version":null,"sidebarTitle":"Restore object record","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/records/{record_id}/restore","href":"/api-reference/objects/restore-object-record"},{"title":"List inbound relationships","deprecated":null,"version":null,"sidebarTitle":"List inbound relationships","openapi":"/api-reference/openapi.yaml get /api/v1/objects/{object_id}/records/{record_id}/relationships","href":"/api-reference/objects/list-inbound-relationships"},{"title":"Link object records","deprecated":null,"version":null,"sidebarTitle":"Link object records","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/records/{record_id}/relationships","href":"/api-reference/objects/link-object-records"},{"title":"Search relation targets","deprecated":null,"version":null,"sidebarTitle":"Search relation targets","openapi":"/api-reference/openapi.yaml get /api/v1/objects/{object_id}/relation-targets","href":"/api-reference/objects/search-relation-targets"},{"title":"Export object records","deprecated":null,"version":null,"sidebarTitle":"Export object records","openapi":"/api-reference/openapi.yaml get /api/v1/objects/{object_id}/export","href":"/api-reference/objects/export-object-records"},{"title":"Import object records","deprecated":null,"version":null,"sidebarTitle":"Import object records","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/import","href":"/api-reference/objects/import-object-records"},{"title":"Save object view","deprecated":null,"version":null,"sidebarTitle":"Save object view","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/views","href":"/api-reference/objects/save-object-view"},{"title":"Archive object view","deprecated":null,"version":null,"sidebarTitle":"Archive object view","openapi":"/api-reference/openapi.yaml post /api/v1/objects/{object_id}/views/{view_id}/archive","href":"/api-reference/objects/archive-object-view"},{"title":"Unlink object records","deprecated":null,"version":null,"sidebarTitle":"Unlink object records","openapi":"/api-reference/openapi.yaml delete /api/v1/relationships/{relationship_id}","href":"/api-reference/objects/unlink-object-records"}]}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp-server"}]}]},{"language":"es","navbar":{"primary":{"type":"button","label":"Abrir RoofKit","href":"https://app.roofkit.ai"}},"pages":[{"title":"es","href":"/es/api-reference/leads/create-or-update-lead"}]}]},"basePath":"","title":"Create or update lead - RoofKit Docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}