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

# Validate Table

Validate table shape and column rules against the current CSV snapshot.

```python Python theme={null}
result = client.tables.validate(
    table_id="tbl_123",
    required_columns=["countrycode"],
)
```

```typescript TypeScript theme={null}
const result = await client.tables.validate("tbl_123", ["countrycode"]);
```

```go Go theme={null}
result, err := client.Tables.Validate(ctx, "tbl_123", &retab.TablesValidateParams{
  RequiredColumns: []string{"countrycode"},
})
```

```java Java theme={null}
// Validate table requirements with the Retab Java client.
```

```bash cURL theme={null}
curl -X POST https://api.retab.com/v1/tables/tbl_123/validate \
  -H "Authorization: Bearer $RETAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"required_columns":["countrycode"]}'
```


## OpenAPI

````yaml POST /v1/tables/{table_id}/validate
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/tables/{table_id}/validate:
    post:
      tags:
        - Tables
      summary: Table.Validate
      operationId: validate_table
      parameters:
        - in: path
          name: table_id
          required: true
          schema:
            type: string
            title: Table Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowTableValidationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowTableValidationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowTableValidationRequest:
      properties:
        required_columns:
          items:
            type: string
          type: array
          title: Required Columns
          default: []
        columns:
          additionalProperties:
            $ref: '#/components/schemas/WorkflowTableValidationColumnRule'
          type: object
          title: Columns
          default: {}
        unique:
          items:
            items:
              type: string
            type: array
          type: array
          title: Unique
          default: []
      type: object
      title: WorkflowTableValidationRequest
    WorkflowTableValidationResponse:
      properties:
        table_id:
          type: string
          title: Table Id
        diagnostics:
          items:
            $ref: '#/components/schemas/WorkflowTableValidationDiagnostic'
          type: array
          title: Diagnostics
          default: []
        has_errors:
          type: boolean
          title: Has Errors
          default: false
      type: object
      required:
        - table_id
      title: WorkflowTableValidationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    WorkflowTableValidationColumnRule:
      properties:
        type:
          anyOf:
            - type: string
              enum:
                - array
                - boolean
                - integer
                - 'null'
                - number
                - object
                - string
            - type: 'null'
          title: Type
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
        is_not_empty:
          type: boolean
          title: Is Not Empty
          default: false
      type: object
      title: WorkflowTableValidationColumnRule
    WorkflowTableValidationDiagnostic:
      properties:
        severity:
          $ref: '#/components/schemas/WorkflowTableValidationSeverity'
        column:
          anyOf:
            - type: string
            - type: 'null'
          title: Column
        rule:
          type: string
          title: Rule
        message:
          type: string
          title: Message
      type: object
      required:
        - message
        - rule
        - severity
      title: WorkflowTableValidationDiagnostic
    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
    WorkflowTableValidationSeverity:
      type: string
      enum:
        - error
        - warning
      title: WorkflowTableValidationSeverity
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````