Resource
Deals
Revenue opportunities tied to a pipeline + stage. Every PATCH that changes stage_id fires deal.stage_changed so n8n / Claude flows can react.
Pipelines drive everything
Each tenant has at least one pipeline with ordered stages. If you don't pass
pipeline_id on create, we'll use the default pipeline; if you don't pass stage_id, we use the first stage. Read /v1/crm/pipelines to discover the IDs.List deals#
List deals
GET
/v1/crm/dealsCursor-paginated; filterable by pipeline, stage, status, owner.
Query parameters
limitintegerdefault: 50page_tokenstringpipeline_iduuidstage_iduuidstatusstringOne of
open, won, lost.owneruuidqstringSubstring on name.
Request
curl "https://agency.gary.club/api/public/v1/crm/deals?status=open&limit=20" \
-H "Authorization: Bearer gc_live_EXAMPLE_AbCdEfGhIj0123456789"Create a deal#
Open a new opportunity
POST
/v1/crm/dealsFires
deal.created. name is required; everything else has sane defaults.Body parameters
namestringrequiredDeal title (e.g. "Acme — Pro plan").
pipeline_iduuidDefaults to your tenant's default pipeline.
stage_iduuidDefaults to the first stage of the pipeline.
amountnumber | nullTotal contract value.
currencystringdefault: "USD"ISO-4217.
expected_close_datedate | nullYYYY-MM-DD.
primary_contact_iduuid | nullcompany_iduuid | nullowner_user_iduuid | nulldescriptionstring | nulltagsstring[]custom_fieldsobjectFree-form jsonb. Schema is per-tenant.
Request
curl -X POST https://agency.gary.club/api/public/v1/crm/deals \
-H "Authorization: Bearer gc_live_EXAMPLE_AbCdEfGhIj0123456789" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme — Pro plan",
"primary_contact_id": "con_EXAMPLE_aaaa",
"company_id": "com_EXAMPLE_bbbb",
"amount": 12000,
"currency": "USD",
"expected_close_date": "2026-06-30"
}'Move a stage#
Update fields and/or move stage
PATCH
/v1/crm/deals/{id}PATCH any subset of mutable fields. Changing
stage_id fires deal.stage_changed with prior_stage_id and new_stage_id in the payload — perfect for n8n “when a deal moves to Negotiation” flows.Path parameters
iduuidrequiredBody parameters
namestringstage_iduuidMove the deal. Must belong to the same pipeline.
amountnumber | nullexpected_close_datedate | nullstatus"open" | "won" | "lost"Setting won/lost is the canonical close.
close_reasonstring | nullFree-form for won/lost.
primary_contact_iduuid | nullcompany_iduuid | nullowner_user_iduuid | nulltagsstring[]Replaces the entire array.
custom_fieldsobjectnext_action_atdatetime | nullSet/clear the next-step reminder.
next_action_textstring | nullFree-text reminder body.
archivedbooleanSoft-delete shortcut.
Request
curl -X PATCH \
https://agency.gary.club/api/public/v1/crm/deals/dl_EXAMPLE_xyz \
-H "Authorization: Bearer gc_live_EXAMPLE_AbCdEfGhIj0123456789" \
-H "Content-Type: application/json" \
-d '{ "stage_id": "stg_EXAMPLE_negotiation" }'Webhooks for deals#
deal.created— emitted on POST.deal.stage_changed— emitted on PATCH only when stage_id actually changes (sending the same id is a no-op event-wise).

