{"openapi":"3.1.0","info":{"title":"AiTrillion CRM Public API \u2014 Read","version":"v1","summary":"Read-only access to your CRM: records, schema, reports, analytics, dashboards, campaigns, segments, contact lists and workflows.","description":"Read-only access to your AiTrillion CRM data.\n\nEvery endpoint here answers questions \u2014 none of them create, update, delete or\nsend anything. This is the same surface the **CRM Copilot** and any external\n**MCP client** (Claude Desktop, Cursor) read through, so what you can see here\nis exactly what an AI assistant connected to your CRM can see.\n\n## Authentication\n\nEvery endpoint except this document needs `Authorization: Bearer <token>`. Two\nkinds of token are accepted, and which one you use decides what you can reach.\n\n**1. A Personal Access Token** \u2014 for integrations, scripts and MCP clients.\n\n```http\nAuthorization: Bearer cak_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\nCreate one under **Settings \u2192 API Keys**. It is shown **once** at creation, so\nstore it immediately. Its scopes are frozen when it is minted, it counts against\nyour plan's API quota, and it can carry an IP allowlist.\n\n**2. Your CRM login token** \u2014 for trying things out, and for scripts run as\nyourself. Any signed-in user's dashboard JWT works here as-is, with no key to\ncreate. Scopes are resolved **live** from your own profile permissions on every\nrequest, so this token reaches exactly what you can reach in the CRM UI, and a\npermission revoked a minute ago applies to the next call. It does not consume\nyour plan's API quota. It expires when your session does, and logging out\nrevokes it immediately.\n\nPress **Authorize** above and paste either one to try requests straight from\nthis page; it persists across reloads.\n\n> While a support session is impersonating an account, this token is read-only \u2014\n> writes return **403 `IMPERSONATION_READ_ONLY`**.\n\n## Scopes\n\nEach operation names the scope it needs, e.g. `crm.contacts.read`. Where those\nscopes come from depends on the token:\n\n- **Personal Access Token** \u2014 the set chosen at creation, bounded by what its\n  creator personally held. A key created by a restricted user is a restricted\n  key, and the set never changes afterwards, so widen it by issuing a new key.\n- **Login token** \u2014 derived live from your profile: `crm.<module>.read` for\n  every module you can view, plus the reporting and marketing areas your feature\n  permissions allow. (It also carries the `.write` \/ `.delete` scopes matching\n  your create\/edit\/delete rights, for the write endpoints this read-focused\n  document does not describe.)\n\nRecord-level access follows the acting user either way: an `own`\/`team` user\nsees only the records they could see in the CRM UI.\n\nCalling an endpoint whose scope is missing returns **403 `MISSING_SCOPE`**.\n\nModule endpoints additionally require the module to be exposed to the public\nAPI; if it isn't, you get **404 `MODULE_NOT_AVAILABLE`**. A module that exists\nbut is not exposed is indistinguishable from one that does not exist. This\npublication check applies to Personal Access Tokens only \u2014 a login token reaches\nevery module you can already open in the CRM, because publication is a decision\nabout third parties and you are not one.\n\n## Pagination\n\nTwo styles, depending on the endpoint \u2014 check each operation's parameters.\n\n**Cursor** (records: `\/objects\/{module}`, `\/objects\/{module}\/search`) \u2014 pass\n`limit`, then follow `paging.next.after` from the response into the next\nrequest's `after`. Cursors are stable under concurrent writes.\n\n```json\n{ \"results\": [ ... ], \"paging\": { \"next\": { \"after\": \"eyJ...\" } } }\n```\n\n**Page number** (`\/campaigns`, `\/segments`, `\/lists`, `\/workflows`) \u2014 pass\n`limit` and `page`.\n\nTo **count** records, request `limit=100` and page through, summing the\nresults. `limit=0` is rejected; there is no dedicated count endpoint.\n\n## Rate limits & quota\n\nRequests are rate-limited per token and counted against your organization's\ndaily and monthly public-API quota. Exceeding either returns **429**. Endpoint\nweight varies \u2014 see `config\/public-api.php`.\n\n## Errors\n\nEvery failure returns the same envelope, with a `correlationId` worth quoting\nin a support request:\n\n```json\n{\n  \"status\": \"error\",\n  \"message\": \"Missing or malformed Authorization header.\",\n  \"category\": \"UNAUTHORIZED\",\n  \"correlationId\": \"01KYKNA9GSVRGF1VQRE7XAPDDM\",\n  \"errors\": [],\n  \"documentation_url\": \"https:\/\/developers.aitrillion.com\/errors\/UNAUTHORIZED\"\n}\n```\n\nCommon categories: `UNAUTHORIZED` (401), `MISSING_SCOPE` (403),\n`MODULE_NOT_AVAILABLE` \/ `OBJECT_NOT_FOUND` (404), `VALIDATION_ERROR` (400),\n`RATE_LIMITED` \/ quota exceeded (429).\n\nOn the write endpoints, **403 `FORBIDDEN`** means the token holds the scope but\nthe acting user's profile does not allow the action \u2014 for example a batch\nupdate or batch archive of more than one record with Mass Update \/ Mass Delete\nswitched off (a batch update that only sets owners needs Change Owner instead),\nor an owner change with Change Owner switched off (Edit Profile \u2192 Tools). In a\nbatch, an item refused this way reports `FORBIDDEN` in its own error entry."},"servers":[{"url":"https:\/\/app.aiengagecrm.com\/cback\/api\/public\/v1","description":"This CRM instance"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Schema & Discovery","description":"Start here. Which object types (modules) this key can reach, and what fields each one has.\n\nEvery `{module}` path parameter elsewhere takes a slug from `GET \/objects`, and every `propertyName` in a search filter comes from `GET \/properties\/{module}`. Gated by `crm.schema.read`."},{"name":"Records","description":"The CRM records themselves \u2014 contacts, deals, companies, tasks and any custom module.\n\nList them newest-first, fetch one by id or by a unique field, or run a filtered search. Each operation needs the scope for the module it touches (`crm.contacts.read` for contacts, and so on)."},{"name":"Reports","description":"Pre-built roll-ups over a date range: headline KPIs, deal pipeline and activity breakdowns.\n\nUse these when you want the same numbers the CRM's own report screens show. For anything custom, use **Analytics**. Gated by `crm.reports.read`."},{"name":"Analytics","description":"Ad-hoc metrics you compose yourself \u2014 counts, sums and group-bys \u2014 without a pre-built report.\n\nAlways call `GET \/analytics\/metrics` first to discover valid metric ids, then post a config to `\/analytics\/run`. Computation only: nothing is stored. Gated by `crm.analytics.read`."},{"name":"Dashboards","description":"The at-a-glance productivity summary for the user who owns this API key \u2014 open tasks, what is due today, today's meetings, pinned notes. Gated by `crm.dashboards.read`."},{"name":"Advertising","description":"Paid advertising performance, combined across every connected platform \u2014 spend, impressions, clicks, leads and the derived CPL\/CPC\/CPM\/CTR.\n\nReads the shared ad-insights store, so Meta, Google Ads and manually-entered Custom Advertising spend all aggregate into one report. Reporting is independent of collection: history stays readable after an integration\u2019s tracking is switched off. Gated by `crm.ads.read`."},{"name":"Campaigns","description":"Marketing campaigns and how they performed \u2014 sends, deliveries, opens, clicks and the derived rates.\n\nRead-only: this API cannot create or send a campaign. Gated by `crm.campaigns.read`."},{"name":"Segments","description":"Audience segments \u2014 saved static or dynamic definitions of \"who\" \u2014 plus their membership counts and growth over time. Gated by `crm.segments.read`."},{"name":"Contact Lists","description":"Static contact lists: fixed collections of contacts, as opposed to the rule-driven membership of a dynamic segment. Gated by `crm.lists.read`."},{"name":"Workflows","description":"Automation workflows and their execution history \u2014 how often each ran, and how the messages it sent performed.\n\nRead-only: you can inspect a workflow but not trigger, pause or edit it. Gated by `crm.workflows.read`."},{"name":"People","description":"The colleagues in this CRM, and the teams they belong to.\n\nRecords carry ownership as ids (`record_owner`, `created_by`), so this is how you turn one into a name. Readable by any user \u2014 the CRM already shows these names in every owner picker \u2014 but email addresses appear only for a caller who could already export them. Gated by `crm.users.read` \/ `crm.teams.read`."},{"name":"Web Forms","description":"Web forms and what they captured \u2014 definitions, submission counts and the submissions themselves.\n\nAn approved submission becomes a CRM record and loses its provenance, and a pending or rejected one never becomes a record at all, so the form funnel is only visible here. Gated by `crm.webforms.read`."},{"name":"Workspace","description":"Operational state: plan limits and consumption, telephony allowance and number routing, and your in-app notifications.\n\nThese are the questions with no record behind them \u2014 \"am I near my contact limit?\", \"how many calls can we still make?\", \"why was that blocked?\". Gated by `crm.billing.read`, `crm.voice.read` and `crm.dashboards.read` respectively."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Either a CRM Personal Access Token (`cak_live_\u2026`, created under **Settings \u2192 API Keys**) or your own CRM login JWT. Send it as `Authorization: Bearer <token>`. A login token needs no setup and resolves its scopes live from your profile permissions; see Authentication above."}},"schemas":{"Error":{"type":"object","description":"The uniform failure envelope returned by every endpoint.","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string","description":"Human-readable explanation."},"category":{"type":"string","description":"Machine-readable class of failure.","examples":["UNAUTHORIZED","MISSING_SCOPE","FORBIDDEN","MODULE_NOT_AVAILABLE","VALIDATION_ERROR"]},"correlationId":{"type":"string","description":"Unique id for this request \u2014 quote it in support requests."},"errors":{"type":"array","description":"Per-field detail, when the failure is a validation error.","items":{"type":"object"}},"documentation_url":{"type":"string","description":"Reference page for this category."}}},"CursorPaging":{"type":"object","description":"Present only when more records exist. Feed `next.after` into the next request's `after` parameter.","properties":{"next":{"type":"object","properties":{"after":{"type":"string","description":"Opaque cursor for the next page."},"link":{"type":"object","description":"Pre-built query for the next page."}}}}},"Record":{"type":"object","description":"One CRM record.\n\nThe `properties` map is **module- and org-specific*: its keys are that module's property slugs, including any custom fields your organization has added. Because those are defined per organization at runtime, they cannot be enumerated in this static document \u2014 call `GET \/properties\/{module}` for the authoritative field list, with each field's type, label and picklist options.","properties":{"id":{"type":"string","description":"The record id."},"properties":{"type":"object","description":"Field values keyed by property slug. Use `GET \/properties\/{module}` to discover the available slugs and their types.","additionalProperties":true},"createdAt":{"type":"string","description":"Creation timestamp."},"updatedAt":{"type":"string","description":"Last-modification timestamp."}}},"AdMetrics":{"type":"object","description":"The advertising metric set. Raw counters come from the ad platform; the rest are derived. Revenue and ROAS are only populated for platforms with a CRM lead bridge (Meta today) and are null elsewhere.","properties":{"spend":{"type":"number","description":"Amount spent, in `currency`."},"currency":{"type":"string","description":"Currency of `spend`. Never converted \u2014 do not sum across currencies."},"impressions":{"type":"integer","description":"Times the ads were shown."},"clicks":{"type":"integer","description":"Clicks received."},"leads":{"type":"integer","description":"Leads attributed to the ads."},"converted_leads":{"type":"integer","description":"Leads meeting the org-wide conversion rule."},"revenue":{"type":"number","description":"Revenue attributed to converted leads. Null when the platform has no CRM lead bridge."},"cpl":{"type":"number","description":"Cost per lead \u2014 spend \u00f7 leads."},"cpc":{"type":"number","description":"Cost per click \u2014 spend \u00f7 clicks."},"cpm":{"type":"number","description":"Cost per thousand impressions."},"ctr":{"type":"number","description":"Click-through rate \u2014 clicks \u00f7 impressions."},"conversion_rate":{"type":"number","description":"Converted leads \u00f7 leads."},"roas":{"type":"number","description":"Return on ad spend \u2014 revenue \u00f7 spend. Null without a lead bridge."}}}}},"paths":{"\/objects":{"get":{"operationId":"objects_list_types","tags":["Schema & Discovery"],"summary":"List object types","description":"The CRM object types (modules) this API key can reach \u2014 slug, label, singular\nand plural names, and icon.\n\n**Call this first.** Every `{module}` path parameter in this API takes a slug\nfrom here. The list is filtered to modules exposed to the public API for your\norganization, so anything returned is genuinely queryable \u2014 and anything\nmissing will return `MODULE_NOT_AVAILABLE` if you guess at it.\n\nStandard CRM modules are typically `contacts`, `companies`, `deals`, `tasks`,\n`meetings`, `calls`, `notes`, `products` and `quotes`; custom modules appear\nhere under their own slugs.\n\n---\n\nRequires scope `crm.schema.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/properties\/{module}":{"get":{"operationId":"properties_list","tags":["Schema & Discovery"],"summary":"List properties","description":"Every field defined on a module: its slug, label, data type, and the allowed\nvalues for picklists.\n\nUse it to learn what you can filter and sort on. The `propertyName` in a search\nfilter, the `sort` parameter, and the `properties` sparse-fieldset parameter all\ntake slugs from this response \u2014 guessing a field name is the most common cause\nof an empty or rejected search.\n\n---\n\nRequires scope `crm.schema.read`.","parameters":[{"name":"module","in":"path","required":true,"description":"Object type (module slug) from `GET \/objects`, e.g. `contacts`, `deals`, `companies`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/properties\/{module}\/{property}":{"get":{"operationId":"properties_get","tags":["Schema & Discovery"],"summary":"Get a property","description":"One field definition on a module \u2014 type, label and options. Useful when you need the valid picklist values for a field before building a filter on it.\n\n---\n\nRequires scope `crm.schema.read`.","parameters":[{"name":"module","in":"path","required":true,"description":"Object type (module slug) from `GET \/objects`, e.g. `contacts`, `deals`, `companies`.","schema":{"type":"string"}},{"name":"property","in":"path","required":true,"description":"The property\/field slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/objects\/{module}":{"get":{"operationId":"objects_list","tags":["Records"],"summary":"List records","description":"Records of one object type, newest first, with cursor pagination.\n\nReturns `results[]` plus a `paging.next.after` cursor when more exist \u2014 pass it\nback as `after` for the following page. Keep requesting until `paging` is\nabsent.\n\nUse `properties` to return only the fields you need (a sparse fieldset); it\nmeaningfully reduces payload size on wide modules. Use `sort` for a different\norder, and `archived=true` to see archived records instead of live ones.\n\nFor anything conditional \u2014 \"contacts created this month\", \"deals over $10k\" \u2014\nuse `POST \/objects\/{module}\/search` instead; this endpoint has no filtering.\n\nOnly records the key's owner may view are returned, per CRM sharing rules.\n\n---\n\nRequires scope `crm.{module}.read`.","parameters":[{"name":"module","in":"path","required":true,"description":"Object type (module slug) from `GET \/objects`, e.g. `contacts`, `deals`, `companies`.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 10). `0` is rejected \u2014 use 100 and page when counting.","schema":{"type":"integer"}},{"name":"after","in":"query","required":false,"description":"Cursor from the previous response\u2019s `paging.next.after`. Omit for the first page.","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"One sort key, `<property>:asc` or `<property>:desc`. Defaults to newest first.","schema":{"type":"string"}},{"name":"properties","in":"query","required":false,"description":"Comma-separated property slugs to return instead of all fields.","schema":{"type":"string"}},{"name":"archived","in":"query","required":false,"description":"Return archived records instead of live ones.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"A page of records.","content":{"application\/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#\/components\/schemas\/Record"}},"paging":{"$ref":"#\/components\/schemas\/CursorPaging"}}}}}},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/objects\/{module}\/{id}":{"get":{"operationId":"objects_get","tags":["Records"],"summary":"Get a record","description":"A single record by its CRM id.\n\nTo look it up by a unique business field instead \u2014 email, external id \u2014 pass\n`id_property` with that field's slug and put the value in the path position:\n`\/objects\/contacts\/ada@example.com?id_property=email`.\n\nReturns **404 `OBJECT_NOT_FOUND`** both when no such record exists and when it\nexists but the key's owner may not view it \u2014 existence is never leaked.\n\n---\n\nRequires scope `crm.{module}.read`.","parameters":[{"name":"module","in":"path","required":true,"description":"Object type (module slug) from `GET \/objects`, e.g. `contacts`, `deals`, `companies`.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}},{"name":"id_property","in":"query","required":false,"description":"Treat the path id as a value of this unique field (e.g. `email`) rather than the record id.","schema":{"type":"string"}},{"name":"properties","in":"query","required":false,"description":"Comma-separated property slugs to return instead of all fields.","schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Record"}}}},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/objects\/{module}\/search":{"post":{"operationId":"objects_search","tags":["Records"],"summary":"Search records","description":"Find records matching a filter expression. A **read-only POST** \u2014 the body\ncarries the query because it is too structured for a query string; nothing is\ncreated.\n\n### Two ways to search\n\n**`query`** \u2014 free text. Matched as a case-insensitive substring against every\n**searchable** field on the module at once (whichever fields your admin marked\n`is_searchable` \u2014 typically name, email and phone). Use this when you know the\n*value* but not which field holds it:\n\n```json\n{ \"query\": \"Prayas\", \"limit\": 10 }\n```\n\n**`filterGroups`** \u2014 structured conditions on a field you can name (stage,\nowner, amount, a date range). Use this when the property is known.\n\nSending both **AND**s them: free text *and* the filters must match.\n\n### How filters combine\n\n- Filters **within** a `filterGroups` entry are **AND**-ed.\n- The groups themselves are **OR**-ed.\n- Limit: **5 groups \u00d7 6 filters** each (30 filters total).\n\nSo \"qualified leads **or** anyone from Acme\" is two groups; \"qualified leads\n**from** Acme\" is one group with two filters.\n\n### Operators\n\n`EQ`, `NEQ`, `LT`, `LTE`, `GT`, `GTE`, `BETWEEN`, `IN`, `NOT_IN`,\n`HAS_PROPERTY`, `NOT_HAS_PROPERTY`, `CONTAINS_TOKEN`, `NOT_CONTAINS_TOKEN`,\n`STARTS_WITH`, `ENDS_WITH`.\n\n`BETWEEN` takes a two-element `value` array. `IN`\/`NOT_IN` take an array.\n`HAS_PROPERTY`\/`NOT_HAS_PROPERTY` take no `value` at all.\n\n### Notes\n\n`propertyName` must be a slug from `GET \/properties\/{module}`. Results paginate\nby cursor exactly like `GET \/objects\/{module}`: read `paging.next.after` and\nsend it back as `after`. To count matches, set `limit` to 100 and page through\n\u2014 never send `limit: 0`.\n\n---\n\nRequires scope `crm.{module}.read`.","parameters":[{"name":"module","in":"path","required":true,"description":"Object type (module slug) from `GET \/objects`, e.g. `contacts`, `deals`, `companies`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Matching records.","content":{"application\/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#\/components\/schemas\/Record"}},"paging":{"$ref":"#\/components\/schemas\/CursorPaging"}}}}}},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"requestBody":{"required":true,"description":"The search query.","content":{"application\/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Free-text term, matched as a case-insensitive substring across every searchable field on the module (the fields with `searchable: true` in `GET \/properties\/{module}`). Use it when you know the value but not the field \u2014 `{\"query\":\"Prayas\"}` finds a contact by name without guessing between `first_name` \/ `last_name` \/ `full_name`. ANDs with `filterGroups` when both are sent. A module with no searchable fields ignores this parameter."},"filterGroups":{"type":"array","description":"Up to 5 groups, OR-ed together. Omit entirely to match all records.","maxItems":5,"items":{"type":"object","properties":{"filters":{"type":"array","description":"Up to 6 filters, AND-ed together.","maxItems":6,"items":{"type":"object","required":["propertyName","operator"],"properties":{"propertyName":{"type":"string","description":"Field slug from `GET \/properties\/{module}`."},"operator":{"type":"string","enum":["EQ","NEQ","LT","LTE","GT","GTE","BETWEEN","IN","NOT_IN","HAS_PROPERTY","NOT_HAS_PROPERTY","CONTAINS_TOKEN","NOT_CONTAINS_TOKEN","STARTS_WITH","ENDS_WITH"]},"value":{"description":"Scalar for most operators; a 2-element array for `BETWEEN`; an array for `IN`\/`NOT_IN`; omitted for `HAS_PROPERTY`\/`NOT_HAS_PROPERTY`."}}}}}}},"sorts":{"type":"array","description":"Defaults to newest first (`created_at` descending).","items":{"type":"object","properties":{"propertyName":{"type":"string"},"direction":{"type":"string","enum":["ASCENDING","DESCENDING"]}}}},"properties":{"type":"array","description":"Sparse fieldset \u2014 return only these property slugs.","items":{"type":"string"}},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Page size, 1\u2013100 (default 10)."},"after":{"type":"string","description":"Cursor from the previous response."}}},"example":{"filterGroups":[{"filters":[{"propertyName":"lead_status","operator":"EQ","value":"qualified"},{"propertyName":"created_at","operator":"GTE","value":"2026-01-01T00:00:00Z"}]}],"sorts":[{"propertyName":"created_at","direction":"DESCENDING"}],"limit":100}}}}}},"\/reports\/overview":{"get":{"operationId":"reports_overview","tags":["Reports"],"summary":"Overview report","description":"Headline KPIs for a date range: new contacts, connected contacts, calls made, meetings (done and logged), WhatsApp messages and emails sent.\n\nThe same numbers as the CRM\u2019s Overview report screen. Pass `range` for a preset window, or `range=custom` with `from`\/`to` for an exact one.\n\n---\n\nRequires scope `crm.reports.read`.","parameters":[{"name":"range","in":"query","required":false,"description":"Date-range preset (default `current_week`). One of `any`, `today`, `yesterday`, `last_7_days`, `last_30_days`, `current_week`, `last_week`, `current_month`, `last_month`, `current_quarter`, `last_quarter`, `current_year`, `last_year`, `custom`. Use `custom` with `from`\/`to`. The **Analytics** spellings (`this_month`, `previous_month`, `last_30d`, \u2026) are accepted as aliases. An unrecognised value returns **400 `VALIDATION_ERROR`** rather than silently falling back. Every response echoes the window it used under `range`.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"End date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}}],"responses":{"200":{"description":"Overview KPIs for the requested window.","content":{"application\/json":{"schema":{"type":"object","properties":{"results":{"type":"object","properties":{"new_contacts":{"type":"integer","description":"Contacts created in the window."},"connected":{"type":"integer","description":"Contacts whose lead status reached \"connected\"."},"calls_made":{"type":"integer","description":"Calls logged in the window."},"meetings":{"type":"object","description":"Meeting counts by outcome.","properties":{"done":{"type":"integer","description":"Meetings marked completed."},"logged":{"type":"integer","description":"Meetings recorded in total."}}},"whatsapp":{"type":"integer","description":"WhatsApp messages sent."},"emails_sent":{"type":"integer","description":"Emails sent."}}}}}}}},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/reports\/pipeline":{"get":{"operationId":"reports_pipeline","tags":["Reports"],"summary":"Pipeline report","description":"The deal pipeline for a date range, broken down by stage and by owner \u2014 deal counts and values.\n\nUse it to answer \"what's in the pipeline\", \"where is it stuck\", and \"who is carrying it\".\n\n---\n\nRequires scope `crm.reports.read`.","parameters":[{"name":"range","in":"query","required":false,"description":"Date-range preset (default `current_week`). One of `any`, `today`, `yesterday`, `last_7_days`, `last_30_days`, `current_week`, `last_week`, `current_month`, `last_month`, `current_quarter`, `last_quarter`, `current_year`, `last_year`, `custom`. Use `custom` with `from`\/`to`. The **Analytics** spellings (`this_month`, `previous_month`, `last_30d`, \u2026) are accepted as aliases. An unrecognised value returns **400 `VALIDATION_ERROR`** rather than silently falling back. Every response echoes the window it used under `range`.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"End date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/reports\/activities":{"get":{"operationId":"reports_activities","tags":["Reports"],"summary":"Activities report","description":"Activity volume for a date range, split by type \u2014 calls, meetings, notes, emails and WhatsApp messages. The team-effort view that complements the outcome-oriented pipeline report.\n\n---\n\nRequires scope `crm.reports.read`.","parameters":[{"name":"range","in":"query","required":false,"description":"Date-range preset (default `current_week`). One of `any`, `today`, `yesterday`, `last_7_days`, `last_30_days`, `current_week`, `last_week`, `current_month`, `last_month`, `current_quarter`, `last_quarter`, `current_year`, `last_year`, `custom`. Use `custom` with `from`\/`to`. The **Analytics** spellings (`this_month`, `previous_month`, `last_30d`, \u2026) are accepted as aliases. An unrecognised value returns **400 `VALIDATION_ERROR`** rather than silently falling back. Every response echoes the window it used under `range`.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"End date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/dashboards\/productivity":{"get":{"operationId":"dashboards_productivity","tags":["Dashboards"],"summary":"Productivity summary","description":"The \"what needs me today\" summary for the user who owns this API key: open tasks, tasks due today, today's meetings and pinned notes.\n\nScoped to that one user, not the whole organization \u2014 a personal work queue rather than a management report.\n\n---\n\nRequires scope `crm.dashboards.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/analytics\/metrics":{"get":{"operationId":"analytics_metrics","tags":["Analytics"],"summary":"List analytics metrics","description":"The catalog of metrics you can compute \u2014 each with its `id`, label, the module it measures, and whether it supports summing a numeric field.\n\n**Call this before `\/analytics\/run`**: the `id` values here are the only ones accepted in a run config, and they vary by organization.\n\n---\n\nRequires scope `crm.analytics.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/analytics\/run":{"post":{"operationId":"analytics_run","tags":["Analytics"],"summary":"Run analytics","description":"Compute an ad-hoc report and return the result. A **read-only POST** \u2014 it\ncalculates counts, sums and group-bys on the fly and stores nothing.\n\nSend a `config` object whose `type` selects the report shape:\n\n| `type` | Produces |\n|---|---|\n| `kpi_card` | One number per metric for a period |\n| `target_meter` | A metric measured against a numeric goal |\n| `comparator` | The same metric compared across users |\n| `matrix` | Metrics crossed with a grouping dimension |\n| `chart` | A time series |\n| `pivot` | A pivot table |\n| `tabular` | Rows of underlying records |\n\nMetric ids come from `GET \/analytics\/metrics` \u2014 call it first.\n\n`filters.date_range` takes either a `preset` or an explicit `from`\/`to`. The\ncanonical presets here are `today`, `yesterday`, `this_week`, `previous_week`,\n`this_month`, `previous_month`, `this_quarter`, `this_year`, `last_7d`,\n`last_30d`, `last_90d`, `last_12m`, `mtd`, `qtd`, `ytd`, `all_time` and\nsimilar. These are spelled differently from the `range` values used by\n**Reports** (`current_month`, `last_30_days`, \u2026) \u2014 both vocabularies are\naccepted on both sides, so either spelling resolves to the same window. An\nunrecognised preset returns **400 `VALIDATION_ERROR`** listing the valid names.\n\nEach `type` validates its own required fields, so an incomplete config returns\n**400 `VALIDATION_ERROR`** naming exactly what is missing.\n\n---\n\nRequires scope `crm.analytics.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"requestBody":{"required":true,"description":"The report configuration.","content":{"application\/json":{"schema":{"type":"object","required":["config"],"properties":{"config":{"type":"object","description":"Report definition. Required fields depend on `type`.","required":["type"],"properties":{"type":{"type":"string","enum":["kpi_card","target_meter","comparator","matrix","chart","pivot","tabular"]},"metrics":{"type":"array","description":"Metric ids from `GET \/analytics\/metrics`.","items":{"type":"string"}},"filters":{"type":"object","properties":{"date_range":{"type":"object","properties":{"preset":{"type":"string","description":"e.g. `this_month`, `last_30d`, `ytd`."},"from":{"type":"string","description":"Explicit start, `YYYY-MM-DD`."},"to":{"type":"string","description":"Explicit end, `YYYY-MM-DD`."}}},"user_ids":{"type":"array","items":{"type":"string"},"description":"Restrict to these owners."}}}}},"page":{"type":"integer","description":"For row-returning types (`tabular`, `pivot`)."},"per_page":{"type":"integer"},"sort_by":{"type":"string"},"sort_order":{"type":"string","enum":["asc","desc"]}}},"example":{"config":{"type":"kpi_card","metrics":["leads_created","deals_won"],"filters":{"date_range":{"preset":"this_month"}}}}}}}}},"\/ads\/report":{"get":{"operationId":"ads_report","tags":["Advertising"],"summary":"Advertising report","description":"The headline advertising view, combined across every connected platform, in one\nresponse:\n\n- `summary` \u2014 total spend, impressions, clicks, leads and the derived CPL, CPC,\n  CPM and CTR.\n- `by_platform` \u2014 the same KPIs split per platform, so you can compare Meta\n  against Google against manually-tracked Custom Advertising spend.\n- `timeseries` \u2014 a daily series for charting the trend.\n- `performance` \u2014 the top 8 campaigns by spend.\n\nEvery filter is optional; with none, you get all platforms over the default\nwindow. Narrow by date (`date_from`\/`date_to`), by platform (`platforms`), or\ndown the hierarchy with `business_id` \u2192 `account_id` \u2192 `campaign_id` \u2192\n`adset_id` \u2192 `ad_id`. Call `\/ads\/filter-options` to discover valid ids.\n\nSpend figures are in each row's own `currency` \u2014 a multi-currency account does\nnot convert to a single reporting currency, so sum per currency, not across.\n\n---\n\nRequires scope `crm.ads.read`.","parameters":[{"name":"date_from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"date_to","in":"query","required":false,"description":"End date `YYYY-MM-DD`. Must not precede `date_from`.","schema":{"type":"string"}},{"name":"platforms","in":"query","required":false,"description":"Platforms to include, comma-separated (e.g. `meta,google`). Omit for all.","schema":{"type":"string"}},{"name":"business_id","in":"query","required":false,"description":"Restrict to one business.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Restrict to one ad account.","schema":{"type":"string"}},{"name":"campaign_id","in":"query","required":false,"description":"Restrict to one campaign.","schema":{"type":"string"}},{"name":"adset_id","in":"query","required":false,"description":"Restrict to one ad set.","schema":{"type":"string"}},{"name":"ad_id","in":"query","required":false,"description":"Restrict to one ad.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"Restrict to one currency code.","schema":{"type":"string"}},{"name":"ad_type","in":"query","required":false,"description":"Restrict to one ad type.","schema":{"type":"string"}},{"name":"lead_source","in":"query","required":false,"description":"Restrict to one lead source.","schema":{"type":"string"}}],"responses":{"200":{"description":"The combined advertising report.","content":{"application\/json":{"schema":{"type":"object","properties":{"results":{"type":"object","properties":{"summary":{"$ref":"#\/components\/schemas\/AdMetrics"},"by_platform":{"type":"array","description":"The same metrics per platform.","items":{"allOf":[{"$ref":"#\/components\/schemas\/AdMetrics"}]}},"timeseries":{"type":"array","description":"Daily series for charting.","items":{"type":"object"}},"performance":{"type":"array","description":"Top 8 campaigns by spend.","items":{"type":"object"}}}}}}}}},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/ads\/grid":{"get":{"operationId":"ads_grid","tags":["Advertising"],"summary":"Advertising grid","description":"The same advertising metrics as `\/ads\/report`, but as paginated rows grouped by\none dimension of your choice \u2014 the endpoint to use for \"which campaigns spent\nthe most\", \"how did each ad set perform\", or \"spend per day\".\n\nSet `group_by` to `platform`, `business`, `account`, `campaign`, `adset`, `ad`,\n`ad_type`, `lead_source`, `currency` or `date` (default `campaign`). Every row\ncarries its platform, so a combined report stays attributable.\n\nSort with `sort_by` (`name`, `spend`, `leads`, `impressions`, `clicks`, `cpl`,\n`cpc`, `cpm`, `ctr`) and `sort_dir`; default is highest spend first. Accepts the\nsame filters as `\/ads\/report`, plus `search` to match on the row name.\n\nPaginates by page number: read `paging.total` and request successive `page`s.\n\n---\n\nRequires scope `crm.ads.read`.","parameters":[{"name":"group_by","in":"query","required":false,"description":"Grouping dimension: `platform`, `business`, `account`, `campaign` (default), `adset`, `ad`, `ad_type`, `lead_source`, `currency`, `date`.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"description":"Rows per page, 1\u2013100 (default 20).","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Free-text match on the row name.","schema":{"type":"string"}},{"name":"sort_by","in":"query","required":false,"description":"`name`, `spend` (default), `leads`, `impressions`, `clicks`, `cpl`, `cpc`, `cpm`, `ctr`.","schema":{"type":"string"}},{"name":"sort_dir","in":"query","required":false,"description":"`asc` or `desc` (default `desc`).","schema":{"type":"string"}},{"name":"date_from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"date_to","in":"query","required":false,"description":"End date `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"platforms","in":"query","required":false,"description":"Platforms to include, comma-separated. Omit for all.","schema":{"type":"string"}},{"name":"business_id","in":"query","required":false,"description":"Restrict to one business.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Restrict to one ad account.","schema":{"type":"string"}},{"name":"campaign_id","in":"query","required":false,"description":"Restrict to one campaign.","schema":{"type":"string"}},{"name":"adset_id","in":"query","required":false,"description":"Restrict to one ad set.","schema":{"type":"string"}},{"name":"ad_id","in":"query","required":false,"description":"Restrict to one ad.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"Restrict to one currency code.","schema":{"type":"string"}},{"name":"ad_type","in":"query","required":false,"description":"Restrict to one ad type.","schema":{"type":"string"}},{"name":"lead_source","in":"query","required":false,"description":"Restrict to one lead source.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/ads\/filter-options":{"get":{"operationId":"ads_filter_options","tags":["Advertising"],"summary":"Advertising filter options","description":"The valid values for every filter the advertising endpoints accept \u2014 platforms, businesses, ad accounts, campaigns, ad sets and ads.\n\nOptions cascade: pass the filters you have already chosen and the response narrows to what is still reachable, so selecting an account leaves only that account's campaigns.\n\n**Call this before filtering** `\/ads\/report` or `\/ads\/grid` \u2014 the ids are platform-assigned and cannot be guessed.\n\n---\n\nRequires scope `crm.ads.read`.","parameters":[{"name":"platforms","in":"query","required":false,"description":"Platforms already selected, comma-separated.","schema":{"type":"string"}},{"name":"business_id","in":"query","required":false,"description":"Business already selected.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Ad account already selected.","schema":{"type":"string"}},{"name":"campaign_id","in":"query","required":false,"description":"Campaign already selected.","schema":{"type":"string"}},{"name":"adset_id","in":"query","required":false,"description":"Ad set already selected.","schema":{"type":"string"}},{"name":"date_from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"date_to","in":"query","required":false,"description":"End date `YYYY-MM-DD`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/campaigns":{"get":{"operationId":"campaigns_list","tags":["Campaigns"],"summary":"List campaigns","description":"Marketing campaigns, newest first, with page-number pagination. Narrow the list with `search`, `status` or `channel`.\n\n---\n\nRequires scope `crm.campaigns.read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 10). `0` is rejected \u2014 use 100 and page when counting.","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Free-text match on campaign name.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Filter by status, e.g. `draft`, `scheduled`, `sent`.","schema":{"type":"string"}},{"name":"channel","in":"query","required":false,"description":"Filter by channel: `email` or `whatsapp`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/campaigns\/{id}":{"get":{"operationId":"campaigns_get","tags":["Campaigns"],"summary":"Get a campaign","description":"One campaign's definition \u2014 name, channel, status, audience and schedule. For how it performed, use the analytics operation below.\n\n---\n\nRequires scope `crm.campaigns.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/campaigns\/{id}\/analytics":{"get":{"operationId":"campaigns_analytics","tags":["Campaigns"],"summary":"Campaign analytics","description":"How one campaign performed: sends, deliveries, opens, clicks, bounces and unsubscribes, plus the derived rates.\n\nA campaign that has not been sent yet returns zeroed counters rather than an error.\n\n---\n\nRequires scope `crm.campaigns.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/segments":{"get":{"operationId":"segments_list","tags":["Segments"],"summary":"List segments","description":"Audience segments, with page-number pagination. `type=dynamic` segments recompute their membership from rules; `type=static` segments hold a fixed set.\n\n---\n\nRequires scope `crm.segments.read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 10). `0` is rejected \u2014 use 100 and page when counting.","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Free-text match on segment name.","schema":{"type":"string"}},{"name":"module_slug","in":"query","required":false,"description":"Only segments over this module, e.g. `contacts`.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"`static` or `dynamic`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/segments\/{id}":{"get":{"operationId":"segments_get","tags":["Segments"],"summary":"Get a segment","description":"One segment \u2014 its name, module, type and the rule definition that determines membership.\n\n---\n\nRequires scope `crm.segments.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/segments\/{id}\/kpis":{"get":{"operationId":"segments_kpis","tags":["Segments"],"summary":"Segment KPIs","description":"Membership size and growth for one segment \u2014 how many members it has now and how that has moved. Answers \"is this audience growing?\" without fetching every member.\n\n---\n\nRequires scope `crm.segments.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/lists":{"get":{"operationId":"lists_list","tags":["Contact Lists"],"summary":"List contact lists","description":"Static contact lists, with page-number pagination. Unlike a dynamic segment, membership here is a fixed set rather than a rule.\n\n---\n\nRequires scope `crm.lists.read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 10). `0` is rejected \u2014 use 100 and page when counting.","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/lists\/{id}":{"get":{"operationId":"lists_get","tags":["Contact Lists"],"summary":"Get a contact list","description":"One contact list \u2014 name, description and member count. Enumerating the members themselves is not yet exposed on this API.\n\n---\n\nRequires scope `crm.lists.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/workflows":{"get":{"operationId":"workflows_list","tags":["Workflows"],"summary":"List workflows","description":"Automation workflows, with page-number pagination. Filter by `status` to separate live automations from drafts and paused ones.\n\n---\n\nRequires scope `crm.workflows.read`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 10). `0` is rejected \u2014 use 100 and page when counting.","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Free-text match on workflow name.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Filter by status, e.g. `active`, `draft`, `paused`.","schema":{"type":"string"}},{"name":"module_slug","in":"query","required":false,"description":"Only workflows on this module.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/workflows\/{id}":{"get":{"operationId":"workflows_get","tags":["Workflows"],"summary":"Get a workflow","description":"One workflow \u2014 its trigger, conditions and the actions it performs. Read-only: this API cannot trigger, pause or edit it.\n\n---\n\nRequires scope `crm.workflows.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/workflows\/{id}\/report":{"get":{"operationId":"workflows_report","tags":["Workflows"],"summary":"Workflow report","description":"Execution statistics for one workflow \u2014 how often it ran and how the messages it sent performed.\n\nPass `channel` to scope the message stats to `whatsapp` or `email`, and `date_from`\/`date_to` to bound the window.\n\n---\n\nRequires scope `crm.workflows.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}},{"name":"channel","in":"query","required":false,"description":"`whatsapp` or `email`.","schema":{"type":"string"}},{"name":"date_from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"date_to","in":"query","required":false,"description":"End date `YYYY-MM-DD`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/analytics\/fields":{"get":{"operationId":"analytics_fields","tags":["Analytics"],"summary":"Groupable fields of a module","description":"What one module can be grouped by, filtered on, bucketed over time and summed.\n\n**Call this before `POST \/analytics\/group-by`.** Field slugs are per-organization\n\u2014 a call's status is `outgoing_call_status` on newer orgs and `call_status` on\nolder ones, and custom modules are entirely org-specific \u2014 so a guessed slug is\nrejected.\n\nReturns `group_by` (every valid grouping, including the system columns\n`record_owner`, `created_by` and `created_at`), `date_fields` for the window,\n`numeric_fields` for what you may sum or average, and the supported\n`aggregations`.\n\n---\n\nRequires scope `crm.analytics.read`.","parameters":[{"name":"module","in":"query","required":true,"description":"Module slug from `GET \/objects`, e.g. `calls`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/analytics\/group-by":{"post":{"operationId":"analytics_group_by","tags":["Analytics"],"summary":"Break down by a field","description":"Group a module's records by a field and aggregate them \u2014 the endpoint for every\n\"X by Y\" question: calls by user, deals by stage, contacts by source this month,\ntotal call duration per agent.\n\nReturns `groups` as `[{label, key, value}]`, with people and picklist values\nalready resolved to display names, plus the `total` and the `config` that was\nrun (paste it into `\/analytics\/run` to extend it).\n\nPrefer this over `\/analytics\/run` for ordinary breakdowns. It resolves three\nthings from your schema that are easy to get wrong by hand and that fail\n*silently* rather than erroring:\n\n- **Owner coalescing.** A user grouping spans `record_owner`, the module's own\n  owner field and `created_by` at once. Calls need this \u2014 an outbound call is\n  owned by the agent who dialled, an inbound one by the matched contact's owner.\n- **Name resolution.** Custom user-lookup fields return raw ids unless the\n  request declares their type; this declares it for you.\n- **Slug drift.** Every slug is resolved against your organization's real fields.\n\nA POST because it takes a body. It computes and never writes.\n\n---\n\nRequires scope `crm.analytics.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"requestBody":{"required":true,"description":null,"content":{"application\/json":{"schema":{"type":"object","required":["module","group_by"],"properties":{"module":{"type":"string","description":"Module slug, e.g. `calls`."},"group_by":{"type":"string","description":"A `group_by` value from `\/analytics\/fields`. Use `record_owner` for \"by user\"."},"series_by":{"type":"string","description":"Optional second dimension for a cross-tab."},"aggregation":{"type":"string","enum":["count","count_unique","sum","avg","min","max"],"description":"Defaults to `count`."},"aggregation_field":{"type":"string","description":"Required for sum\/avg\/min\/max\/count_unique \u2014 a slug from `numeric_fields`."},"date_field":{"type":"string","description":"Which date bounds the window. Defaults to `created_at`."},"date_range":{"type":"object","description":"The window. Omit for all time.","properties":{"preset":{"type":"string","description":"e.g. `current_month`, `last_7_days`."},"from":{"type":"string","description":"`YYYY-MM-DD`."},"to":{"type":"string","description":"`YYYY-MM-DD`."}}},"granularity":{"type":"string","enum":["day","week","month","quarter","year"],"description":"Bucket size when `group_by` is a date field."},"criteria":{"type":"array","description":"Filters applied before grouping, ANDed together.","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string"},"value":{"type":"string"}}}},"limit":{"type":"integer","description":"Keep the top N buckets. `0` means all."},"sort":{"type":"string","enum":["label","value"]},"order":{"type":"string","enum":["asc","desc"]}}},"example":{"module":"calls","group_by":"record_owner","aggregation":"count","date_range":{"preset":"current_month"},"sort":"value","order":"desc"}}}}}},"\/reports\/users":{"get":{"operationId":"reports_users","tags":["Reports"],"summary":"Per-user activity","description":"Contacts, deals, calls and meetings per person for a date range \u2014 the \"who is my top performer\" table.\n\nAttributes records by who CREATED them, matching the CRM's Reports \u2192 Users tab. For attribution by OWNER (which differs for inbound calls) use `POST \/analytics\/group-by` instead.\n\n---\n\nRequires scope `crm.reports.read`.","parameters":[{"name":"range","in":"query","required":false,"description":"Date-range preset (default `current_week`). One of `any`, `today`, `yesterday`, `last_7_days`, `last_30_days`, `current_week`, `last_week`, `current_month`, `last_month`, `current_quarter`, `last_quarter`, `current_year`, `last_year`, `custom`. Use `custom` with `from`\/`to`. The **Analytics** spellings (`this_month`, `previous_month`, `last_30d`, \u2026) are accepted as aliases. An unrecognised value returns **400 `VALIDATION_ERROR`** rather than silently falling back. Every response echoes the window it used under `range`.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"End date `YYYY-MM-DD`. Implies `range=custom` when `range` is omitted.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Match on name or email.","schema":{"type":"string"}},{"name":"sort_by","in":"query","required":false,"description":"Column to sort by (default `name`).","schema":{"type":"string"}},{"name":"sort_order","in":"query","required":false,"description":"`asc` or `desc`.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"description":"Page size, 1\u2013100 (default 25).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/reports\/saved":{"get":{"operationId":"saved_reports_list","tags":["Analytics"],"summary":"List saved reports","description":"The reports this organization has already built and named. Only those shared with the acting user are returned.\n\nPrefer running one of these over composing an equivalent query \u2014 a saved report is the definition the business agreed on, so its numbers match what the customer sees on screen.\n\n---\n\nRequires scope `crm.analytics.read`.","parameters":[{"name":"type","in":"query","required":false,"description":"Filter by report type, e.g. `chart`, `pivot`.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Match on report name.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 10). `0` is rejected \u2014 use 100 and page when counting.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/reports\/saved\/{id}":{"get":{"operationId":"saved_reports_get","tags":["Analytics"],"summary":"Get a saved report","description":"One saved report including its full `config`, which you can post to `\/analytics\/run` yourself if you want to vary it.\n\n---\n\nRequires scope `crm.analytics.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/reports\/saved\/{id}\/run":{"post":{"operationId":"saved_reports_run","tags":["Analytics"],"summary":"Run a saved report","description":"Execute a saved report and return its numbers. The definition is loaded, run and discarded \u2014 nothing is written.\n\nRefused with `MISSING_SCOPE` if the report queries a module you cannot view, even when it was shared with you: sharing a report does not widen module access.\n\n---\n\nRequires scope `crm.analytics.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"requestBody":{"required":true,"description":null,"content":{"application\/json":{"schema":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"sort_by":{"type":"string"},"sort_order":{"type":"string"}}},"example":{"per_page":50}}}}}},"\/objects\/{module}\/{id}\/timeline":{"get":{"operationId":"records_timeline","tags":["Records"],"summary":"Record timeline","description":"What changed on one record, when, and who did it.\n\nEvery other read returns a record's **current** state. This returns the\ntransitions \u2014 the only way to answer \"who moved this deal to Won and when?\" or\n\"when did we last touch this account?\".\n\nRecord-level sharing applies: a user with `own` access cannot read the history\nof someone else's record. A record you cannot see returns `OBJECT_NOT_FOUND`,\nthe same as one that does not exist.\n\n---\n\nRequires scope `crm.{module}.read`.","parameters":[{"name":"module","in":"path","required":true,"description":"Object type (module slug) from `GET \/objects`, e.g. `contacts`, `deals`, `companies`.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The record id.","schema":{"type":"string"}},{"name":"activity_type","in":"query","required":false,"description":"Narrow to one kind of event.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 50).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/search":{"get":{"operationId":"search_everything","tags":["Schema & Discovery"],"summary":"Search everything","description":"Search every module and entity type at once \u2014 the Cmd+K palette as an API.\n\nUse it when you know the term but not the module: the match might be a company, a contact, a deal or a note. When the module IS known, `POST \/objects\/{module}\/search` is more precise and supports filters. Results are limited to the modules your scopes cover. Minimum 2 characters.\n\n---\n\nRequires scope `crm.schema.read`.","parameters":[{"name":"q","in":"query","required":true,"description":"What to look for (2+ characters).","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Results per group, 1\u201320 (default 5).","schema":{"type":"integer"}},{"name":"include","in":"query","required":false,"description":"Comma-separated groups to restrict to, e.g. `records,email_templates`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/users":{"get":{"operationId":"users_list","tags":["People"],"summary":"List people","description":"The colleagues in this CRM \u2014 id, name, active state and team membership.\n\nRecords carry ownership as ids, so this is how `record_owner` or `created_by` becomes a name. `email` is included only for a caller holding the user-management permission.\n\n---\n\nRequires scope `crm.users.read`.","parameters":[{"name":"search","in":"query","required":false,"description":"Match on name or email.","schema":{"type":"string"}},{"name":"team_id","in":"query","required":false,"description":"Only members of this team.","schema":{"type":"string"}},{"name":"is_active","in":"query","required":false,"description":"`true` (default), `false`, or `all`.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013200 (default 50).","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/users\/{id}":{"get":{"operationId":"users_get","tags":["People"],"summary":"Get a person","description":"One user by id \u2014 the direct way to resolve a single owner id to a name.\n\n---\n\nRequires scope `crm.users.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The user id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/teams":{"get":{"operationId":"teams_list","tags":["People"],"summary":"List teams","description":"Teams with their lead, parent team and member count. Member ids are returned; `GET \/teams\/{id}` expands them to names.\n\n---\n\nRequires scope `crm.teams.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/teams\/{id}":{"get":{"operationId":"teams_get","tags":["People"],"summary":"Get a team","description":"One team with its members expanded to names.\n\n---\n\nRequires scope `crm.teams.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The team id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/dashboards":{"get":{"operationId":"dashboards_list","tags":["Dashboards"],"summary":"List dashboards","description":"The saved dashboards visible to the acting user, with a tile count. A dashboard shared with nobody stays private here too.\n\n---\n\nRequires scope `crm.dashboards.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/dashboards\/{id}":{"get":{"operationId":"dashboards_get","tags":["Dashboards"],"summary":"Get a dashboard","description":"One dashboard and its tiles. Each tile carries a runnable `config` \u2014 post it to `\/analytics\/run` to compute that tile's current numbers.\n\n---\n\nRequires scope `crm.dashboards.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The dashboard id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/dashboards\/widgets\/{key}":{"get":{"operationId":"dashboards_widget","tags":["Dashboards"],"summary":"Get a productivity widget","description":"One widget for the acting user: `my_tasks`, `tasks_due_today`, `events_today`, `calendar`, `kanban` or `sticky_notes`.\n\n---\n\nRequires scope `crm.dashboards.read`.","parameters":[{"name":"key","in":"path","required":true,"description":"The widget key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/dashboards\/meetings":{"get":{"operationId":"dashboards_meetings","tags":["Dashboards"],"summary":"Meetings for a date","description":"The acting user's meetings on a given day, in their timezone. Defaults to today.\n\n---\n\nRequires scope `crm.dashboards.read`.","parameters":[{"name":"date","in":"query","required":false,"description":"`YYYY-MM-DD`. Defaults to today.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/notifications":{"get":{"operationId":"notifications_list","tags":["Workspace"],"summary":"List notifications","description":"The acting user's in-app notifications and unread count, including org-wide alerts. Quota warnings and limit notices land here, so this often explains why something was blocked.\n\n---\n\nRequires scope `crm.dashboards.read`.","parameters":[{"name":"unread_only","in":"query","required":false,"description":"`true` to return only unread.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013100 (default 25).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/plan\/usage":{"get":{"operationId":"plan_usage","tags":["Workspace"],"summary":"Plan limits and usage","description":"What the plan allows and how much is consumed \u2014 contacts, seats, storage, emails, API calls.\n\nRead through the same service that enforces the limits, so the numbers match what actually blocks a write, including any per-organization overrides.\n\n---\n\nRequires scope `crm.billing.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/voice\/quota":{"get":{"operationId":"voice_quota","tags":["Workspace"],"summary":"Call allowance","description":"Calls made this month, the monthly cap and the phone-number limit.\n\nFor call RECORDS read the `calls` module; for call breakdowns use `POST \/analytics\/group-by`.\n\n---\n\nRequires scope `crm.voice.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/voice\/routing":{"get":{"operationId":"voice_routing","tags":["Workspace"],"summary":"Call routing","description":"Which number rings which agent, inbound and outbound. Requires the voice-configuration permission in addition to the scope, matching the internal settings screen.\n\n---\n\nRequires scope `crm.voice.read`.","responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/webforms":{"get":{"operationId":"webforms_list","tags":["Web Forms"],"summary":"List web forms","description":"The organization's web forms \u2014 name, slug, target module and published state.\n\n---\n\nRequires scope `crm.webforms.read`.","parameters":[{"name":"module","in":"query","required":false,"description":"Filter by target module slug.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Match on form name.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/webforms\/{id}":{"get":{"operationId":"webforms_get","tags":["Web Forms"],"summary":"Get a web form","description":"One form including its field configuration and settings.\n\n---\n\nRequires scope `crm.webforms.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The webform id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/webforms\/{id}\/stats":{"get":{"operationId":"webforms_stats","tags":["Web Forms"],"summary":"Web form statistics","description":"Submission counts and conversion for one form \u2014 \"how many leads came through the Contact Us form\".\n\nAn approved submission becomes a CRM record and loses its provenance, so this is the only view of the form funnel.\n\n---\n\nRequires scope `crm.webforms.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The webform id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/webforms\/{id}\/submissions":{"get":{"operationId":"webforms_submissions","tags":["Web Forms"],"summary":"Web form submissions","description":"Submissions to one form, newest first, with status (pending \/ approved \/ rejected), the captured data and the record each one created.\n\n---\n\nRequires scope `crm.webforms.read`.","parameters":[{"name":"id","in":"path","required":true,"description":"The webform id.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Filter by submission status.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Start date `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"End date `YYYY-MM-DD`.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1\u2013200 (default 50).","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-based (default 1).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Validation error \u2014 the request body or parameters are malformed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Missing, malformed, revoked or expired token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"The token lacks the scope this operation requires.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"The module is not available via the public API, or the record does not exist \/ is not visible to this key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Rate limited, or the organization\u2019s daily\/monthly API quota is exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}}}}