Create Opportunity
Creates a sales opportunity in the pipeline.
Authentication: X-API-KEY header (see Authentication).
Request body
| Field | Type | Description |
|---|---|---|
| name | string | Opportunity name. |
| description | string | Description. |
| clientName | string | Associated client. |
| stageName | string | Pipeline stage name. |
| value | number | Estimated value. |
| estCloseDate | date | Estimated close date. |
| leadInfo | object | Structured lead information. |
| toDos | ToDoItem[] | Associated to-do items. |
| customValues | map | Custom-field values. |
Request
curl -X POST https://api.withmoxie.com/public/action/opportunities/create \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"name": "Acme retainer", "clientName": "Acme Kft.", "stageName": "Proposal", "value": 12000}'
Response
Returns the created Opportunity.
{
"id": "66b0f8e5c3a9e40012ab8833",
"accountId": 10016,
"clientId": "66b0f2a1c3a9e40012ab34cd",
"statusId": "stage_proposal",
"name": "Acme retainer",
"description": null,
"value": 12000,
"estCloseDate": null,
"customValues": []
}