> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peaka.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a semantic table

> Creates a new Semantic Table within a Semantic Catalog. A Semantic Table maps a saved query to a table, making it queryable via SQL like any other table.


<span style={{display: "flex", gap: "10px", flexDirection: "row", alignItems: "center"}}>
  <img src="https://cdn.peaka.com/badges/partner-api-key-badge.png" />

  <img src="https://cdn.peaka.com/badges/project-api-key-badge.png" />
</span>


## OpenAPI

````yaml post /data/projects/{projectId}/semantic-catalogs/{catalogId}
openapi: 3.0.1
info:
  title: Peaka Gateway API
  description: Peaka Gateway API Documentation
  version: '1.0'
servers:
  - url: https://partner.peaka.studio/api/v1
    description: Default Server URL (US Zone)
  - url: https://partner.eu.peaka.studio/api/v1
    description: EU Zone
security:
  - bearerAuth: []
paths:
  /data/projects/{projectId}/semantic-catalogs/{catalogId}:
    post:
      tags:
        - Data -- Semantic Catalogs
      summary: Create a semantic table
      description: >
        Creates a new Semantic Table within a Semantic Catalog. A Semantic Table
        maps a saved query to a table, making it queryable via SQL like any
        other table.
      operationId: createSemanticTable
      parameters:
        - name: projectId
          in: path
          description: ID of the Project
          required: true
          schema:
            type: string
          example: mtKDhe1U
        - name: catalogId
          in: path
          description: ID of the Semantic Catalog
          required: true
          schema:
            type: string
          example: 688890918747898100
      requestBody:
        description: Semantic Table Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SemanticTableRequest'
            example:
              schemaName: mySchema
              tableName: myTableName
              queryId: '788890918747898752'
        required: true
      responses:
        '200':
          description: Table created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SemanticTable'
              example:
                tableId: '688890918747898103'
                catalogName: myCatalog
                schemaName: mySchema
                tableName: myTableName
components:
  schemas:
    SemanticTableRequest:
      type: object
      properties:
        schemaName:
          type: string
          description: The name of the schema.
        tableName:
          type: string
          description: The name of the table.
        queryId:
          type: string
          description: The ID of the query which is used to populate the semantic table.
    SemanticTable:
      type: object
      properties:
        catalogId:
          type: string
          description: The ID of the catalog that the table belongs to.
        catalogName:
          type: string
          description: The name of the catalog that the table belongs to.
        schemaName:
          type: string
          description: The name of the schema that the table belongs to.
        tableName:
          type: string
          description: The name of the table.
        tableId:
          type: string
          description: The ID of the semantic table.
      description: Represents a table in a schema.
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Use the Authorization header with the value 'Bearer <apiKey>' to
        authenticate. Partner API Keys have full access; Project API Keys are
        limited to their project scope. Learn more:
        https://docs.peaka.com/api-reference/authentication
      scheme: bearer
      bearerFormat: Api Key

````