CRM API: deals, companies and pipelines
How to create and move deals, manage companies, and query Omnifox's CRM pipelines via API.
Watch this step in the video · CRM and calendar via API
Omnifox's CRM module organizes sales opportunities (deals) into pipelines with stages, linked to contacts and companies. The API exposes that same model so you can integrate it with your ERP, spreadsheet, or BI tool.
Requirements
- The workspace must have the
crm_enabledplan feature; without it these endpoints return403. - A Bearer token for the workspace.
Main endpoints
GET/POST /api/v1/crm/pipelines— list or create pipelines;GET /api/v1/crm/pipelines/{pipeline}/stagesfor their stages.GET/POST /api/v1/crm/companies— companies;POST /api/v1/crm/companies/{company}/contactsto link contacts.GET/POST /api/v1/crm/deals— deals.PATCH /api/v1/crm/deals/{deal}/stage— move a deal to another stage.GET /api/v1/crm/reports/funneland/forecast— aggregate reports.
Deal fields
{
"pipeline_id": 1,
"stage_id": null,
"title": "Annual renewal",
"amount": 1200.0,
"currency": "USD",
"probability": 40,
"contact_id": 55,
"company_id": 12,
"expected_close_date": "2026-09-01"
}
If you omit stage_id, the deal lands in the pipeline's first stage.
Example: move a deal to "Won"
curl -X PATCH "https://app.omnifox.io/api/v1/crm/deals/501/stage" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"stage_id": 9}'
(Stage 9 must have is_won: true for the forecast to count it as a closed-won deal.)
Contact required and currency
- When creating a deal (
POST /api/v1/crm/deals),contact_idis required. Without it the API returns422with the error oncontact_id. - When editing, a deal that already has a contact can't be left without one (
422). - If you omit
currency, the deal starts in the workspace's CRM Main currency (the one chosen in Settings; if none, the most used among deals, then the catalog's, and finally USD).
Tips
- Every company accepts
custom_fields; fetch them viaGET /api/v1/crm/companies/{company}/custom-fields. - Use
client_noncewhen creating a deal from an integration that retries automatically, to avoid duplicates from double submits.
Troubleshooting
- 403 on any
/crm/*endpoint: the workspace's plan doesn't include CRM; check Settings > Billing. - Deal missing from the forecast: confirm the stage's
is_won/is_lostflags are set correctly in the pipeline.
Related articles
-
How to connect integrations and external apps
Connect Omnifox with your favorite tools from the integrations catalog in just a few steps.
-
Integrations and API complete guide
Integrations and API in depth, in 30 chapters: API keys, real calls, signed webhooks, n8n, MCP and SDKs, all really working.
-
Connecting Omnifox to Azur, Siigo, Alegra, QuickBooks or another accounting system or ERP
Omnifox doesn't have a native connector for accounting systems or ERPs today. Here's how to connect them anyway with workflows, the HTTP node, n8n, Make, Zapier or the API, with examples.
-
Generate and use API keys and webhooks
Create API keys to access Omnifox programmatically and set up webhooks to receive real-time events.
-
Getting started with integrations (webhook / OAuth / API key)
Connect Omnifox with your other tools: what's available today, what's coming soon, and when to use a webhook, an OAuth connection or an API key.