Same as createCustomer, except that the ID number is optional: most leads only carry a name and a phone number. Used by lead-service when a new lead matches no existing customer. 'idType' and 'idNumber' must still be given together when present; 'managerId' is required. The customer is created in the caller's tenant, in the agency of its manager, with 'managerId' as its single manager. When 'statusId' is omitted the tenant's default inactive status is assigned. Phone numbers are normalized to E.164. Publishes a customer-created event. The 'sensitive' field is currently ignored on creation. Errors: 400 with error code 40001 when the ID type and ID number are not given together, a phone number or email address is invalid, 'managerId' is missing or references an inactive user; 400 with error code 40205 when the ID number already belongs to a customer and the tenant does not allow duplicate customers; 400 with error code 40204 when no ID number is given, 'forceCreation' is false and a customer with the same email address or phone number already exists (the error's 'info.conflictingCustomers' lists them; resend with 'forceCreation' true to create anyway); 404 when the manager, status, class or source does not exist.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Invalid input (40001), duplicate ID number (40205) or conflicting customers found by email/phone (40204)
404Manager, status, class or source not found