Docs

Docs

x-cpod-domain: customer

Customer

CRM — accounts, contacts, deals, activities, quotes, line items.

Try in explorer client.customer

Account

A customer organization.

REST path/api/v1/crm/accounts
Operations
listgetcreateupdatedelete
SDK
// list — returns only your records; add filters/search:
await client.customer.accounts.list()

// create:
await client.customer.accounts.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
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_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
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.
owner_idstringAccount owner / account executive. Format: usr-<uuid>.
namestringCompany or customer display name.
legal_namestringFull registered legal name of the company.
industrystringNAICS code or free-text industry classification.
sub_industrystringSecondary industry classification within the primary industry.
websitestringPrimary public website URL.
domainstringEmail domain used for auto-associating contacts to this account.
phonestringMain company phone number.
addressesjsonPhysical addresses associated with the account (billing, shipping, office).
annual_revenuenumberEstimated annual revenue in USD.
employee_countnumberApproximate number of employees.
lifecycle_stagestringCurrent stage of the customer relationship lifecycle.
lead_sourcestringHow this account was first acquired (e.g. inbound, event, referral, outbound, rfp).
health_scorestringCustomer health indicator set by customer success.
parent_account_idstringID of the holding/parent account for subsidiary hierarchy. Format: acc-<uuid>.
descriptionstringFree-text notes about this account.
last_activity_atdate-timeTimestamp of the most recent logged activity against this account.
first_contacted_atdate-timeTimestamp when this account was first contacted.
custom_fieldsjsonPer-tenant schema extension for additional fields.
tagsjsonFree-form string tags for filtering and grouping.
versionnumberOptimistic-concurrency version counter.

Contact

A person at a customer account.

REST path/api/v1/crm/contacts
Operations
listgetcreateupdatedelete
SDK
// list — returns only your records; add filters/search:
await client.customer.contacts.list()

// create:
await client.customer.contacts.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
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_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
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 contact belongs to. Null for unattached/orphan contacts. Format: acc-<uuid>.
first_namestringGiven name.
last_namestringFamily name.
display_namestringDisplay name. Computed from firstName + lastName if blank.
emailemailWork email address. Unique within (tenantId, accountId).
phonestringPhone number in E.164 format.
job_titlestringJob title at their company.
senioritystringSeniority level at the contact's company.
decision_rolestringRole this contact plays in deal decisions.
is_primarybooleanTrue if this is the primary contact at the account.
linkedin_urlstringLinkedIn profile URL.
reports_to_contact_idstringContact ID of this person's manager within the account.
last_interaction_atdate-timeTimestamp of the most recent interaction with this contact.
opted_inbooleanWhether this contact has opted in to marketing communications (GDPR/CASL).
opted_in_atdate-timeTimestamp when the opt-in was recorded.
gdpr_consentjsonGDPR/CASL consent record.
custom_fieldsjsonPer-tenant schema extension for additional fields.
tagsjsonFree-form string tags.
versionnumberOptimistic-concurrency version counter.

Deal

A sales opportunity against an Account.

REST path/api/v1/crm/deals
Operations
listgetcreateupdatedelete
SDK
// list — returns only your records; add filters/search:
await client.customer.deals.list()

// create:
await client.customer.deals.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
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_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
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.

Activity

A logged interaction (call, meeting, email).

REST path/api/v1/crm/activities
Operations
listgetcreate
SDK
// list — returns only your records; add filters/search:
await client.customer.activities.list()

// create:
await client.customer.activities.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
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_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
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 activity is logged against. At least one of accountId, dealId, contactId must be set.
deal_idstringDeal this activity is logged against.
contact_idstringPrimary contact involved in this activity.
contact_idsjsonAll contacts present in this activity.
activity_typestringType of touchpoint.
subjectstringShort subject or title of the activity.
descriptionstringDetailed notes. Markdown allowed.
activity_datedate-timeWhen the activity happened.
due_datedate-timeDue date for task-type activities.
completed_atdate-timeTimestamp when the activity was completed.
statusstringLifecycle status of this activity.
prioritystringPriority of this activity.
directionstringCommunication direction, applicable for calls and emails.
outcomestringOutcome of the activity.
actor_typestringWho or what performed this activity.
performed_by_user_idstringUser ID of the person or service account that performed this activity.
participantsjsonAll participants in this activity (users and contacts).
linked_trace_idstringTrace ID if this activity was AI-authored; references the Telemetry Trace entity.
attachment_refsjsonMinIO object keys for attached files.
recurrencejsonRecurrence schedule for repeating activities.
reminder_sentbooleanWhether a reminder notification has been sent for this activity.
custom_fieldsjsonPer-tenant schema extension (e.g. gongCallId, duration_minutes).
tagsjsonFree-form string tags.
versionnumberOptimistic-concurrency version counter.
typeenumShort activity type classification.callemailmeetingnotetask
owner_iduuidUser who owns this activity. Format: usr-<uuid>.
notesstringFree-text notes on the activity.
occurred_atdate-timeWhen the activity occurred.

Quote

A pricing proposal / quote against an account (and optionally a deal).

REST path/api/v1/crm/quotes
Operations
listgetcreateupdatedelete
SDK
// list — returns only your records; add filters/search:
await client.customer.quotes.list()

// create:
await client.customer.quotes.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
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_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
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.
owner_idstringQuote owner / salesperson. Format: usr-<uuid>.
namestringHuman-readable quote name.
quote_numberstringHuman-readable quote number, unique per tenant (e.g. Q-2026-00892).
account_idstringAccount this quote is for. Format: acc-<uuid>.
deal_idstringDeal this quote belongs to, if any. Format: deal-<uuid>.
valuenumberTotal quote value after discounts.
currencystringISO 4217 currency code.
statusstringLifecycle status: draft, sent, accepted, rejected, expired.
date_issueddate-timeWhen the quote was issued.
validity_datedate-timeDate after which the quote expires.
contract_durationstringContract term the quote covers (e.g. '12 months').
is_primarybooleanTrue if this is the primary quote on the deal.
notesstringFree-text notes or special terms.
line_itemsjsonEmbedded line-item summaries. Full records via /api/v1/crm/line-items.
custom_fieldsjsonPer-tenant schema extension.
tagsjsonFree-form string tags.
versionnumberOptimistic-concurrency version counter.
totalnumberTotal quote amount.
valid_untildate-timeDate after which the quote is no longer valid.

LineItem

A first-class line item belonging to a Quote.

REST path/api/v1/crm/line-items
Operations
listgetcreateupdatedelete
SDK
// list — returns only your records; add filters/search:
await client.customer.lineItems.list()

// create:
await client.customer.lineItems.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
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_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
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.
quote_idstringQuote this line item belongs to. Format: qte-<uuid>.
descriptionstringLine item description.
quantitynumberQuantity.
unit_pricenumberPrice per unit.
discountnumberPer-line discount amount or percentage.
totalnumberLine total after discount.
versionnumberOptimistic-concurrency version counter.
currencystringISO 4217 currency code.