Skip to main content

Accounts

Accounts represent companies or organizations. They support full CRUD, query, _assert, relationships, and domain sub-resources.

Supported actions

ActionEndpoint
CreatePOST /api/v2/account
ReadGET /api/v2/account/{account_id}
QueryPOST /api/v2/account/_query
UpdatePATCH /api/v2/account/{account_id}
ArchiveDELETE /api/v2/account/{account_id}
Create or updatePOST /api/v2/account/_assert
Relationships/api/v2/account/{account_id}/relationship/{api_name}
Domains/api/v2/account/{account_id}/attribute/domains

Common fields

FieldValue typeNotes
display_namestringAccount name
domainsaccount_domain[]Managed through the domains sub-resource
descriptionlong_textWritable
current_stage_idaccount_stageAccount lifecycle stage
owner_user_idrecord_referenceOwner user reference
created_at, updated_attimestampSystem fields
Use GET /api/v2/_schema/account for the complete field list in your workspace. Use domain_name as the _assert match key and inside /attribute/domains requests, not as a direct account attributes field.

Create-or-update by domain

{
  "match": {
    "domain_name": "acme.com"
  },
  "attributes": {
    "display_name": "Acme",
    "current_stage_id": "target_account",
    "description": "Enterprise software company"
  }
}

Contacts relationship

Accounts expose typed contact relationship routes.
GET  /api/v2/account/{account_id}/relationship/contacts
POST /api/v2/account/{account_id}/relationship/contacts

Domains

Use domain sub-resource endpoints when you need to add, remove, or set a primary domain.
{
  "domain_name": "acme.com"
}
Only domains is routed as an account attribute sub-resource today. To promote a domain to primary, patch /api/v2/account/{account_id}/attribute/domains/{domain_name} with {"is_primary": true}.

Common errors

Error codeUsually means
ambiguous_match_assert or related_record_match found more than one account
unknown_fieldField is not in account schema
field_not_updatableRequest tried to write a computed or system field
target_record_not_foundRelationship target did not resolve