---
title: "Get Ksql Table"
description: "How to call Get Ksql Table (GET /api/ksql-tables/{id}) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2026-07-15/reference/get_ksql_table_beta"
revision: "2026-07-15.pre"
latestUrl: "https://developers.klaviyo.com/en/reference"
operationId: "get_ksql_table_beta"
method: "GET"
endpoint: "https://a.klaviyo.com/api/ksql-tables/{id}"
authentication: "privateKey"
scopes: ["campaigns:read","catalogs:read","events:read","lists:read","metrics:read","profiles:read","segments:read"]
rateLimits: {"burst":"10/s","steady":"150/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
preRelease: "BETA"
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15.pre/openapi/beta/apis/get_ksql_table_beta.json"
jsonApi: {"fields":{"ksql-table":["columns","description","event_sources","id","kind"]}}
related: ["https://developers.klaviyo.com/en/v2026-07-15/reference/beta-apis-beta/llms.txt","https://developers.klaviyo.com/en/v2026-07-15/reference/get_ksql_tables_beta.md"]
---

# Get Ksql Table

> This is the Markdown version of https://developers.klaviyo.com/en/v2026-07-15/reference/get_ksql_table_beta

```http
GET https://a.klaviyo.com/api/ksql-tables/{id}
```


> [!WARNING]
> **This endpoint is in beta and subject to change.**
> A beta revision header (2026-07-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy.md) for more information.


Fetch the full column schema for one k-sql table, given its identifier.

- Revision header: `revision: 2026-07-15.pre` (required)
- Scopes: `campaigns:read`, `catalogs:read`, `events:read`, `lists:read`, `metrics:read`, `profiles:read`, `segments:read`
- Rate limits: Burst: `10/s`, Steady: `150/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15.pre/openapi/beta/apis/get_ksql_table_beta.json)

Steady: `150/m`

**Optional Scopes:**
`campaigns:read`
`catalogs:read`
`events:read`
`lists:read`
`metrics:read`
`profiles:read`
`segments:read`

## Example request

```bash
curl --request GET \
     --url 'https://a.klaviyo.com/api/ksql-tables/id' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-07-15.pre'
```

## Path parameters

- `id` (string, required)

## Query parameters

- `fields[ksql-table]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2026-07-15/reference.md) Allowed values: `columns`, `description`, `event_sources`, `id`, `kind`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-07-15.pre`

## Responses

### 200: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `ksql-table`
  - `id` (string, required): The k-sql table identifier, verbatim -- write it exactly as given in a FROM clause. Example: `klaviyo.events.placed_order`
  - `attributes` (object, required)
    - `description` (string, nullable): What the table contains. Null when a canonical manifest declares none. Never null on an inferred event table -- the service synthesizes one stating the source and that field names are inferred.
    - `kind` (string, required): What this table represents. Allowed values: `event`, `object`, `relation`, `inferred_event`, `metric`
    - `columns` (object[]): The table's top-level columns, in manifest order. Nested columns are reached through `struct_fields` and `array_element` rather than listed separately. Always present. Default: `[]`
      - `name` (string, required): The column's own name, not a path.
      - `type` (string, required): A k-sql column's type.
        
        ``array`` is always the bare string -- an array's element type lives
            in ``ColumnSchema.array_element``, never encoded as ``array<...>``.
            ``struct`` carries its members in ``ColumnSchema.struct_fields``. Allowed values: `boolean`, `long`, `double`, `string`, `timestamptz`, `struct`, `array`
      - `description` (string, nullable): What the column contains. Null when the manifest declares none. On an inferred event table the top-level CDM columns still carry descriptions; only the fields inside the satellite struct are null.
      - `struct_fields` (ColumnSchema[]): Members of a `struct` column, each an object of this same shape. Empty for every other type. An `array` of structs carries its members in `array_element.struct_fields`, not here. Default: `[]` Same structure as ColumnSchema, which this field is nested inside.
      - `array_element` (ColumnSchema, nullable): Present only when `type` is `array`, and null otherwise. An object of this same shape describing one element of the array: its `type`, its `struct_fields` when that element is a struct, and its own `array_element` when the array is itself an array of arrays. Same structure as ColumnSchema, which this field is nested inside.
      - `relations` (object[]): Joinable relations declared against this column. Empty when there are none. Default: `[]` Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15.pre/openapi/beta/apis/get_ksql_table_beta.json).
    - `event_sources` (object[]): The source event types behind this canonical event table, each with the identifier of the inferred event table carrying that source's complete field set. Canonical tables normalize across sources and drop source-specific fields; those fields remain addressable on the identifiers listed here. Always present; empty for every kind except `event`. Default: `[]`
      - `type_id` (string, required): The KDB activity type id, for example `shopify[Order]`. Example: `shopify[Order]`
      - `identifier` (string, required): The `id` of the inferred event table for this source. Percent-encode it to retrieve that table. Example: `klaviyo.events.shopify.Order`
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.

#### Example response body

```json
{
  "data": {
    "type": "ksql-table",
    "id": "klaviyo.events.placed_order",
    "attributes": {
      "description": "string",
      "kind": "event",
      "columns": [],
      "event_sources": []
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "links": {
    "self": "https://www.example.com"
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
