> ## Documentation Index
> Fetch the complete documentation index at: https://uiform-codex-generated-frontend-snippets.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Table Schema

Return the column schema for a CSV-backed table.

```python Python theme={null}
schema = client.tables.schema(table_id="tbl_123")
```

```typescript TypeScript theme={null}
const schema = await client.tables.schema("tbl_123");
```

```go Go theme={null}
schema, err := client.Tables.Schema(ctx, "tbl_123")
```

```java Java theme={null}
// Get table schema with the Retab Java client.
```

```bash cURL theme={null}
curl https://api.retab.com/v1/tables/tbl_123/schema \
  -H "Authorization: Bearer $RETAB_API_KEY"
```


## OpenAPI

````yaml GET /v1/tables/{table_id}/schema
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/tables/{table_id}/schema:
    get:
      tags:
        - Tables
      summary: Table.Get Schema
      operationId: get_table_schema
      parameters:
        - in: path
          name: table_id
          required: true
          schema:
            type: string
            title: Table Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowTableSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowTableSchemaResponse:
      properties:
        table_id:
          type: string
          title: Table Id
        columns:
          items:
            $ref: '#/components/schemas/WorkflowTableColumn'
          type: array
          title: Columns
          default: []
      type: object
      required:
        - table_id
      title: WorkflowTableSchemaResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    WorkflowTableColumn:
      properties:
        name:
          type: string
          title: Name
        json_schema:
          additionalProperties: true
          type: object
          title: Json Schema
          default: {}
        sample_values:
          items:
            type: string
          type: array
          title: Sample Values
          default: []
        required:
          type: boolean
          title: Required
          default: false
        unique:
          type: boolean
          title: Unique
          default: false
      type: object
      required:
        - name
      title: WorkflowTableColumn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
          default: null
        ctx:
          type: object
          title: Context
          default: {}
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````