Playground

Playground

Deal

/api/v1/crm/deals

A sales opportunity against an Account.

listgetcreateupdatedelete

Schema

FieldTypeNotes
id*uuidServer-assigned ULID with type prefix (e.g. per_…).
tenant_id*stringTenant scope — auto-stamped from the caller's JWT.
app_idstringApp scope. Stamped ONLY when the caller's JWT was minted for a specific Application (integration API keys). Absent for human-user sessions. Filters reads when present.
created_at*date-timeServer stamp.
updated_at*date-timeServer stamp; updated on every patch.
created_byuuidPerson id from the caller's JWT (sub).
updated_byuuidPerson id from the last writer's JWT (sub).
sourcestringProvenance tag — defaults to 'edm'.
source_typeenumfrontend | backend | server | system | apiWhere the write originated. Defaults to 'api'.
is_deletedbooleanSoft-delete flag. Excluded from default list queries.
deleted_atdate-timeStamped when soft-deleted; null otherwise.
deleted_byuuidPerson id who soft-deleted; null otherwise.
schema_versionnumberDocument schema version. Bumped on incompatible writes.
account_idstringAccount this deal belongs to. Format: acc-<uuid>.
owner_idstringDeal owner (AE). Format: usr-<uuid>.
namestringHuman-readable deal name.
deal_numberstringHuman-readable deal number, unique per tenant (e.g. DEAL-2026-00417).
pipeline_idstringPipeline this deal belongs to, for tenants with multiple pipelines.
stagestringCurrent stage of the deal in the pipeline.
valuenumberDeal amount.
currencystringISO 4217 currency code.
probabilitynumberWin probability percentage (0–100).
forecast_categorystringForecast category for revenue planning.
expected_close_datedate-timeExpected close date (ISO 8601 date).
actual_close_datedate-timeActual close date, set on closed_won or closed_lost.
next_followup_datedate-timeDate of the next scheduled follow-up.
deal_typestringClassification of the deal's business motion.
deal_sourcestringHow this deal was sourced (e.g. inbound, rfp, referral, outbound).
competitorsjsonNames of competing vendors in this deal.
loss_reasonstringFree-text explanation of why the deal was lost. Required when stage=closed_lost.
loss_categorystringCategorical reason for loss. Required when stage=closed_lost.
closure_notesstringNotes recorded at deal closure.
primary_contact_idstringPrimary contact at the account for this deal. Format: con-<uuid>.
contact_idsjsonAll contact stakeholders involved in this deal. Format: con-<uuid>.
rfp_record_idstringRFP record ID if this deal was sourced from an RFP. Format: rfp-<uuid>.
quote_idsjsonLinked quote or line-item IDs.
proposal_idsjsonLinked proposal document IDs.
attachment_refsjsonMinIO object keys for attached files (e.g. MSA, NDAs).
linked_task_idsjsonFollow-up task IDs. Format: tsk-<uuid>.
audit_logjsonInline stage-transition history. One entry per stage change.
custom_fieldsjsonPer-tenant schema extension (e.g. risk_score, executive_summary, rfp_status, bid_decision).
tagsjsonFree-form string tags.
versionnumberOptimistic-concurrency version counter.

API

client.customer.deals.*
Loading manifest…