Hanzo AI
OpenapiCrm

Create opportunities

Adds a deal to the caller's org and answers 201 with the stored record.

POST /v1/crm/opportunities

Addresshttps://api.hanzo.ai/v1/crm/opportunities
MethodPOST
Operationpost_crm_opportunities
AuthAuthorization: Bearer $HANZO_API_KEY

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

8 fields, body application/json (required).

FieldInTypeRequiredDescription
amountbodyinteger—Amount is the deal value in minor units (cents) of Currency.
closeDatebodyinteger—CloseDate is the expected close, as a unix second (0 = unset).
companyIdbodystring—CompanyID links the deal to one of the org's companies.
currencybodystring—Currency is the ISO code Amount is denominated in; empty defaults to USD.
idbodystring—ID names the opportunity to update and comes from the path.
namebodystring—Name is the deal name.
pointOfContactIdbodystring—PointOfContact links the deal to one of the org's contacts.
stagebodystring—Stage is the pipeline stage: NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER (case-insensitive).

Response

StatusBodyMeaning
201Opportunitycreated

201 body — 10 fields.

FieldInTypeAlwaysDescription
amountbodyinteger—Amount is the deal value in minor units (cents) of Currency.
closeDatebodyinteger—CloseDate is the expected close as a unix second (0 = unset).
companyIdbodystring—CompanyID links the deal to one of the org's companies; empty when unlinked, and cleared when that company is deleted.
createdAtbodyinteger—CreatedAt is the unix second the opportunity was created.
currencybodystring—Currency is the ISO code Amount is denominated in; a write that names none stores USD.
idbodystring—ID is the server-minted opportunity id ("oppo_" + 128 random bits).
namebodystring—Name is the deal name.
pointOfContactIdbodystring—PointOfContact links the deal to one of the org's contacts; empty when unlinked, and cleared when that contact is deleted.
stagebodystring—Stage is the pipeline stage, always one of NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER — stored upper-case whatever case the write used.
updatedAtbodyinteger—UpdatedAt is the unix second of the last write.

Failure carries the platform error shape — see Errors.

Examples

hanzo crm opportunities create

CRM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page