Reference
Leads
GET/api/v1/leadsList leads
Lists inquiries (leads), newest first, 50 per page, with who they are from, their channel and their derived status. person and company are the adopted person and their company (null before adoption); company_name is that company's name, else the company as typed (company_as_typed). Use get_lead for one inquiry's answers, result and quotes.scope leads:read
Query
| status | one of new, in_progress, quoted, won, lost, discarded, open, active[]Derived statuses to include; open = new and in_progress, active = in_progress. Default: all. |
| channel | one of assistant, contact_form, configurator, tool, download, manual[]How the inquiry arrived. Default: all. |
| source | one of assistant, contact, manual[]Deprecated, use channel: assistant, contact (= contact_form) or manual. |
| query | stringWords to find in the contact, the company, the message, the summary, the answers or a quote. |
| profile | string[]Assistant or configurator profile ids (profile_id of an inquiry); only inquiries captured by one of them. Default: all. |
| page | integer1-based page of 50 rows. Omit for the first page. |
Response 200
| items[] | object[] |
| items[].id | string |
| items[].created_at | string |
| items[].channel | one of assistant, contact_form, configurator, tool, download, manual |
| items[].source | string |
| items[].profile_id | string | null |
| items[].status | one of new, in_progress, quoted, won, lost, discarded |
| items[].stored_status | one of new, in_progress, quoted, discarded |
| items[].person | object | null |
| items[].person.id | string |
| items[].person.name | string |
| items[].person.email | string | null |
| items[].person.phone | string | null |
| items[].company | object | null |
| items[].company.id | string |
| items[].company.name | string |
| items[].company_name | string | null |
| items[].company_as_typed | string | null |
| items[].name | string | null |
| items[].email | string | null |
| items[].phone | string | null |
| items[].short | string | null |
| items[].quotes | integer |
| items[].url | string |
| page | integer |
| total | integer |
| has_more | boolean |
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"channel": {
"type": "string",
"enum": [
"assistant",
"contact_form",
"configurator",
"tool",
"download",
"manual"
]
},
"source": {
"type": "string"
},
"profile_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"won",
"lost",
"discarded"
]
},
"stored_status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"discarded"
]
},
"person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email",
"phone"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"company_name": {
"type": [
"string",
"null"
]
},
"company_as_typed": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"short": {
"type": [
"string",
"null"
]
},
"quotes": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"url": {
"type": "string"
}
},
"required": [
"id",
"created_at",
"channel",
"source",
"profile_id",
"status",
"stored_status",
"person",
"company",
"company_name",
"company_as_typed",
"name",
"email",
"phone",
"short",
"quotes",
"url"
],
"additionalProperties": false
}
},
"page": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"has_more": {
"type": "boolean"
}
},
"required": [
"items",
"page",
"total",
"has_more"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/leadsCreate lead
Records an inquiry by hand (channel manual). Name an existing person (person): the inquiry is adopted at once. Or give a name: it is kept as the contact typed, without a person -- known_person in the answer names the person that e-mail already belongs to; update_lead with adopt links or creates the person. The company as typed is kept as text.scope leads:write
Body (JSON)
| person | stringAn existing person's id, from search_people. |
| name | stringWho the inquiry is from, when there is no person. |
| string | |
| phone | string |
| company | stringThe company as the contact named it. |
| message | stringWhat they asked for. |
Response 200
| id | string |
| created_at | string |
| channel | one of assistant, contact_form, configurator, tool, download, manual |
| source | string |
| profile_id | string | null |
| profile | object | null |
| profile.id | string |
| profile.name | string |
| profile.version | integer | null |
| configurator_profile | object | null |
| configurator_profile.id | string |
| configurator_profile.name | string |
| configurator_profile.version | integer | null |
| configurator_selection | object | null |
| configurator_selection.profile_version | integer | null |
| configurator_selection.term | one of monthly, annual |
| configurator_selection.needs | string[] |
| configurator_selection.lines[] | object[] |
| configurator_selection.lines[].item_key | string |
| configurator_selection.lines[].name | string |
| configurator_selection.lines[].quantity | number |
| configurator_selection.lines[].per_user | boolean |
| configurator_selection.lines[].suggested | boolean |
| configurator_selection.lines[].unit_monthly_cents | integer |
| configurator_selection.lines[].unit_one_time_cents | integer |
| configurator_selection.monthly_net_cents | integer |
| configurator_selection.one_time_net_cents | integer |
| configurator_selection.prices_shown | boolean |
| configurator_selection.at | string |
| status | one of new, in_progress, quoted, won, lost, discarded |
| stored_status | one of new, in_progress, quoted, discarded |
| outcome | one of won, lost | null |
| contact | object |
| contact.name | string |
| contact.company | string | null |
| contact.email | string | null |
| contact.phone | string | null |
| contact.preferred_contact | string | null |
| contact.callback_requested | boolean |
| contact.appointment_requested | boolean |
| contact.privacy_accepted | boolean |
| contact.whatsapp_opt_in | boolean |
| contact.consent_at | string | null |
| contact.consent_text_version | string | null |
| person | object | null |
| person.id | string |
| person.name | string |
| person.email | string | null |
| person.phone | string | null |
| company | object | null |
| company.id | string |
| company.name | string |
| known_person | object | null |
| known_person.id | string |
| known_person.name | string |
| known_person.company_name | string | null |
| name | string | null |
| string | null | |
| phone | string | null |
| company_as_typed | string | null |
| preferred_contact | string | null |
| callback_requested | boolean |
| appointment_requested | boolean |
| answers[] | object[] |
| answers[].key | string |
| answers[].label | string |
| answers[].value | string |
| summary | string | null |
| result | object | null |
| result.kind | one of recommendation, summary |
| result.title | string | null |
| result.text | string |
| result.steps | string[] |
| conversation_messages | integer |
| message | string | null |
| use_case | object | null |
| use_case.title | string |
| use_case.description | string | null |
| use_case.steps | string[] |
| use_case.systems | string[] |
| use_case.fit | string | null |
| use_case.fit_note | string | null |
| discard_reason | string | null |
| discarded_at | string | null |
| adopted_at | string | null |
| adopted_by | string | null |
| quotes[] | object[] |
| quotes[].id | string |
| quotes[].number | string |
| quotes[].version | integer | null |
| quotes[].title | string |
| quotes[].status | string |
| quotes[].one_off_net_cents | integer |
| quotes[].monthly_net_cents | integer |
| notes[] | object[] |
| notes[].id | string |
| notes[].author | string |
| notes[].agentoptional | string |
| notes[].created_at | string |
| notes[].body | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"channel": {
"type": "string",
"enum": [
"assistant",
"contact_form",
"configurator",
"tool",
"download",
"manual"
]
},
"source": {
"type": "string"
},
"profile_id": {
"type": [
"string",
"null"
]
},
"profile": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"version"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"configurator_profile": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"version"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"configurator_selection": {
"anyOf": [
{
"type": "object",
"properties": {
"profile_version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"term": {
"type": "string",
"enum": [
"monthly",
"annual"
]
},
"needs": {
"type": "array",
"items": {
"type": "string"
}
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"item_key": {
"type": "string"
},
"name": {
"type": "string"
},
"quantity": {
"type": "number"
},
"per_user": {
"type": "boolean"
},
"suggested": {
"type": "boolean"
},
"unit_monthly_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"unit_one_time_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"item_key",
"name",
"quantity",
"per_user",
"suggested",
"unit_monthly_cents",
"unit_one_time_cents"
],
"additionalProperties": false
}
},
"monthly_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"one_time_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"prices_shown": {
"type": "boolean"
},
"at": {
"type": "string"
}
},
"required": [
"profile_version",
"term",
"needs",
"lines",
"monthly_net_cents",
"one_time_net_cents",
"prices_shown",
"at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"won",
"lost",
"discarded"
]
},
"stored_status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"discarded"
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"enum": [
"won",
"lost"
]
},
{
"type": "null"
}
]
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"company": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"preferred_contact": {
"type": [
"string",
"null"
]
},
"callback_requested": {
"type": "boolean"
},
"appointment_requested": {
"type": "boolean"
},
"privacy_accepted": {
"type": "boolean"
},
"whatsapp_opt_in": {
"type": "boolean"
},
"consent_at": {
"type": [
"string",
"null"
]
},
"consent_text_version": {
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"company",
"email",
"phone",
"preferred_contact",
"callback_requested",
"appointment_requested",
"privacy_accepted",
"whatsapp_opt_in",
"consent_at",
"consent_text_version"
],
"additionalProperties": false
},
"person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email",
"phone"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"known_person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"company_name": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"company_name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"name": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"company_as_typed": {
"type": [
"string",
"null"
]
},
"preferred_contact": {
"type": [
"string",
"null"
]
},
"callback_requested": {
"type": "boolean"
},
"appointment_requested": {
"type": "boolean"
},
"answers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"label",
"value"
],
"additionalProperties": false
}
},
"summary": {
"type": [
"string",
"null"
]
},
"result": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"recommendation",
"summary"
]
},
"title": {
"type": [
"string",
"null"
]
},
"text": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"kind",
"title",
"text",
"steps"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"conversation_messages": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"message": {
"type": [
"string",
"null"
]
},
"use_case": {
"anyOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"steps": {
"type": "array",
"items": {
"type": "string"
}
},
"systems": {
"type": "array",
"items": {
"type": "string"
}
},
"fit": {
"type": [
"string",
"null"
]
},
"fit_note": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"description",
"steps",
"systems",
"fit",
"fit_note"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"discard_reason": {
"type": [
"string",
"null"
]
},
"discarded_at": {
"type": [
"string",
"null"
]
},
"adopted_at": {
"type": [
"string",
"null"
]
},
"adopted_by": {
"type": [
"string",
"null"
]
},
"quotes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"one_off_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthly_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"number",
"version",
"title",
"status",
"one_off_net_cents",
"monthly_net_cents"
],
"additionalProperties": false
}
},
"notes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"author": {
"type": "string"
},
"agent": {
"type": "string"
},
"created_at": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"author",
"created_at",
"body"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"created_at",
"channel",
"source",
"profile_id",
"profile",
"configurator_profile",
"configurator_selection",
"status",
"stored_status",
"outcome",
"contact",
"person",
"company",
"known_person",
"name",
"email",
"phone",
"company_as_typed",
"preferred_contact",
"callback_requested",
"appointment_requested",
"answers",
"summary",
"result",
"conversation_messages",
"message",
"use_case",
"discard_reason",
"discarded_at",
"adopted_at",
"adopted_by",
"quotes",
"notes",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/leads/{id}Get lead
One inquiry (lead): configurator_selection holds what a configurator visitor chose (lines, needs, term, sums in net cents as they saw them); the contact as typed (contact) and, once adopted, the person and company; known_person is the person its e-mail already belongs to before adoption; the questions as answered (answers), summary and result; its quotes (create_quote with lead answers it) and notes. status is derived (quotes decide won/lost), stored_status is what was set. use_case is the old shape, kept for compatibility -- read answers instead.scope leads:read
Path
| idrequired | stringThe inquiry's (lead's) id. |
Response 200
| id | string |
| created_at | string |
| channel | one of assistant, contact_form, configurator, tool, download, manual |
| source | string |
| profile_id | string | null |
| profile | object | null |
| profile.id | string |
| profile.name | string |
| profile.version | integer | null |
| configurator_profile | object | null |
| configurator_profile.id | string |
| configurator_profile.name | string |
| configurator_profile.version | integer | null |
| configurator_selection | object | null |
| configurator_selection.profile_version | integer | null |
| configurator_selection.term | one of monthly, annual |
| configurator_selection.needs | string[] |
| configurator_selection.lines[] | object[] |
| configurator_selection.lines[].item_key | string |
| configurator_selection.lines[].name | string |
| configurator_selection.lines[].quantity | number |
| configurator_selection.lines[].per_user | boolean |
| configurator_selection.lines[].suggested | boolean |
| configurator_selection.lines[].unit_monthly_cents | integer |
| configurator_selection.lines[].unit_one_time_cents | integer |
| configurator_selection.monthly_net_cents | integer |
| configurator_selection.one_time_net_cents | integer |
| configurator_selection.prices_shown | boolean |
| configurator_selection.at | string |
| status | one of new, in_progress, quoted, won, lost, discarded |
| stored_status | one of new, in_progress, quoted, discarded |
| outcome | one of won, lost | null |
| contact | object |
| contact.name | string |
| contact.company | string | null |
| contact.email | string | null |
| contact.phone | string | null |
| contact.preferred_contact | string | null |
| contact.callback_requested | boolean |
| contact.appointment_requested | boolean |
| contact.privacy_accepted | boolean |
| contact.whatsapp_opt_in | boolean |
| contact.consent_at | string | null |
| contact.consent_text_version | string | null |
| person | object | null |
| person.id | string |
| person.name | string |
| person.email | string | null |
| person.phone | string | null |
| company | object | null |
| company.id | string |
| company.name | string |
| known_person | object | null |
| known_person.id | string |
| known_person.name | string |
| known_person.company_name | string | null |
| name | string | null |
| string | null | |
| phone | string | null |
| company_as_typed | string | null |
| preferred_contact | string | null |
| callback_requested | boolean |
| appointment_requested | boolean |
| answers[] | object[] |
| answers[].key | string |
| answers[].label | string |
| answers[].value | string |
| summary | string | null |
| result | object | null |
| result.kind | one of recommendation, summary |
| result.title | string | null |
| result.text | string |
| result.steps | string[] |
| conversation_messages | integer |
| message | string | null |
| use_case | object | null |
| use_case.title | string |
| use_case.description | string | null |
| use_case.steps | string[] |
| use_case.systems | string[] |
| use_case.fit | string | null |
| use_case.fit_note | string | null |
| discard_reason | string | null |
| discarded_at | string | null |
| adopted_at | string | null |
| adopted_by | string | null |
| quotes[] | object[] |
| quotes[].id | string |
| quotes[].number | string |
| quotes[].version | integer | null |
| quotes[].title | string |
| quotes[].status | string |
| quotes[].one_off_net_cents | integer |
| quotes[].monthly_net_cents | integer |
| notes[] | object[] |
| notes[].id | string |
| notes[].author | string |
| notes[].agentoptional | string |
| notes[].created_at | string |
| notes[].body | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"channel": {
"type": "string",
"enum": [
"assistant",
"contact_form",
"configurator",
"tool",
"download",
"manual"
]
},
"source": {
"type": "string"
},
"profile_id": {
"type": [
"string",
"null"
]
},
"profile": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"version"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"configurator_profile": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"version"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"configurator_selection": {
"anyOf": [
{
"type": "object",
"properties": {
"profile_version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"term": {
"type": "string",
"enum": [
"monthly",
"annual"
]
},
"needs": {
"type": "array",
"items": {
"type": "string"
}
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"item_key": {
"type": "string"
},
"name": {
"type": "string"
},
"quantity": {
"type": "number"
},
"per_user": {
"type": "boolean"
},
"suggested": {
"type": "boolean"
},
"unit_monthly_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"unit_one_time_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"item_key",
"name",
"quantity",
"per_user",
"suggested",
"unit_monthly_cents",
"unit_one_time_cents"
],
"additionalProperties": false
}
},
"monthly_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"one_time_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"prices_shown": {
"type": "boolean"
},
"at": {
"type": "string"
}
},
"required": [
"profile_version",
"term",
"needs",
"lines",
"monthly_net_cents",
"one_time_net_cents",
"prices_shown",
"at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"won",
"lost",
"discarded"
]
},
"stored_status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"discarded"
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"enum": [
"won",
"lost"
]
},
{
"type": "null"
}
]
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"company": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"preferred_contact": {
"type": [
"string",
"null"
]
},
"callback_requested": {
"type": "boolean"
},
"appointment_requested": {
"type": "boolean"
},
"privacy_accepted": {
"type": "boolean"
},
"whatsapp_opt_in": {
"type": "boolean"
},
"consent_at": {
"type": [
"string",
"null"
]
},
"consent_text_version": {
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"company",
"email",
"phone",
"preferred_contact",
"callback_requested",
"appointment_requested",
"privacy_accepted",
"whatsapp_opt_in",
"consent_at",
"consent_text_version"
],
"additionalProperties": false
},
"person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email",
"phone"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"known_person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"company_name": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"company_name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"name": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"company_as_typed": {
"type": [
"string",
"null"
]
},
"preferred_contact": {
"type": [
"string",
"null"
]
},
"callback_requested": {
"type": "boolean"
},
"appointment_requested": {
"type": "boolean"
},
"answers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"label",
"value"
],
"additionalProperties": false
}
},
"summary": {
"type": [
"string",
"null"
]
},
"result": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"recommendation",
"summary"
]
},
"title": {
"type": [
"string",
"null"
]
},
"text": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"kind",
"title",
"text",
"steps"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"conversation_messages": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"message": {
"type": [
"string",
"null"
]
},
"use_case": {
"anyOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"steps": {
"type": "array",
"items": {
"type": "string"
}
},
"systems": {
"type": "array",
"items": {
"type": "string"
}
},
"fit": {
"type": [
"string",
"null"
]
},
"fit_note": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"description",
"steps",
"systems",
"fit",
"fit_note"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"discard_reason": {
"type": [
"string",
"null"
]
},
"discarded_at": {
"type": [
"string",
"null"
]
},
"adopted_at": {
"type": [
"string",
"null"
]
},
"adopted_by": {
"type": [
"string",
"null"
]
},
"quotes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"one_off_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthly_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"number",
"version",
"title",
"status",
"one_off_net_cents",
"monthly_net_cents"
],
"additionalProperties": false
}
},
"notes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"author": {
"type": "string"
},
"agent": {
"type": "string"
},
"created_at": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"author",
"created_at",
"body"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"created_at",
"channel",
"source",
"profile_id",
"profile",
"configurator_profile",
"configurator_selection",
"status",
"stored_status",
"outcome",
"contact",
"person",
"company",
"known_person",
"name",
"email",
"phone",
"company_as_typed",
"preferred_contact",
"callback_requested",
"appointment_requested",
"answers",
"summary",
"result",
"conversation_messages",
"message",
"use_case",
"discard_reason",
"discarded_at",
"adopted_at",
"adopted_by",
"quotes",
"notes",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/leads/{id}Update lead
Changes an inquiry, in this order: adopt (links the person its e-mail belongs to, or creates one from the contact typed; company or new_company_name puts that person at a company when they have none), status (new or in_progress -- on a discarded inquiry they reopen it; discarded with an optional discard_reason), outcome (won or lost by hand, none clears it; only without quotes), and -- without adopt -- company or new_company_name, written to the adopted person so their next inquiry arrives knowing it. Old status values are still accepted: active means in_progress; won and lost set the outcome, which is refused once the inquiry has quotes — their status decides. quoted is set by create_quote. new on an adopted inquiry is stored as in_progress. When a status was stored differently from how it was given, the reply carries a note saying so.scope leads:write
Path
| idrequired | stringThe inquiry's (lead's) id. |
Body (JSON)
| status | one of new, in_progress, discarded, active, won, lost |
| adopt | booleantrue adopts the inquiry („Übernehmen“). |
| company | stringAn existing company's id, from search_companies. |
| new_company_name | stringCreates this company and puts the person there. |
| discard_reason | stringWhy, with status discarded. |
| outcome | one of won, lost, noneA manual won/lost for an inquiry without quotes; none clears it. |
Response 200
| id | string |
| created_at | string |
| channel | one of assistant, contact_form, configurator, tool, download, manual |
| source | string |
| profile_id | string | null |
| profile | object | null |
| profile.id | string |
| profile.name | string |
| profile.version | integer | null |
| configurator_profile | object | null |
| configurator_profile.id | string |
| configurator_profile.name | string |
| configurator_profile.version | integer | null |
| configurator_selection | object | null |
| configurator_selection.profile_version | integer | null |
| configurator_selection.term | one of monthly, annual |
| configurator_selection.needs | string[] |
| configurator_selection.lines[] | object[] |
| configurator_selection.lines[].item_key | string |
| configurator_selection.lines[].name | string |
| configurator_selection.lines[].quantity | number |
| configurator_selection.lines[].per_user | boolean |
| configurator_selection.lines[].suggested | boolean |
| configurator_selection.lines[].unit_monthly_cents | integer |
| configurator_selection.lines[].unit_one_time_cents | integer |
| configurator_selection.monthly_net_cents | integer |
| configurator_selection.one_time_net_cents | integer |
| configurator_selection.prices_shown | boolean |
| configurator_selection.at | string |
| status | one of new, in_progress, quoted, won, lost, discarded |
| stored_status | one of new, in_progress, quoted, discarded |
| outcome | one of won, lost | null |
| contact | object |
| contact.name | string |
| contact.company | string | null |
| contact.email | string | null |
| contact.phone | string | null |
| contact.preferred_contact | string | null |
| contact.callback_requested | boolean |
| contact.appointment_requested | boolean |
| contact.privacy_accepted | boolean |
| contact.whatsapp_opt_in | boolean |
| contact.consent_at | string | null |
| contact.consent_text_version | string | null |
| person | object | null |
| person.id | string |
| person.name | string |
| person.email | string | null |
| person.phone | string | null |
| company | object | null |
| company.id | string |
| company.name | string |
| known_person | object | null |
| known_person.id | string |
| known_person.name | string |
| known_person.company_name | string | null |
| name | string | null |
| string | null | |
| phone | string | null |
| company_as_typed | string | null |
| preferred_contact | string | null |
| callback_requested | boolean |
| appointment_requested | boolean |
| answers[] | object[] |
| answers[].key | string |
| answers[].label | string |
| answers[].value | string |
| summary | string | null |
| result | object | null |
| result.kind | one of recommendation, summary |
| result.title | string | null |
| result.text | string |
| result.steps | string[] |
| conversation_messages | integer |
| message | string | null |
| use_case | object | null |
| use_case.title | string |
| use_case.description | string | null |
| use_case.steps | string[] |
| use_case.systems | string[] |
| use_case.fit | string | null |
| use_case.fit_note | string | null |
| discard_reason | string | null |
| discarded_at | string | null |
| adopted_at | string | null |
| adopted_by | string | null |
| quotes[] | object[] |
| quotes[].id | string |
| quotes[].number | string |
| quotes[].version | integer | null |
| quotes[].title | string |
| quotes[].status | string |
| quotes[].one_off_net_cents | integer |
| quotes[].monthly_net_cents | integer |
| notes[] | object[] |
| notes[].id | string |
| notes[].author | string |
| notes[].agentoptional | string |
| notes[].created_at | string |
| notes[].body | string |
| url | string |
| noteoptional | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"channel": {
"type": "string",
"enum": [
"assistant",
"contact_form",
"configurator",
"tool",
"download",
"manual"
]
},
"source": {
"type": "string"
},
"profile_id": {
"type": [
"string",
"null"
]
},
"profile": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"version"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"configurator_profile": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"version"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"configurator_selection": {
"anyOf": [
{
"type": "object",
"properties": {
"profile_version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"term": {
"type": "string",
"enum": [
"monthly",
"annual"
]
},
"needs": {
"type": "array",
"items": {
"type": "string"
}
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"item_key": {
"type": "string"
},
"name": {
"type": "string"
},
"quantity": {
"type": "number"
},
"per_user": {
"type": "boolean"
},
"suggested": {
"type": "boolean"
},
"unit_monthly_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"unit_one_time_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"item_key",
"name",
"quantity",
"per_user",
"suggested",
"unit_monthly_cents",
"unit_one_time_cents"
],
"additionalProperties": false
}
},
"monthly_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"one_time_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"prices_shown": {
"type": "boolean"
},
"at": {
"type": "string"
}
},
"required": [
"profile_version",
"term",
"needs",
"lines",
"monthly_net_cents",
"one_time_net_cents",
"prices_shown",
"at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"won",
"lost",
"discarded"
]
},
"stored_status": {
"type": "string",
"enum": [
"new",
"in_progress",
"quoted",
"discarded"
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"enum": [
"won",
"lost"
]
},
{
"type": "null"
}
]
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"company": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"preferred_contact": {
"type": [
"string",
"null"
]
},
"callback_requested": {
"type": "boolean"
},
"appointment_requested": {
"type": "boolean"
},
"privacy_accepted": {
"type": "boolean"
},
"whatsapp_opt_in": {
"type": "boolean"
},
"consent_at": {
"type": [
"string",
"null"
]
},
"consent_text_version": {
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"company",
"email",
"phone",
"preferred_contact",
"callback_requested",
"appointment_requested",
"privacy_accepted",
"whatsapp_opt_in",
"consent_at",
"consent_text_version"
],
"additionalProperties": false
},
"person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email",
"phone"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"company": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"known_person": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"company_name": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"company_name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"name": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"company_as_typed": {
"type": [
"string",
"null"
]
},
"preferred_contact": {
"type": [
"string",
"null"
]
},
"callback_requested": {
"type": "boolean"
},
"appointment_requested": {
"type": "boolean"
},
"answers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"label",
"value"
],
"additionalProperties": false
}
},
"summary": {
"type": [
"string",
"null"
]
},
"result": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"recommendation",
"summary"
]
},
"title": {
"type": [
"string",
"null"
]
},
"text": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"kind",
"title",
"text",
"steps"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"conversation_messages": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"message": {
"type": [
"string",
"null"
]
},
"use_case": {
"anyOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"steps": {
"type": "array",
"items": {
"type": "string"
}
},
"systems": {
"type": "array",
"items": {
"type": "string"
}
},
"fit": {
"type": [
"string",
"null"
]
},
"fit_note": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"description",
"steps",
"systems",
"fit",
"fit_note"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"discard_reason": {
"type": [
"string",
"null"
]
},
"discarded_at": {
"type": [
"string",
"null"
]
},
"adopted_at": {
"type": [
"string",
"null"
]
},
"adopted_by": {
"type": [
"string",
"null"
]
},
"quotes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"one_off_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthly_net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"number",
"version",
"title",
"status",
"one_off_net_cents",
"monthly_net_cents"
],
"additionalProperties": false
}
},
"notes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"author": {
"type": "string"
},
"agent": {
"type": "string"
},
"created_at": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"author",
"created_at",
"body"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
},
"note": {
"type": "string"
}
},
"required": [
"id",
"created_at",
"channel",
"source",
"profile_id",
"profile",
"configurator_profile",
"configurator_selection",
"status",
"stored_status",
"outcome",
"contact",
"person",
"company",
"known_person",
"name",
"email",
"phone",
"company_as_typed",
"preferred_contact",
"callback_requested",
"appointment_requested",
"answers",
"summary",
"result",
"conversation_messages",
"message",
"use_case",
"discard_reason",
"discarded_at",
"adopted_at",
"adopted_by",
"quotes",
"notes",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.