Skip to main content

Create Opportunity

POST /public/action/opportunities/create

Creates a sales opportunity in the pipeline.

Authentication: X-API-KEY header (see Authentication).

Request body

FieldTypeDescription
namestringOpportunity name.
descriptionstringDescription.
clientNamestringAssociated client.
stageNamestringPipeline stage name.
valuenumberEstimated value.
estCloseDatedateEstimated close date.
leadInfoobjectStructured lead information.
toDosToDoItem[]Associated to-do items.
customValuesmapCustom-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": []
}