Customer API
The Mozin customer API turns a lead from another tool into a Mozin customer, so nobody retypes names and phone numbers. Your tool sends one HTTPS request per lead; Mozin creates the customer, or, when the phone or email already belongs to a customer, fills in only the fields that are still blank.
A key with read access can also look up your customers, jobs and invoices: see Read your data.
Want Mozin to notify your tools when a job is scheduled or completed? See Webhooks.
Who can use the API
- The API is included in the Mozin Business plan and in the 14-day free trial.
- Only the business owner creates and revokes API keys. Managers and team members never see them.
- A business can have up to 5 active keys, for example one per tool.
Create an API key
- Sign in at app.gomozin.com as the business owner.
- Open Business Profile → Integrations → API keys.
- Give the key a name (for example “GoHighLevel”) and choose what it can do: Add leads, Read customers, jobs and invoices, or both. Then click Create API key.
- Copy the key right away. It starts with
mzk_and is shown only once.
Treat the key like a password: anyone who has it can do what it allows (add customers, or read your customers’ details). If it leaks, click Revoke; requests with that key stop working at once. Then create a new one.
Send a customer
Send a POST request to https://auth.gomozin.com/functions/v1/api-v1/customers with your key in the Authorization header and the customer as JSON:
POST https://auth.gomozin.com/functions/v1/api-v1/customers
Authorization: Bearer mzk_your_api_key
Content-Type: application/json
{
"first_name": "Maria",
"last_name": "Silva",
"email": "maria@example.com",
"phone": "(617) 555-0142",
"address1": "12 Elm St",
"city": "Boston",
"state": "MA",
"postal_code": "02118",
"source": "Website form"
}If your tool can’t set Authorization, send the key in an X-Mozin-Key header instead (the key alone, without “Bearer”).
Fields
Required: a first name, and a phone or an email (or both). Every field is text. Fields Mozin doesn’t know are ignored, so you can send your tool’s whole contact.
| Field | Notes |
|---|---|
first_name | Required, unless you send name. Up to 100 characters. |
last_name | Up to 100 characters. |
name | Full name. Used only when first_name is empty; split at the first space. |
email | Must be a valid email address. |
phone | A US number in any format: (617) 555-0142, 617-555-0142 or +1 617 555 0142. |
address1 | Street address. address_line1 also works. |
address2 | Apartment or unit. unit also works. |
city, state | Up to 200 characters each. |
postal_code | ZIP code. postalCode also works. |
country | A 2-letter code such as US. Anything else is saved as US. |
notes | Up to 2,000 characters. Saved only when a new customer is created. |
source | Where the lead came from, up to 40 characters. New customers get the note “Added via {source} on {date}”. Defaults to API. |
What Mozin does with a lead
- New person: no customer has that phone or email, so Mozin creates one.
- Existing customer: the phone or email belongs to one customer, so Mozin fills in only what is blank (last name, phone, email, address). It never changes a name, a number or an address you already have, and never adds notes.
- Conflict: the phone belongs to one customer and the email to another. Mozin changes nothing, so it can’t attach one person’s details to someone else.
Every lead appears in Business Profile → Integrations → Recent leads with its result: New customer, Matched a customer, Needs review or Rejected.
Customers added through the API get no SMS until they agree to texts through Mozin’s usual consent flow. Email reminders follow your business settings, like any customer you add by hand.
Responses
Mozin answers 202 for every valid lead, whether it created a customer, matched one or found a conflict. The response never says whether a customer already existed; check Recent leads for that.
HTTP/1.1 202 Accepted
{ "status": "accepted" }HTTP/1.1 422 Unprocessable Entity
{ "error": "invalid_input", "detail": "phone_or_email_required" }| Status | Meaning |
|---|---|
202 | Lead accepted. |
401 | Missing, unknown or revoked key, or the business doesn’t have the Business plan. |
403 | The key doesn’t have the Add leads permission. |
413 | Body larger than 16 KB. |
415 | Content-Type isn’t application/json. |
422 | Invalid lead. detail says why: first_name_required, phone_or_email_required, phone_invalid, email_invalid, field_too_long:<field>, invalid_json or invalid_customer. |
429 | More than 60 requests in a minute with one key. Wait for the Retry-After seconds and send again. |
500 | Something went wrong on our side. Try again; if it keeps happening, email hi@gomozin.com. |
GoHighLevel
- In GoHighLevel, go to Automation → Workflows → Create workflow → Start from scratch.
- Add a trigger: Contact Created, or Form Submitted for a specific form.
- Add the Custom Webhook action. Method: POST. URL:
https://auth.gomozin.com/functions/v1/api-v1/customers. - Authorization: Bearer Token, and paste your Mozin API key as the token.
- Content-Type:
application/json. Raw body: paste the template below. - Click Save action, then Test workflow with a contact. The lead appears in Mozin under Recent leads. Then Publish the workflow.
{"first_name":"{{contact.first_name}}","last_name":"{{contact.last_name}}","email":"{{contact.email}}","phone":"{{contact.phone}}","address1":"{{contact.address1}}","city":"{{contact.city}}","state":"{{contact.state}}","postal_code":"{{contact.postal_code}}","source":"GoHighLevel"}Custom Webhook is a premium action in GoHighLevel, so GoHighLevel may bill each run. Mozin doesn’t charge per lead.
Zapier, Make and n8n
- Zapier: add the Webhooks by Zapier → POST action. URL: the endpoint above. Payload type: JSON. Add data rows named like the fields above and map your trigger’s fields to them. Headers:
Authorization=Bearer mzk_…. - Make: add the HTTP → Make a request module. Method: POST. Headers:
Authorization=Bearer mzk_…. Body type: Raw, content type JSON (application/json), and build the body from the fields above. - n8n: add an HTTP Request node. Method: POST. Authentication: Header Auth with name
Authorizationand valueBearer mzk_…. Send a JSON body with the fields above.
Any other tool that can send a JSON POST with a header works the same way, including your own website form (send the request from your server, never from the browser, so the key stays secret).
Read your data
A key with the Read customers, jobs and invoices permission can look up your Mozin data with GET requests to https://auth.gomozin.com/functions/v1/api-v1. Choose the permission when you create the key; keys made only to add leads can’t read anything. Reads never change your data.
| Request | Returns |
|---|---|
GET /me | Your business (name, time zone) and the key’s permissions. Works with any key: use it to test a connection. |
GET /customers | Customers, newest first. Search with phone or email. |
GET /customers/{id} | One customer. |
GET /jobs | Jobs (each visit is one job) in a date range, earliest first. |
GET /jobs/{id} | One job. |
GET /invoices | Invoices, newest issue date first. Filter by status and issue date. |
GET /invoices/{id} | One invoice. |
GET https://auth.gomozin.com/functions/v1/api-v1/me
Authorization: Bearer mzk_your_api_key
HTTP/1.1 200 OK
{
"business": {
"id": "6f1c9a52-3b7e-4d1a-9c0e-2a8b5d7e4f10",
"name": "Blue Peak Maids",
"time_zone": "America/New_York"
},
"key": { "prefix": "mzk_Ab3dE5fG", "scopes": ["intake", "read"] }
}A read key exposes your customers’ names, phones, emails and addresses to the tool that holds it. Give read access only to tools that need it, and revoke a key you no longer use.
Filters
All filters go in the query string. Unknown parameters are rejected (422 unknown_parameter:<name>), so a typo never silently returns everything.
| Request | Parameter | Notes |
|---|---|---|
/customers | phone | Any US format. Matches any of the customer’s phone numbers. |
/customers | email | Matches any of the customer’s emails, ignoring case. With phone too, returns customers matching either. |
/jobs | from, to | Dates as YYYY-MM-DD, both included, in your business time zone. Default: today through 30 days from today. At most 366 days. |
/jobs | status | scheduled, completed or cancelled. |
/invoices | status | unpaid (sent, not paid), overdue (unpaid and past its due date), paid or void. Draft invoices are never returned. |
/invoices | issued_from, issued_to | Issue dates as YYYY-MM-DD, both included. |
/jobs, /invoices | customer_id | Only this customer’s jobs or invoices. |
| All lists | updated_since | Only records changed at or after this time, e.g. 2026-11-05T14:00:00Z (include Z or an offset). On /jobs without from/to, it returns every changed job whatever its date, oldest change first: use it to keep a copy in sync, including jobs moved to another day. |
| All lists | limit, cursor | See Pagination. |
GET https://auth.gomozin.com/functions/v1/api-v1/jobs?from=2026-11-09&to=2026-11-15&status=scheduled&limit=50
Authorization: Bearer mzk_your_api_keySearch values such as a phone number travel in the URL, so they can appear in the request logs of your tool and of Mozin’s hosting provider. Mozin’s own application logs leave them out.
Pagination
Lists return up to limit records (1–100, default 50) in data, plus next_cursor. When next_cursor isn’t null, send the same request again with cursor=<next_cursor> to get the next page. Keep the other parameters the same; a cursor from a different list is rejected.
HTTP/1.1 200 OK
{
"data": [
{
"id": "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
"number": 1042,
"title": "Deep clean",
"service_key": "deep_cleaning",
"status": "scheduled",
"starts_at": "2026-11-10T14:00:00+00:00",
"ends_at": "2026-11-10T17:00:00+00:00",
"completed_at": null,
"cancelled_at": null,
"arrival_window_minutes": 30,
"address": {
"line1": "12 Elm St", "unit": null, "city": "Boston",
"state": "MA", "postal_code": "02118", "country": "US"
},
"series": {
"id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"frequency": "weekly", "interval_count": 2,
"end_mode": "never", "until_date": null
},
"created_at": "2026-10-02T14:06:40.120044+00:00",
"updated_at": "2026-11-03T18:12:09.553100+00:00",
"customer": { "id": "0b7e2c41-5d9a-4e3f-8a61-7c2d9e0f1a23", "first_name": "Maria", "…": "…" }
}
],
"next_cursor": "eyJpIjogImMzZDRlNWY2LTdhOGItNGM5ZC04ZTBmLTFhMmIzYzRkNWU2ZiIsICJvIjogImpvYnMiLCAidiI6ICIyMDI2LTExLTEwVDE0OjAwOjAwLjAwMDAwMFoifQ"
}What you get back
The objects match Mozin’s webhook payloads, plus created_at and updated_at. Times are UTC (ISO 8601); dates such as issued_at and due_date are plain days. Money is in cents.
{
"id": "0b7e2c41-5d9a-4e3f-8a61-7c2d9e0f1a23",
"first_name": "Maria",
"last_name": "Silva",
"name": "Maria Silva",
"email": "maria@example.com",
"phone": "+16175550142",
"address": {
"line1": "12 Elm St",
"unit": null,
"city": "Boston",
"state": "MA",
"postal_code": "02118",
"country": "US"
},
"created_at": "2026-10-02T14:05:11.482913+00:00",
"updated_at": "2026-11-04T09:30:00.104277+00:00"
}{
"id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
"number": 318,
"title": "Deep clean",
"status": "sent",
"issued_at": "2026-11-03",
"due_date": "2026-11-18",
"payment_terms": "net_15",
"sent_at": "2026-11-03T19:02:44.019311+00:00",
"paid_at": null,
"voided_at": null,
"currency": "usd",
"total_cents": 24000,
"amount_paid_cents": 0,
"tip_cents": 0,
"amount_due_cents": 24000,
"total_formatted": "$240.00",
"amount_due_formatted": "$240.00",
"payment_method": null,
"job_id": "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
"created_at": "2026-11-03T19:01:10.880120+00:00",
"updated_at": "2026-11-03T19:02:44.019311+00:00",
"customer": { "id": "0b7e2c41-5d9a-4e3f-8a61-7c2d9e0f1a23", "first_name": "Maria", "…": "…" }
}- Jobs and invoices include their
customer. If that customer was deleted in Mozin, it shows only{"id": "…", "deleted": true}. phoneandemailare the customer’s billing contact;phoneis in+1format.- Never included: notes, prices on jobs, team members, pay, payment card details or pay links.
Read errors
HTTP/1.1 403 Forbidden
{ "error": "insufficient_scope" }| Status | Meaning |
|---|---|
200 | OK. |
401 | Missing, unknown or revoked key, or the business doesn’t have the Business plan. |
403 | insufficient_scope: the key can’t do this (a lead-only key reading, or a read-only key adding a lead). |
404 | No such record in your business. Records of other businesses, deleted customers and draft invoices also answer 404. |
422 | Bad filter. detail says which, e.g. date_invalid:from, limit_invalid, invalid_cursor. |
429 | More than 60 requests in a minute with one key (reads and leads together). Wait for the Retry-After seconds. |