Crm
Package crm is your sales pipeline: the companies, the people, the deals in play.
Package crm is your sales pipeline: the companies, the people, the deals in play.
| Base URL | https://api.hanzo.ai |
| Operations | 20 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
crm
GET /v1/crm/applications/{id}
Returns one Startup Program application with its AI screen and stage history. An id belonging to another org reads as not found.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the record to act on, from the path. |
PATCH /v1/crm/applications/{id}
Moves one Startup Program application through the pipeline. The
move is recorded on the application's timeline, attributed to the calling
staff user: it may advance exactly one stage, go back to any earlier stage,
reject from any non-rejected stage, or reopen a rejected application to
applied; anything else is refused. Rejecting requires a reason. A note with
no stage change is still recorded.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the application to move, from the path. |
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
id | string | — | ID is the application to move, from the path. |
note | string | — | Note is a free-text comment recorded on the timeline, with or without a stage change. |
reason | string | — | Reason records WHY, and is required to reject. |
stage | string | — | Stage is the stage to move to: applied, screened, qualified, credits-offered, onboarded or rejected. |
GET /v1/crm/applications
Returns the org's Startup Program applications, newest first. Each carries its AI screen and its stage history; a stage narrows the page to one pipeline stage.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
stage | query | string | — | Stage returns only the applications at that pipeline stage when set: applied, screened, qualified, credits-offered,… |
limit | query | integer | — | Limit caps the rows returned: 200 by default, 1000 at most. |
POST /v1/crm/applications
Apply to the Startup Program from the public form
Files an application to the Startup Program and answers the id and pipeline stage it landed at.
This is the ONE unauthenticated route in crm. It takes no principal and never reads a caller org: the application is filed against the DEPLOYMENT's own program org — the brand, hanzo unless white-labelled — so there is no tenant to name and none to leak. Reading the application back is staff-only and lives elsewhere.
company, contactName and a parseable email are required; everything else is optional context. Re-submitting the same (email, company) REFRESHES the existing application instead of filing a second one, so an impatient applicant cannot duplicate their own lead — that is a 200 where a first submission is a 201. A filled hp honeypot field is answered exactly like a success and stored nowhere, so a bot cannot tell a drop from an accept.
Filing is not screening: the application lands at stage applied with its AI screen still pending, and the screen runs afterwards on its own clock. A company and contact are also projected into the program org's ordinary CRM lists, best-effort — that projection failing does not fail the application. Bodies over 64 KiB are refused, and submissions are rate-limited.
GET /v1/crm/companies/{id}
Returns one of the caller org's companies. An id belonging to another org reads as not found.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the record to act on, from the path. |
PUT /v1/crm/companies/{id}
Replaces one of the caller org's companies. Every writable field is taken from the request, so a field the request omits is CLEARED — send the whole record. A name is required.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID names the company to update and comes from the path. |
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
arr | integer | — | ARR is annual recurring revenue in minor units (cents) of Currency. |
city | string | — | City is the head-office city. |
country | string | — | Country is the head-office country. |
currency | string | — | Currency is the ISO code ARR is denominated in; empty defaults to USD. |
domainName | string | — | DomainName is the company's primary domain, e.g. |
employees | integer | — | Employees is the headcount. |
id | string | — | ID names the company to update and comes from the path. |
idealCustomerProfile | boolean | — | ICP marks the company as an ideal-customer-profile fit. |
linkedinLink | string | — | Linkedin is the company's LinkedIn URL. |
name | string | — | Name is the company name. |
xLink | string | — | XLink is the company's X (Twitter) URL. |
DELETE /v1/crm/companies/{id}
Removes one of the caller org's companies and answers 204. Any contact or opportunity in the org that referenced it keeps existing with the reference cleared, so nothing is left pointing at a company that is gone.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the record to act on, from the path. |
GET /v1/crm/companies
Returns the caller org's companies, most recently updated first.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | — | Limit caps the rows returned: 200 by default, 1000 at most. |
POST /v1/crm/companies
Adds a company to the caller's org and answers 201 with the stored record. A name is required; an empty currency defaults to USD.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
arr | integer | — | ARR is annual recurring revenue in minor units (cents) of Currency. |
city | string | — | City is the head-office city. |
country | string | — | Country is the head-office country. |
currency | string | — | Currency is the ISO code ARR is denominated in; empty defaults to USD. |
domainName | string | — | DomainName is the company's primary domain, e.g. |
employees | integer | — | Employees is the headcount. |
id | string | — | ID names the company to update and comes from the path. |
idealCustomerProfile | boolean | — | ICP marks the company as an ideal-customer-profile fit. |
linkedinLink | string | — | Linkedin is the company's LinkedIn URL. |
name | string | — | Name is the company name. |
xLink | string | — | XLink is the company's X (Twitter) URL. |
GET /v1/crm/contacts/{id}
Returns one of the caller org's contacts. An id belonging to another org reads as not found.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the record to act on, from the path. |
PUT /v1/crm/contacts/{id}
Replaces one of the caller org's contacts. Every writable field is taken from the request, so a field the request omits is CLEARED — send the whole record. One of firstName, lastName or email is required.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID names the contact to update and comes from the path. |
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
city | string | — | City is where the person is based. |
companyId | string | — | CompanyID links the contact to one of the org's companies. |
email | string | — | Email is the person's email address. |
firstName | string | — | FirstName is the person's given name. |
id | string | — | ID names the contact to update and comes from the path. |
jobTitle | string | — | JobTitle is the person's role at their company. |
lastName | string | — | LastName is the person's family name. |
linkedinLink | string | — | Linkedin is the person's LinkedIn URL. |
phone | string | — | Phone is the person's phone number. |
xLink | string | — | XLink is the person's X (Twitter) URL. |
DELETE /v1/crm/contacts/{id}
Removes one of the caller org's contacts and answers 204. Any opportunity in the org that named it point of contact keeps existing with that reference cleared.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the record to act on, from the path. |
GET /v1/crm/contacts
Returns the caller org's contacts, most recently updated first. A companyId narrows the page to the people at that company.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
companyId | query | string | — | CompanyID returns only the contacts at that company when set. |
limit | query | integer | — | Limit caps the rows returned: 200 by default, 1000 at most. |
POST /v1/crm/contacts
Adds a person to the caller's org and answers 201 with the stored record. One of firstName, lastName or email is required, and a companyId must name a company in the same org.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
city | string | — | City is where the person is based. |
companyId | string | — | CompanyID links the contact to one of the org's companies. |
email | string | — | Email is the person's email address. |
firstName | string | — | FirstName is the person's given name. |
id | string | — | ID names the contact to update and comes from the path. |
jobTitle | string | — | JobTitle is the person's role at their company. |
lastName | string | — | LastName is the person's family name. |
linkedinLink | string | — | Linkedin is the person's LinkedIn URL. |
phone | string | — | Phone is the person's phone number. |
xLink | string | — | XLink is the person's X (Twitter) URL. |
GET /v1/crm/opportunities/{id}
Returns one of the caller org's deals. An id belonging to another org reads as not found.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the record to act on, from the path. |
PUT /v1/crm/opportunities/{id}
Replaces one of the caller org's deals. Every writable field is taken from the request, so a field the request omits is CLEARED — send the whole record. A name is required and the stage must be a pipeline stage.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID names the opportunity to update and comes from the path. |
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
amount | integer | — | Amount is the deal value in minor units (cents) of Currency. |
closeDate | integer | — | CloseDate is the expected close, as a unix second (0 = unset). |
companyId | string | — | CompanyID links the deal to one of the org's companies. |
currency | string | — | Currency is the ISO code Amount is denominated in; empty defaults to USD. |
id | string | — | ID names the opportunity to update and comes from the path. |
name | string | — | Name is the deal name. |
pointOfContactId | string | — | PointOfContact links the deal to one of the org's contacts. |
stage | string | — | Stage is the pipeline stage: NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER (case-insensitive). |
DELETE /v1/crm/opportunities/{id}
Removes one of the caller org's deals and answers 204.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the record to act on, from the path. |
GET /v1/crm/opportunities
Returns the caller org's deals, most recently updated first. A stage narrows the page to one pipeline stage.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
stage | query | string | — | Stage returns only the opportunities at that pipeline stage when set (NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER;… |
limit | query | integer | — | Limit caps the rows returned: 200 by default, 1000 at most. |
POST /v1/crm/opportunities
Adds a deal to the caller's org and answers 201 with the stored record. A name is required; the stage defaults to NEW; companyId and pointOfContactId must name records in the same org.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
amount | integer | — | Amount is the deal value in minor units (cents) of Currency. |
closeDate | integer | — | CloseDate is the expected close, as a unix second (0 = unset). |
companyId | string | — | CompanyID links the deal to one of the org's companies. |
currency | string | — | Currency is the ISO code Amount is denominated in; empty defaults to USD. |
id | string | — | ID names the opportunity to update and comes from the path. |
name | string | — | Name is the deal name. |
pointOfContactId | string | — | PointOfContact links the deal to one of the org's contacts. |
stage | string | — | Stage is the pipeline stage: NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER (case-insensitive). |
GET /v1/crm/summary
Summary counts the caller org's CRM records: companies, contacts, opportunities.
How is this guide?