Hanzo
OpenapiCrm

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

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
amountbodyintegerAmount is the deal value in minor units (cents) of Currency.
closeDatebodyintegerCloseDate is the expected close, as a unix second (0 = unset).
companyIdbodystringCompanyID links the deal to one of the org's companies.
currencybodystringCurrency is the ISO code Amount is denominated in; empty defaults to USD.
idbodystringID names the opportunity to update and comes from the path.
namebodystringName is the deal name.
pointOfContactIdbodystringPointOfContact links the deal to one of the org's contacts.
stagebodystringStage is the pipeline stage: NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER (case-insensitive).

Response

StatusBodyMeaning
201Opportunitycreated

201 body — 10 fields.

FieldInTypeAlwaysDescription
amountbodyintegerAmount is the deal value in minor units (cents) of Currency.
closeDatebodyintegerCloseDate is the expected close as a unix second (0 = unset).
companyIdbodystringCompanyID links the deal to one of the org's companies; empty when unlinked, and cleared when that company is deleted.
createdAtbodyintegerCreatedAt is the unix second the opportunity was created.
currencybodystringCurrency is the ISO code Amount is denominated in; a write that names none stores USD.
idbodystringID is the server-minted opportunity id ("oppo_" + 128 random bits).
namebodystringName is the deal name.
pointOfContactIdbodystringPointOfContact links the deal to one of the org's contacts; empty when unlinked, and cleared when that contact is deleted.
stagebodystringStage is the pipeline stage, always one of NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER — stored upper-case whatever case the write used.
updatedAtbodyintegerUpdatedAt 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