HTTP API
Pipe new leads into your pipeline from a website form, chatbot, or any app that can send HTTP requests. Create keys and webhooks in Profile settings.
Authentication
Create a key in CRM → Profile → API keys. Keys start with es_live_ and are shown once. Each key is bound to one workspace (or your personal board when no workspace is set).
Send the key as a Bearer token or as X-Api-Key.
Header
Authorization: Bearer es_live_YOUR_KEY
Header
X-Api-Key: es_live_YOUR_KEY
/api/v1/opportunities
Creates a client, optional relationship contact, and opportunity in the key's workspace.
URL https://api.enginuitysales.com/api/v1/opportunities
HTTP 201 on success. HTTP 401 if the key is missing or revoked.
Body
| Field | Required | Notes |
|---|---|---|
name | No | Opportunity title. Defaults to "New opportunity". |
description | No | Free-text notes about the inquiry. |
client.name | Recommended | Company / account name. |
relationship.name | No | Contact name on the deal. |
relationship.email | No | Contact email. |
relationship.phone | No | Contact phone. |
relationship.role | No | Contact role, e.g. VP Sales. |
source | No | Channel tag, e.g. whatsapp, website, zapier. |
externalId | No | Your system's id for idempotency reference. |
closeDate | No | ISO date for close target. |
cURL
curl -X POST https://api.enginuitysales.com/api/v1/opportunities \
-H "Authorization: Bearer es_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "WhatsApp inquiry — Acme Corp",
"description": "Asked about pricing on WhatsApp",
"source": "whatsapp",
"externalId": "wa-thread-918273",
"closeDate": "2026-12-31",
"client": { "name": "Acme Corp" },
"relationship": {
"name": "Jane Doe",
"email": "jane@acme.example",
"phone": "+14155550123",
"role": "VP Sales"
}
}'JavaScript
const response = await fetch("https://api.enginuitysales.com/api/v1/opportunities", {
method: "POST",
headers: {
Authorization: "Bearer es_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Website form — Acme Corp",
source: "website",
client: { name: "Acme Corp" },
relationship: {
name: "Jane Doe",
email: "jane@acme.example",
},
}),
})
const data = await response.json()201 Created
{
"ok": true,
"opportunity": {
"id": "42",
"name": "WhatsApp inquiry — Acme Corp",
"url": "https://crm.enginuitysales.com/w/…/opportunities/42",
"client": { "id": "7", "name": "Acme Corp" }
}
}401 Unauthorized
{ "ok": false, "error": "Unauthorized" }Webhooks
Configure outbound webhooks in CRM → Profile → Webhooks. We POST JSON to your HTTPS URL with X-Webhook-Signature: sha256=… (HMAC-SHA256 of the raw body using your signing secret).
Reply with HTTP 2xx. Use the Test button to send a ping event.
Events
| Event | When |
|---|---|
opportunity.created | A new opportunity is created via the API or CRM. |
opportunity.stage_changed | The deal moves to another pipeline stage. |
opportunity.won | The opportunity is marked won. |
opportunity.lost | The opportunity is marked lost. |
webhook.ping | Sent when you click Test on a webhook in CRM. |
Headers we send
Content-Type: application/json X-Webhook-Event: opportunity.created X-Webhook-Signature: sha256=…
Body
{
"event": "opportunity.created",
"createdAt": "2026-08-13T14:00:00.000Z",
"opportunity": {
"id": "42",
"name": "WhatsApp inquiry — Acme Corp",
"stageId": "3",
"url": "https://crm.enginuitysales.com/w/…/opportunities/42"
}
}