Zum Inhalt

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

statusone of new, in_progress, quoted, won, lost, discarded, open, active[]Derived statuses to include; open = new and in_progress, active = in_progress. Default: all.
channelone of assistant, contact_form, configurator, tool, download, manual[]How the inquiry arrived. Default: all.
sourceone of assistant, contact, manual[]Deprecated, use channel: assistant, contact (= contact_form) or manual.
querystringWords to find in the contact, the company, the message, the summary, the answers or a quote.
profilestring[]Assistant or configurator profile ids (profile_id of an inquiry); only inquiries captured by one of them. Default: all.
pageinteger1-based page of 50 rows. Omit for the first page.

Response 200

items[]object[]
items[].idstring
items[].created_atstring
items[].channelone of assistant, contact_form, configurator, tool, download, manual
items[].sourcestring
items[].profile_idstring | null
items[].statusone of new, in_progress, quoted, won, lost, discarded
items[].stored_statusone of new, in_progress, quoted, discarded
items[].personobject | null
items[].person.idstring
items[].person.namestring
items[].person.emailstring | null
items[].person.phonestring | null
items[].companyobject | null
items[].company.idstring
items[].company.namestring
items[].company_namestring | null
items[].company_as_typedstring | null
items[].namestring | null
items[].emailstring | null
items[].phonestring | null
items[].shortstring | null
items[].quotesinteger
items[].urlstring
pageinteger
totalinteger
has_moreboolean
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)

personstringAn existing person's id, from search_people.
namestringWho the inquiry is from, when there is no person.
emailstring
phonestring
companystringThe company as the contact named it.
messagestringWhat they asked for.

Response 200

idstring
created_atstring
channelone of assistant, contact_form, configurator, tool, download, manual
sourcestring
profile_idstring | null
profileobject | null
profile.idstring
profile.namestring
profile.versioninteger | null
configurator_profileobject | null
configurator_profile.idstring
configurator_profile.namestring
configurator_profile.versioninteger | null
configurator_selectionobject | null
configurator_selection.profile_versioninteger | null
configurator_selection.termone of monthly, annual
configurator_selection.needsstring[]
configurator_selection.lines[]object[]
configurator_selection.lines[].item_keystring
configurator_selection.lines[].namestring
configurator_selection.lines[].quantitynumber
configurator_selection.lines[].per_userboolean
configurator_selection.lines[].suggestedboolean
configurator_selection.lines[].unit_monthly_centsinteger
configurator_selection.lines[].unit_one_time_centsinteger
configurator_selection.monthly_net_centsinteger
configurator_selection.one_time_net_centsinteger
configurator_selection.prices_shownboolean
configurator_selection.atstring
statusone of new, in_progress, quoted, won, lost, discarded
stored_statusone of new, in_progress, quoted, discarded
outcomeone of won, lost | null
contactobject
contact.namestring
contact.companystring | null
contact.emailstring | null
contact.phonestring | null
contact.preferred_contactstring | null
contact.callback_requestedboolean
contact.appointment_requestedboolean
contact.privacy_acceptedboolean
contact.whatsapp_opt_inboolean
contact.consent_atstring | null
contact.consent_text_versionstring | null
personobject | null
person.idstring
person.namestring
person.emailstring | null
person.phonestring | null
companyobject | null
company.idstring
company.namestring
known_personobject | null
known_person.idstring
known_person.namestring
known_person.company_namestring | null
namestring | null
emailstring | null
phonestring | null
company_as_typedstring | null
preferred_contactstring | null
callback_requestedboolean
appointment_requestedboolean
answers[]object[]
answers[].keystring
answers[].labelstring
answers[].valuestring
summarystring | null
resultobject | null
result.kindone of recommendation, summary
result.titlestring | null
result.textstring
result.stepsstring[]
conversation_messagesinteger
messagestring | null
use_caseobject | null
use_case.titlestring
use_case.descriptionstring | null
use_case.stepsstring[]
use_case.systemsstring[]
use_case.fitstring | null
use_case.fit_notestring | null
discard_reasonstring | null
discarded_atstring | null
adopted_atstring | null
adopted_bystring | null
quotes[]object[]
quotes[].idstring
quotes[].numberstring
quotes[].versioninteger | null
quotes[].titlestring
quotes[].statusstring
quotes[].one_off_net_centsinteger
quotes[].monthly_net_centsinteger
notes[]object[]
notes[].idstring
notes[].authorstring
notes[].agentoptionalstring
notes[].created_atstring
notes[].bodystring
urlstring
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

idrequiredstringThe inquiry's (lead's) id.

Response 200

idstring
created_atstring
channelone of assistant, contact_form, configurator, tool, download, manual
sourcestring
profile_idstring | null
profileobject | null
profile.idstring
profile.namestring
profile.versioninteger | null
configurator_profileobject | null
configurator_profile.idstring
configurator_profile.namestring
configurator_profile.versioninteger | null
configurator_selectionobject | null
configurator_selection.profile_versioninteger | null
configurator_selection.termone of monthly, annual
configurator_selection.needsstring[]
configurator_selection.lines[]object[]
configurator_selection.lines[].item_keystring
configurator_selection.lines[].namestring
configurator_selection.lines[].quantitynumber
configurator_selection.lines[].per_userboolean
configurator_selection.lines[].suggestedboolean
configurator_selection.lines[].unit_monthly_centsinteger
configurator_selection.lines[].unit_one_time_centsinteger
configurator_selection.monthly_net_centsinteger
configurator_selection.one_time_net_centsinteger
configurator_selection.prices_shownboolean
configurator_selection.atstring
statusone of new, in_progress, quoted, won, lost, discarded
stored_statusone of new, in_progress, quoted, discarded
outcomeone of won, lost | null
contactobject
contact.namestring
contact.companystring | null
contact.emailstring | null
contact.phonestring | null
contact.preferred_contactstring | null
contact.callback_requestedboolean
contact.appointment_requestedboolean
contact.privacy_acceptedboolean
contact.whatsapp_opt_inboolean
contact.consent_atstring | null
contact.consent_text_versionstring | null
personobject | null
person.idstring
person.namestring
person.emailstring | null
person.phonestring | null
companyobject | null
company.idstring
company.namestring
known_personobject | null
known_person.idstring
known_person.namestring
known_person.company_namestring | null
namestring | null
emailstring | null
phonestring | null
company_as_typedstring | null
preferred_contactstring | null
callback_requestedboolean
appointment_requestedboolean
answers[]object[]
answers[].keystring
answers[].labelstring
answers[].valuestring
summarystring | null
resultobject | null
result.kindone of recommendation, summary
result.titlestring | null
result.textstring
result.stepsstring[]
conversation_messagesinteger
messagestring | null
use_caseobject | null
use_case.titlestring
use_case.descriptionstring | null
use_case.stepsstring[]
use_case.systemsstring[]
use_case.fitstring | null
use_case.fit_notestring | null
discard_reasonstring | null
discarded_atstring | null
adopted_atstring | null
adopted_bystring | null
quotes[]object[]
quotes[].idstring
quotes[].numberstring
quotes[].versioninteger | null
quotes[].titlestring
quotes[].statusstring
quotes[].one_off_net_centsinteger
quotes[].monthly_net_centsinteger
notes[]object[]
notes[].idstring
notes[].authorstring
notes[].agentoptionalstring
notes[].created_atstring
notes[].bodystring
urlstring
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

idrequiredstringThe inquiry's (lead's) id.

Body (JSON)

statusone of new, in_progress, discarded, active, won, lost
adoptbooleantrue adopts the inquiry („Übernehmen“).
companystringAn existing company's id, from search_companies.
new_company_namestringCreates this company and puts the person there.
discard_reasonstringWhy, with status discarded.
outcomeone of won, lost, noneA manual won/lost for an inquiry without quotes; none clears it.

Response 200

idstring
created_atstring
channelone of assistant, contact_form, configurator, tool, download, manual
sourcestring
profile_idstring | null
profileobject | null
profile.idstring
profile.namestring
profile.versioninteger | null
configurator_profileobject | null
configurator_profile.idstring
configurator_profile.namestring
configurator_profile.versioninteger | null
configurator_selectionobject | null
configurator_selection.profile_versioninteger | null
configurator_selection.termone of monthly, annual
configurator_selection.needsstring[]
configurator_selection.lines[]object[]
configurator_selection.lines[].item_keystring
configurator_selection.lines[].namestring
configurator_selection.lines[].quantitynumber
configurator_selection.lines[].per_userboolean
configurator_selection.lines[].suggestedboolean
configurator_selection.lines[].unit_monthly_centsinteger
configurator_selection.lines[].unit_one_time_centsinteger
configurator_selection.monthly_net_centsinteger
configurator_selection.one_time_net_centsinteger
configurator_selection.prices_shownboolean
configurator_selection.atstring
statusone of new, in_progress, quoted, won, lost, discarded
stored_statusone of new, in_progress, quoted, discarded
outcomeone of won, lost | null
contactobject
contact.namestring
contact.companystring | null
contact.emailstring | null
contact.phonestring | null
contact.preferred_contactstring | null
contact.callback_requestedboolean
contact.appointment_requestedboolean
contact.privacy_acceptedboolean
contact.whatsapp_opt_inboolean
contact.consent_atstring | null
contact.consent_text_versionstring | null
personobject | null
person.idstring
person.namestring
person.emailstring | null
person.phonestring | null
companyobject | null
company.idstring
company.namestring
known_personobject | null
known_person.idstring
known_person.namestring
known_person.company_namestring | null
namestring | null
emailstring | null
phonestring | null
company_as_typedstring | null
preferred_contactstring | null
callback_requestedboolean
appointment_requestedboolean
answers[]object[]
answers[].keystring
answers[].labelstring
answers[].valuestring
summarystring | null
resultobject | null
result.kindone of recommendation, summary
result.titlestring | null
result.textstring
result.stepsstring[]
conversation_messagesinteger
messagestring | null
use_caseobject | null
use_case.titlestring
use_case.descriptionstring | null
use_case.stepsstring[]
use_case.systemsstring[]
use_case.fitstring | null
use_case.fit_notestring | null
discard_reasonstring | null
discarded_atstring | null
adopted_atstring | null
adopted_bystring | null
quotes[]object[]
quotes[].idstring
quotes[].numberstring
quotes[].versioninteger | null
quotes[].titlestring
quotes[].statusstring
quotes[].one_off_net_centsinteger
quotes[].monthly_net_centsinteger
notes[]object[]
notes[].idstring
notes[].authorstring
notes[].agentoptionalstring
notes[].created_atstring
notes[].bodystring
urlstring
noteoptionalstring
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.