API reference · version 1
CRM
Leads and deals (needs the CRM app).
- GET
/crm/leadsList leads - GET
/crm/leads/{id}Get a lead - POST
/crm/leadsCreate a lead - GET
/crm/dealsList deals - GET
/crm/deals/{id}Get a deal
List leads
GET/api/v1/crm/leads
Leads the key's member may see (their own, or everyone's with the right to see all leads and deals), newest first. Needs the CRM app.
Query parameters
| Field | Type | Description |
|---|---|---|
| limit | integer | Records per page, 1–100 (default 25).≥ 1 · ≤ 100 · default 25 |
| cursor | string | The nextCursor of the previous page.at most 64 characters |
| updatedSince | string | Only records changed at or after this instant (records without a change time: created). |
| status | enum | one of NEW, QUALIFIED, NURTURE, DISQUALIFIED |
| q | string | Name, company, email or phone contains.at most 80 characters |
Example
curl "https://your-workspace.omnibooks.online/api/v1/crm/leads?status=NEW&q=harthy" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"data": [
{
"id": "cmabc123def456",
"number": "INV-2026-00042",
"name": "Gulf Star Trading LLC",
"companyName": null,
"jobTitle": null,
"phone": "+968 2412 3456",
"email": "accounts@gulfstar.example",
"status": "POSTED",
"source": null,
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"taxNumber": null,
"budget": null,
"notes": null,
"externalRef": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
],
"nextCursor": null
}Answer fields
| Field | Type | Description |
|---|---|---|
| datarequired | array of object | |
| data[].idrequired | string | An OmniBooks id. |
| data[].numberrequired | string | |
| data[].namerequired | string | Display name. |
| data[].companyNamerequired | string | may be null |
| data[].jobTitlerequired | string | may be null |
| data[].phonerequired | string | E.164 when it could be read.may be null |
| data[].emailrequired | string | may be null |
| data[].statusrequired | string | NEW, QUALIFIED, NURTURE or DISQUALIFIED. |
| data[].sourcerequired | string | may be null |
| data[].ownerIdrequired | string | An OmniBooks id.may be null |
| data[].branchIdrequired | string | An OmniBooks id. |
| data[].taxNumberrequired | string | may be null |
| data[].budgetrequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| data[].notesrequired | string | Notes; on sales documents they are printed.may be null |
| data[].externalRefrequired | string | The id your form or system sent, for leads from a capture webhook.may be null |
| data[].customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| data[].createdAtrequired | string | An instant, ISO 8601 in UTC. |
| data[].updatedAtrequired | string | An instant, ISO 8601 in UTC. |
| nextCursorrequired | string | Pass as cursor for the next page; null on the last page.may be null |
Get a lead
GET/api/v1/crm/leads/{id}
One lead.
Path
| Field | Type | Description |
|---|---|---|
| idrequired | string | The record's id. |
Example
curl "https://your-workspace.omnibooks.online/api/v1/crm/leads/<id>" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"id": "cmabc123def456",
"number": "INV-2026-00042",
"name": "Gulf Star Trading LLC",
"companyName": null,
"jobTitle": null,
"phone": "+968 2412 3456",
"email": "accounts@gulfstar.example",
"status": "POSTED",
"source": null,
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"taxNumber": null,
"budget": null,
"notes": null,
"externalRef": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| numberrequired | string | |
| namerequired | string | Display name. |
| companyNamerequired | string | may be null |
| jobTitlerequired | string | may be null |
| phonerequired | string | E.164 when it could be read.may be null |
| emailrequired | string | may be null |
| statusrequired | string | NEW, QUALIFIED, NURTURE or DISQUALIFIED. |
| sourcerequired | string | may be null |
| ownerIdrequired | string | An OmniBooks id.may be null |
| branchIdrequired | string | An OmniBooks id. |
| taxNumberrequired | string | may be null |
| budgetrequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| notesrequired | string | Notes; on sales documents they are printed.may be null |
| externalRefrequired | string | The id your form or system sent, for leads from a capture webhook.may be null |
| customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
| updatedAtrequired | string | An instant, ISO 8601 in UTC. |
Create a lead
POST/api/v1/crm/leads
Adds a lead owned by the key's member (or ownerId, for members who may give leads to others), as on the Leads screen: the phone is stored in international form, a GSTIN is checked in India, and crm.lead.created webhooks fire. Duplicates are not refused: check with GET /crm/leads?q= first.
Body
| Field | Type | Description |
|---|---|---|
| customFields | object (by key) | Custom field values by key (GET /custom-fields). Only the keys you send change; an empty value clears one; unknown keys are refused.may be null |
| namerequired | string | Display name.at least 2 characters · at most 120 characters |
| nameAr | string | at most 120 characters · may be null |
| companyName | string | at most 160 characters · may be null |
| jobTitle | string | at most 80 characters · may be null |
| phone | string | at most 40 characters · may be null |
| string | at most 160 characters · may be null | |
| notes | string | Notes; on sales documents they are printed.at most 4000 characters · may be null |
| taxNumber | string | at most 40 characters · may be null |
| budget | enum | enum | string | number | |
| timeline | enum | enum | enum | |
| interest | string | at most 200 characters · may be null |
| priority | enum | enum | enum | |
| ownerId | string | at most 64 characters · may be null |
| source | string | A lead source by name, as in CRM → Settings (e.g. Website). Unknown names are refused.at most 80 characters · may be null |
| branchId | string | The branch (default: the member's own).at most 64 characters · may be null |
Example
curl -X POST "https://your-workspace.omnibooks.online/api/v1/crm/leads" \
-H "Authorization: Bearer $OMNIBOOKS_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Huda Al Harthy",
"companyName": "Harthy Trading",
"phone": "+968 9123 4567",
"email": "huda@harthy.example",
"source": "Website",
"notes": "Asked for a quotation for 200 chairs."
}'{
"id": "cmabc123def456",
"number": "INV-2026-00042",
"name": "Gulf Star Trading LLC",
"companyName": null,
"jobTitle": null,
"phone": "+968 2412 3456",
"email": "accounts@gulfstar.example",
"status": "POSTED",
"source": null,
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"taxNumber": null,
"budget": null,
"notes": null,
"externalRef": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| numberrequired | string | |
| namerequired | string | Display name. |
| companyNamerequired | string | may be null |
| jobTitlerequired | string | may be null |
| phonerequired | string | E.164 when it could be read.may be null |
| emailrequired | string | may be null |
| statusrequired | string | NEW, QUALIFIED, NURTURE or DISQUALIFIED. |
| sourcerequired | string | may be null |
| ownerIdrequired | string | An OmniBooks id.may be null |
| branchIdrequired | string | An OmniBooks id. |
| taxNumberrequired | string | may be null |
| budgetrequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| notesrequired | string | Notes; on sales documents they are printed.may be null |
| externalRefrequired | string | The id your form or system sent, for leads from a capture webhook.may be null |
| customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
| updatedAtrequired | string | An instant, ISO 8601 in UTC. |
Errors this endpoint may answer
422 SOURCE_UNKNOWN: No lead source has that name.
List deals
GET/api/v1/crm/deals
Deals the key's member may see, newest first. Needs the CRM app.
Query parameters
| Field | Type | Description |
|---|---|---|
| limit | integer | Records per page, 1–100 (default 25).≥ 1 · ≤ 100 · default 25 |
| cursor | string | The nextCursor of the previous page.at most 64 characters |
| updatedSince | string | Only records changed at or after this instant (records without a change time: created). |
| status | enum | one of OPEN, WON, LOST |
| contactId | string | The customer or supplier (GET /contacts).at most 64 characters |
Example
curl "https://your-workspace.omnibooks.online/api/v1/crm/deals?status=WON" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"data": [
{
"id": "cmabc123def456",
"number": "INV-2026-00042",
"title": "text",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"stage": "text",
"pipeline": "text",
"currency": "OMR",
"expectedValue": null,
"expectedClose": null,
"wonValue": null,
"wonCurrency": null,
"wonVia": null,
"wonOrderId": "cmabc123def456",
"wonAt": null,
"lostAt": null,
"lostReason": null,
"competitor": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
],
"nextCursor": null
}Answer fields
| Field | Type | Description |
|---|---|---|
| datarequired | array of object | |
| data[].idrequired | string | An OmniBooks id. |
| data[].numberrequired | string | |
| data[].titlerequired | string | |
| data[].statusrequired | enum | one of OPEN, WON, LOST |
| data[].contactIdrequired | string | An OmniBooks id. |
| data[].contactNamerequired | string | |
| data[].ownerIdrequired | string | An OmniBooks id.may be null |
| data[].branchIdrequired | string | An OmniBooks id. |
| data[].stagerequired | string | |
| data[].pipelinerequired | string | |
| data[].currencyrequired | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.may be null |
| data[].expectedValuerequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| data[].expectedCloserequired | string | A calendar date, YYYY-MM-DD.may be null |
| data[].wonValuerequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| data[].wonCurrencyrequired | string | may be null |
| data[].wonViarequired | string | MANUAL, ORDER or ONLINE.may be null |
| data[].wonOrderIdrequired | string | An OmniBooks id.may be null |
| data[].wonAtrequired | string | An instant, ISO 8601 in UTC.may be null |
| data[].lostAtrequired | string | An instant, ISO 8601 in UTC.may be null |
| data[].lostReasonrequired | string | may be null |
| data[].competitorrequired | string | may be null |
| data[].customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| data[].createdAtrequired | string | An instant, ISO 8601 in UTC. |
| data[].updatedAtrequired | string | An instant, ISO 8601 in UTC. |
| nextCursorrequired | string | Pass as cursor for the next page; null on the last page.may be null |
Get a deal
GET/api/v1/crm/deals/{id}
One deal.
Path
| Field | Type | Description |
|---|---|---|
| idrequired | string | The record's id. |
Example
curl "https://your-workspace.omnibooks.online/api/v1/crm/deals/<id>" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"id": "cmabc123def456",
"number": "INV-2026-00042",
"title": "text",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"stage": "text",
"pipeline": "text",
"currency": "OMR",
"expectedValue": null,
"expectedClose": null,
"wonValue": null,
"wonCurrency": null,
"wonVia": null,
"wonOrderId": "cmabc123def456",
"wonAt": null,
"lostAt": null,
"lostReason": null,
"competitor": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| numberrequired | string | |
| titlerequired | string | |
| statusrequired | enum | one of OPEN, WON, LOST |
| contactIdrequired | string | An OmniBooks id. |
| contactNamerequired | string | |
| ownerIdrequired | string | An OmniBooks id.may be null |
| branchIdrequired | string | An OmniBooks id. |
| stagerequired | string | |
| pipelinerequired | string | |
| currencyrequired | string | ISO 4217 code; left out = the contact's currency, else the company's base currency.may be null |
| expectedValuerequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| expectedCloserequired | string | A calendar date, YYYY-MM-DD.may be null |
| wonValuerequired | string | A decimal amount as a string, e.g. "105.000".may be null |
| wonCurrencyrequired | string | may be null |
| wonViarequired | string | MANUAL, ORDER or ONLINE.may be null |
| wonOrderIdrequired | string | An OmniBooks id.may be null |
| wonAtrequired | string | An instant, ISO 8601 in UTC.may be null |
| lostAtrequired | string | An instant, ISO 8601 in UTC.may be null |
| lostReasonrequired | string | may be null |
| competitorrequired | string | may be null |
| customFieldsrequired | object (by key) | The company's custom fields, by key (GET /custom-fields lists them). Empty fields are left out. |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
| updatedAtrequired | string | An instant, ISO 8601 in UTC. |