Gary Club
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/deals
Cursor-paginated; filterable by pipeline, stage, status, owner.

Query parameters

limitintegerdefault: 50
page_tokenstring
pipeline_iduuid
stage_iduuid
statusstring
One of open, won, lost.
owneruuid
qstring
Substring 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/deals
Fires deal.created. name is required; everything else has sane defaults.

Body parameters

namestringrequired
Deal title (e.g. "Acme — Pro plan").
pipeline_iduuid
Defaults to your tenant's default pipeline.
stage_iduuid
Defaults to the first stage of the pipeline.
amountnumber | null
Total contract value.
currencystringdefault: "USD"
ISO-4217.
expected_close_datedate | null
YYYY-MM-DD.
primary_contact_iduuid | null
company_iduuid | null
owner_user_iduuid | null
descriptionstring | null
tagsstring[]
custom_fieldsobject
Free-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

iduuidrequired

Body parameters

namestring
stage_iduuid
Move the deal. Must belong to the same pipeline.
amountnumber | null
expected_close_datedate | null
status"open" | "won" | "lost"
Setting won/lost is the canonical close.
close_reasonstring | null
Free-form for won/lost.
primary_contact_iduuid | null
company_iduuid | null
owner_user_iduuid | null
tagsstring[]
Replaces the entire array.
custom_fieldsobject
next_action_atdatetime | null
Set/clear the next-step reminder.
next_action_textstring | null
Free-text reminder body.
archivedboolean
Soft-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).