Gary Club
Resource

Companies

Accounts on the CRM. Idempotent upsert by domain — calling POST twice with the same domain merges instead of duplicating.

Auto-resolution from contacts
When you POST a contact with company_name but no company_id, we resolve / create the company by inferring its domain from the contact's email. You rarely need to call this endpoint directly — it's here for cases where the company arrives independently of a contact.

List companies#

Paginated list with name + domain search

GET/v1/crm/companies

Query parameters

limitintegerdefault: 50
1–200
page_tokenstring
Cursor from prior page.
qstring
Substring match across name and domain.

Create / upsert#

Idempotent upsert by domain

POST/v1/crm/companies
name is required. If you supply domain, we treat it as the identity — existing rows merge in the new fields and return created: false.

Body parameters

namestring
Required.
domainstring
Identity for upsert. Strip the protocol and path.
websitestring
Full URL with protocol.
industrystring
Free-form. Used by AI Gist for context.
descriptionstring
Internal notes; surfaced to the agent during calls.
sourcestring
Default public_api.
Request
curl -X POST https://agency.gary.club/api/public/v1/crm/companies \
  -H "Authorization: Bearer gc_live_EXAMPLE_AbCdEfGhIj0123456789" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Plumbing",
    "domain": "acmeplumbing.example.com",
    "website": "https://acmeplumbing.example.com",
    "industry": "Plumbing",
    "description": "60-vehicle home services co — primary contact is the owner."
  }'
Response
{
  "company": {
    "id": "comp_EXAMPLE_aaaa",
    "client_id": "00000000-0000-0000-0000-000000000000",
    "name": "Acme Plumbing",
    "domain": "acmeplumbing.example.com",
    "website": "https://acmeplumbing.example.com",
    "industry": "Plumbing",
    "description": "60-vehicle home services co …",
    "created_at": "2026-04-28T01:18:53.000Z",
    "updated_at": "2026-04-28T01:18:53.000Z"
  },
  "created": true
}

Read one#

Single company

GET/v1/crm/companies/{id}

Path parameters

iduuidrequired
Company id.

Update#

Update mutable fields

PATCH/v1/crm/companies/{id}

Path parameters

iduuidrequired

Body parameters

namestring
domainstring | null
Set null to unlink.
websitestring | null
industrystring | null
business_descriptionstring | null
archivedboolean
Soft-delete shortcut. Sets archived_at.

Archive#

Soft-archive

DELETE/v1/crm/companies/{id}
Sets archived_at to now. Existing contact links are preserved; un-archive via PATCH archived=false.

Path parameters

iduuidrequired
  • Contacts — link contacts to a company by id.
  • AI Gist — POST /v1/ai/companies/{id}/gist for an AI summary.
  • Deals — deals roll up to a company.

Webhooks for companies#

  • company.created — new domain in the tenant.
  • company.updated — any subsequent change to mutable fields.