Skip to main content
POST
/
deals
Create a new deal
curl --request POST \
  --url https://api.heffl.com/api/v1/deals \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "title": "<string>",
  "pipelineId": 123,
  "stageId": 123,
  "clientId": "<string>",
  "leadId": "<string>",
  "price": 123,
  "expectedCloseDate": "2023-11-07T05:31:56Z",
  "source": "<string>",
  "priority": "LOW",
  "cf_": "<unknown>"
}
'
{
  "id": "<string>",
  "title": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "number": "<string>",
  "price": 123,
  "status": "<string>",
  "priority": "<string>",
  "expectedCloseDate": "2023-11-07T05:31:56Z",
  "clientId": "<string>",
  "clientName": "<string>",
  "pipelineId": 123,
  "stageName": "<string>",
  "source": "<string>",
  "customFields": "<unknown>"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at app.heffl.com/settings/developers

Body

application/json
title
string
required

Deal title

Minimum string length: 1
pipelineId
number
required

Pipeline ID

stageId
number
required

Pipeline stage ID

clientId
string
required

Client public ID (required)

leadId
string

Lead public ID

price
number

Deal value/price

expectedCloseDate
string<date-time>

Expected close date

source
string

Deal source name. Creates if not found.

priority
enum<string>

Deal priority

Available options:
LOW,
MEDIUM,
HIGH
cf_
any | null

Custom fields, that start with cf_

{key}
any

Response

200 - application/json

OK

id
string
required

Deal ID

title
string
required

Deal title

createdAt
string<date-time>
required

When the deal was created

number
string | null

Auto-generated deal number

price
number | null

Deal price/value

status
string | null

Deal status

priority
string | null

Deal priority

expectedCloseDate
string<date-time> | null

Expected close date

clientId
string | null

Client public ID

clientName
string | null

Client name

pipelineId
number | null

Pipeline ID

stageName
string | null

Current stage name

source
string | null

Deal source name

customFields
any | null

Custom field values