Deals

Create Deal

Create a new deal. Defaults to the org's default pipeline and first stage if not specified.

background_tasks carries the deal.created event only (#16242). Like the PATCH endpoint's stage fan-out it is injected, not a body field, so it does not appear in the OpenAPI schema and the request contract is unchanged. Queuing it there rather than publishing inline keeps the Redis round trip off the caller's latency budget and makes "strictly after the commit" structural: the task is queued only once the session context has exited, and FastAPI attaches background tasks to the SUCCESS response, so a raise anywhere above publishes nothing.

post/deals

Request

  • Base URL: https://be.graph8.com/api/v1
  • URL: https://be.graph8.com/api/v1/deals
  • Auth: HTTP bearer

Headers

Authorizationstring nullable
X-Target-Org-Idstring nullable

Request body

namestring required

Deal name

company_idinteger nullable

Deprecated: the company is derived from the contacts. If sent, it must match; otherwise omit it.

descriptionstring nullable

Deal description

amountnumber nullable

Deal monetary value

currencystring nullable

Currency code (default: USD)

stage_idstring nullable

Stage ID (from /deals/pipelines)

pipeline_idstring nullable

Pipeline ID (defaults to org default)

close_datestring nullable

Expected close date (ISO 8601)

owner_idstring required

Deal owner (user id or email). Required.

contact_idsinteger[] required

mashup_contact_ids to associate with the deal (>=1 required; all must share one company)

allow_duplicateboolean

Set true to create a deal even if one already exists for the company

Response

Successful Response

Changes

No recorded changes to this operation across all 2 revisions of this API.