Create a lead
create_leadCreate a lead
The lead starts in the agent's starting status (new unless your team chose another),
unassigned. phone, when sent, must be a valid number in E.164 (+201001234567); the
lead is linked to the agent's contact with that number, or to a new contact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| phone | No | A valid number in E.164 (`+201001234567`); the lead links to the agent's contact with that number. An empty string is the same as leaving it out. | |
| summary | No | ||
| agent_id | Yes | The agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`. | |
| custom_fields | No | Free-form fields keyed by name, stored as sent (see Partial updates in the API description for how date-time strings and decimals are normalized). For a lead, use the keys of the agent's own lead fields (`listLeadFields`, `built_in: false`), and the whole object is limited to about 10,000 characters of JSON (`422 invalid_request` beyond). Mojeeb doesn't check keys or values against the fields' `type`, `options` or `required`. On update the object merges key by key, and a key sent as `null` stays with the value `null`. |