Create or Update Customer
createCustomerCreate or Update Customer
Upsert a customer by contact identity. When both email and phone are sent, match email first; if no email match, fall through to phone (E.164, then raw). Email-only or phone-only keep that single-field match. Matched rows are updated; otherwise a customer is created. Returns 409 when email and phone match two different existing customers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | City for the address. | |
| No | Email used for upsert matching. When both email and phone are provided, email is tried first; a match updates that customer. When only email is provided, match is by email only. | ||
| notes | No | Internal notes about the customer. | |
| phone | No | Phone used for upsert matching (E.164 when parseable, otherwise raw). When both email and phone are provided and email does not match, phone is tried next. When only phone is provided, match is by phone only. | |
| state | No | State, province, or region for the address. | |
| company | No | Company or organization name associated with the customer. | |
| address1 | No | Primary street address line. | |
| address2 | No | Secondary street address line, such as suite or apartment. | |
| last_name | No | Customer last name. | |
| photo_url | No | Public image URL downloaded and stored as the customer photo before the record is created. Returns 400 if the URL cannot be fetched or is not a valid image. Accepts at most 500 characters. | |
| tag_slugs | No | Tag slugs to attach to the customer. | |
| first_name | Yes | Customer first name. | |
| postal_code | No | Postal or ZIP code for the address. | |
| signed_up_at | No | When the customer signed up. Optional instant for request bodies: Unix timestamp as integer (seconds), or a date/time string of at most 50 characters that PHP Carbon can parse. For strings, ISO-8601 / RFC 3339 (for example 2026-04-28T15:30:00Z) is the recommended format in examples and client integrations. Invalid values fail validation. When the field is omitted or null, the API uses the current server time where that behavior is documented on the operation. | |
| location_slug | No | Slug of an existing project location. Returns 404 if the slug is not found. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Short code or application-level status code for this resource. | |
| data | No | Response payload for the request. | |
| success | No | Indicates whether the request completed successfully. |