Skip to content

This page is available as Markdown at https://developers.klaviyo.com/en/v2026-07-15/reference/get_ksql_table_beta.md. Its OpenAPI document is at https://raw.githubusercontent.com/klaviyo/openapi/2026-07-15.pre/openapi/beta/apis/get_ksql_table_beta.json. An index of every page is at https://developers.klaviyo.com/llms.txt.

KlaviyoKlaviyoDevelopers
v2026-07-15

This endpoint is in beta. Call it with the revision header 2026-07-15.pre. Beta endpoints may change before they're generally available. See our versioning and deprecation policy for more information.

You're reading the reference for API revision 2026-07-15. The latest revision is 2026-10-15. See this page in the latest revision.

Get Ksql Table

GEThttps://a.klaviyo.com/api/ksql-tables/{id}

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

Revision header
revision: 2026-07-15.prerequired
Scopes
campaigns:readcatalogs:readevents:readlists:readmetrics:readprofiles:readsegments:read
Rate limits
Burst: 10/sSteady: 150/m

Steady: 150/m

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

Path parameters

  • id#stringrequired

Query parameters

  • fields[ksql-table]#string[]

    For more information please visit API overview

    Allowed values:
    • columns
    • description
    • event_sources
    • id
    • kind

Headers

  • revision#stringrequired

    API endpoint revision (format: YYYY-MM-DD[.suffix])

    2026-07-15.pre

Responses

200Success

Content type: application/vnd.api+json

  • data#objectrequired
    Show 4 fields
    • type#stringrequired
      Allowed values:
      • ksql-table
    • id#stringrequired

      The k-sql table identifier, verbatim -- write it exactly as given in a FROM clause.

      Example: klaviyo.events.placed_order

    • attributes#objectrequired
      Show 4 fields
      • description#stringnullable

        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#stringrequired

        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: []

        Show 6 fields
        • name#stringrequired

          The column's own name, not a path.

        • type#stringrequired

          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#stringnullable

          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#ColumnSchemanullable

          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: []

          Show 4 fields
          • table_id#stringrequired

            The id of the table this column points at. Always an entity table, so never backtick-quoted.

            Example: klaviyo.profiles

          • column#stringrequired

            The column of table_id this column's value matches. This is the name to write in a join, not the underlying CDM column.

            Example: id

          • entity_alias#stringrequired

            The link's alias for the target entity, for example campaign. Unique per table, and the value to pass as USING when a table has more than one link.

            Example: profile

          • description#stringnullable

            What the link means, from the link manifest. Null when the manifest declares none.

      • 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: []

        Show 2 fields
        • type_id#stringrequired

          The KDB activity type id, for example shopify[Order].

          Example: shopify[Order]

        • identifier#stringrequired

          The id of the inferred event table for this source. Percent-encode it to retrieve that table.

          Example: klaviyo.events.shopify.Order

4XXClient Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string

5XXServer Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string