Skip to main content
POST
/
companies
Create company
curl --request POST \
  --url https://api.heffl.com/api/v2/companies \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "email": "[email protected]",
  "phone": "<string>",
  "taxNumber": "<string>",
  "website": "<string>",
  "description": "<string>",
  "linkedin": "<string>",
  "currency": "<string>",
  "openingBalance": 1,
  "showJobAmountToWorker": true,
  "isClientPortalEnabled": true,
  "internalNotes": "<string>",
  "stageId": "<string>",
  "ownerUserId": "<string>",
  "vendorId": "<string>",
  "sourceId": "<string>",
  "billingAddress": {
    "city": "<string>",
    "address": "<string>",
    "landmark": "<string>",
    "state": "<string>",
    "country": "<string>",
    "postalCode": "<string>"
  },
  "primaryContact": {}
}
'
{
  "id": "<string>",
  "name": "<string>",
  "number": "<string>",
  "openingBalance": 123,
  "showJobAmountToWorker": true,
  "isClientPortalEnabled": true,
  "email": "<string>",
  "phone": "<string>",
  "taxNumber": "<string>",
  "website": "<string>",
  "description": "<string>",
  "stageId": "<string>",
  "stageName": "<string>",
  "ownerUserId": "<string>",
  "crmSourceId": "<string>",
  "sourceName": "<string>",
  "currency": "<string>",
  "internalNotes": "<string>",
  "linkedin": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

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

Body

application/json
name
string
required

Company name

email
string<email> | null

Email address

phone
string

Phone number with country code

taxNumber
string

Tax number

website
string<uri>

Website URL

description
string

Description

linkedin
string<uri>

LinkedIn URL

currency
string

3-letter ISO currency code

openingBalance
number

Opening balance

Required range: x >= 0
showJobAmountToWorker
boolean

Whether job amounts are visible to field workers

isClientPortalEnabled
boolean

Whether the client portal is enabled

internalNotes
string

Internal notes

stageId
string

Client stage ID

ownerUserId
string

Owner user ID

vendorId
string

Vendor ID

sourceId
string

CRM source ID

billingAddress
object
primaryContact
object

Optional primary contact to create with the company

{key}
any

Custom field values using cf_* keys (for example cf_industry). Only documented fields and cf_* keys are accepted.

Response

OK

id
string
required

Company ID

name
string
required

Company name

number
string
required

Auto-generated company number

openingBalance
number
required

Opening balance

showJobAmountToWorker
boolean
required

Whether job amounts are visible to field workers

isClientPortalEnabled
boolean
required

Whether the client portal is enabled

type
enum<string> | null

Record type (always company for this endpoint)

Available options:
contact,
company
email
string | null

Email address

phone
string | null

Phone number

taxNumber
string | null

Tax number

website
string | null

Website URL

description
string | null

Description

stageId
string | null

Client stage ID

stageName
string | null

Client stage label

ownerUserId
string | null

Owner user ID

crmSourceId
string | null

CRM source ID

sourceName
string | null

CRM source name

currency
string | null

Currency code

internalNotes
string | null

Internal notes

linkedin
string | null

LinkedIn URL

createdAt
string<date-time>

When the company was created

updatedAt
string<date-time>

When the company was last updated

{key}
any

Custom field values as top-level cf_* keys (for example cf_industry). There is no customFields wrapper.