Records API.
The high-level endpoints for companies, contacts, deals, and activities, with the fields needed to create each record.
This page covers the endpoints that most integrations use. Every path below starts with /rest. Send the x-api-key header on each request. See the API overview for sign-in and the API reference.
Search endpoints take a POST body with paging and sorting fields. A search returns rows, total, and facetCounts.
| Field | Meaning |
|---|---|
q |
Text to match. Leave empty to match every record. |
sort |
The column to sort by. Leave empty to use the default order. |
dir |
asc or desc. |
page |
The page number, starting at 1. |
pageSize |
The number of rows per page, from 1 to 100. The default is 25. |
Companies
| Method | Path | Purpose |
|---|---|---|
POST |
/rest/companies/search |
List and filter companies. |
GET |
/rest/companies/{id} |
Read one company. |
POST |
/rest/companies |
Create a company. |
PATCH |
/rest/companies/{id} |
Update a company. |
POST |
/rest/companies/{id}/archive |
Archive a company. |
POST |
/rest/companies/{id}/restore |
Restore an archived company. |
To create a company, send name. You can also send domain and ownerId.
curl https://<your-portal>.example.com/rest/companies \
-H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"name": "Acme", "domain": "acme.example"}'const response = await fetch("https://<your-portal>.example.com/rest/companies", {
method: "POST",
headers: {
"x-api-key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Acme", domain: "acme.example" }),
});
const company = await response.json();Contacts
| Method | Path | Purpose |
|---|---|---|
POST |
/rest/contacts/search |
List and filter contacts. |
GET |
/rest/contacts/{id} |
Read one contact. |
POST |
/rest/contacts |
Create a contact. |
PATCH |
/rest/contacts/{id} |
Update a contact. |
POST |
/rest/contacts/{id}/archive |
Archive a contact. |
POST |
/rest/contacts/{id}/restore |
Restore an archived contact. |
To create a contact, send firstName. You can also send lastName, email, phone, title, companyId, and ownerId.
curl https://<your-portal>.example.com/rest/contacts \
-H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Ada",
"lastName": "Okafor",
"email": "ada@acme.example",
"companyId": "<company-id>"
}'const response = await fetch("https://<your-portal>.example.com/rest/contacts", {
method: "POST",
headers: {
"x-api-key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
firstName: "Ada",
lastName: "Okafor",
email: "ada@acme.example",
companyId: "<company-id>",
}),
});
const contact = await response.json();Deals
| Method | Path | Purpose |
|---|---|---|
POST |
/rest/deals/search |
List and filter deals. |
GET |
/rest/deals/{id} |
Read one deal. |
POST |
/rest/deals |
Create a deal. |
PATCH |
/rest/deals/{id} |
Update a deal. |
PATCH |
/rest/deals/{id}/stage |
Move a deal to another stage. |
POST |
/rest/deals/{id}/archive |
Archive a deal. |
POST |
/rest/deals/{id}/restore |
Restore an archived deal. |
To create a deal, send name and companyId. You can also send ownerId, stage, paymentType, amountCents, currency, and expectedCloseDate.
curl https://<your-portal>.example.com/rest/deals \
-H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"name": "Spring catalogue order",
"companyId": "<company-id>",
"stage": "QUALIFIED_TO_BUY",
"amountCents": 1250000,
"currency": "USD",
"expectedCloseDate": "2027-03-31"
}'const response = await fetch("https://<your-portal>.example.com/rest/deals", {
method: "POST",
headers: {
"x-api-key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Spring catalogue order",
companyId: "<company-id>",
stage: "QUALIFIED_TO_BUY",
amountCents: 1250000,
currency: "USD",
expectedCloseDate: "2027-03-31",
}),
});
const deal = await response.json();Amounts use integer cents. Dates use YYYY-MM-DD.
The stage values are:
- Open stages:
DEMO_BOOKED,QUALIFIED_TO_BUY,DECISION_MAKER_BOUGHT_IN,CONTRACT_SENT. - Closed stages:
CLOSED_WON,CLOSED_LOST. - Other stage:
UNQUALIFIED_TO_BUY.
To move a deal, send stage in the request body. Add closedReason to give the reason for the change, such as a loss.
curl https://<your-portal>.example.com/rest/deals/<deal-id>/stage \
-X PATCH \
-H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"stage": "CLOSED_WON"}'Activities
| Method | Path | Purpose |
|---|---|---|
GET |
/rest/activities |
Read the activity timeline for one company, contact, deal, or finance record. |
POST |
/rest/activities |
Log an activity, such as a note, call, email, meeting, or task. |
GET |
/rest/activities/my-tasks |
Read the open tasks assigned to the signed-in account. |
PATCH |
/rest/activities/{id}/complete |
Mark a task complete. |
Updates and exact fields
Send the fields to change in the request body of a PATCH. The API reference shows the exact body schema for each operation. Use it when you need a field that this page does not list.