Skip to content
KnockDevelopers
Analytics

Describe an analytics table

Chat with a Developer
POST
/v1/analytics/tables/describe

Returns everything needed to query your Accounts or Contacts table: every column with its meaning, the default columns, every filter with its meaning and your account's own values, and the columns you can sort, group and split by. It is the same data as the Accounts and Contacts pages of the Knock dashboard.

Authorization

ApiKeyAuth
headerx-api-key<token>

Your Knock API key. Ask your Knock account team for one: a key with the Enrichment API role to enrich and route leads and find warm intros, the Viewer role to read chats, meetings, routing rules, FAQs, analytics, magic links, meeting routing rules, marketing cards and members, the Admin, Editor or AI Manager role to change FAQs, the Admin, Editor or Partner Contributor role to create marketing cards and wrap chat links, or the Admin role to set the working hours of your members.

Request Body

application/json
  1. body
table*enum<string>

accounts = companies; contacts = people

Show 2 valuesHide values
accountscontacts
filterValues?array<string>

Filters whose full value list to include (up to 100), beyond the short lists included anyway

valueSearch?string

Keep only the filterValues values containing this text (case-insensitive), e.g. "pricing"

valuesOnly?boolean

Return only the filters named in filterValues, with their values — a small, fast lookup

Response Body

The columns and filters of the table.

application/json
  1. response
table*enum<string>
Show 2 valuesHide values
accountscontacts
columns*array<>
defaultColumns*array<string>

What query_table returns when no columns are named

filters*array<>
filtersNotAllowedInGroups*array<string>

Filters that cannot go inside a filterGroups entry

orderByColumns*array<string>
groupByColumns*array<string>

Columns query_table can group by

splitByColumns*array<string>

Columns query_table can split a group by (one value per row)

Example Request
curl -X POST 'https://app.knock-ai.com/v1/analytics/tables/describe' \  -H 'x-api-key: <YOUR_API_KEY>' \  -H 'Content-Type: application/json' \  -d '{  "table": "accounts"}'
Example Response
{  "table": "accounts",  "columns": [    {      "name": "string",      "description": "string"    }  ],  "defaultColumns": [    "string"  ],  "filters": [    {      "name": "string",      "description": "string",      "type": "string[]",      "values": [        "string"      ],      "valueLabels": {        "property1": "string",        "property2": "string"      },      "valueCount": 0,      "note": "string",      "variants": [        "string"      ]    }  ],  "filtersNotAllowedInGroups": [    "string"  ],  "orderByColumns": [    "string"  ],  "groupByColumns": [    "string"  ],  "splitByColumns": [    "string"  ]}