POST
/api/public/v1/dealsCreate a deal
Opens a deal. Omit `stageId` and it lands in the pipeline’s first column; omit `ownerId` and it belongs to whoever the token acts as. A location with no pipeline yet gets the default one created for it rather than the call failing.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
deals:write
Request Body
| Property | Type | Description |
|---|---|---|
locationId | string | The location. |
title | string | What the deal is. |
stageId | string | From the pipeline endpoint. Defaults to the first column. |
accountId | string | The customer it belongs to. |
ownerId | string | Defaults to the token’s own employee. |
value | number | Cents. |
currency | string | Three letters. Defaults to USD. |
probability | number | 0–100. Overrides the stage default when set. |
expectedCloseDate | string | ISO 8601. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/deals" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"locationId": "loc_abc123",
"title": "Northwind — annual contract",
"value": 4800000,
"accountId": "acc_7712"
}'200Example response
json
{
"message": "Deal created successfully!",
"content": {
"deal": {
"id": "del_8830",
"referenceId": 214,
"locationId": "loc_abc123",
"pipelineId": "pip_01",
"stageId": "stg_02",
"accountId": "acc_7712",
"ownerId": "emp_44f1",
"title": "Northwind — annual contract",
"value": 4800000,
"currency": "USD",
"status": "OPEN",
"probability": 60,
"expectedCloseDate": "2026-10-15T00:00:00.000Z",
"sortOrder": 0,
"wonLostReason": null,
"closedAt": null,
"stageMovedAt": "2026-08-25T10:00:00.000Z",
"createdAt": "2026-08-10T09:00:00.000Z",
"updatedAt": "2026-08-25T10:00:00.000Z"
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.