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

# Validate Connection

> Validate a resource connection before creating

## Overview

Validate a resource connection before creating it. This endpoint tests the connection parameters without actually creating the resource, allowing you to verify connectivity and configuration.


## OpenAPI

````yaml POST /resources/validate-connection
openapi: 3.1.0
info:
  title: Ledgerbeam API
  description: >-
    Conversational analytics API for querying data using natural language,
    managing resources, and interacting with data sources
  version: 1.0.0
  contact:
    name: Ledgerbeam Support
    email: support@ledgerbeam.com
  license:
    name: MIT
servers:
  - url: https://api.ledgerbeam.com/v1
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /resources/validate-connection:
    post:
      summary: Validate connection
      description: Validate a resource connection before creating
      operationId: validateConnection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateConnectionRequest'
      responses:
        '200':
          description: Connection validated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionStatus'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ValidateConnectionRequest:
      type: object
      required:
        - resource_type
        - meta
      properties:
        resource_type:
          type: string
          description: Resource type to validate
          example: postgresql
        meta:
          type: object
          description: Connection metadata to validate
    ConnectionStatus:
      type: object
      properties:
        status:
          type: string
          enum:
            - connected
            - disconnected
            - error
          description: Connection status
          example: connected
        message:
          type: string
          description: Status message
          example: Connection successful
        checked_at:
          type: string
          format: date-time
          description: Check timestamp
          example: '2024-01-15T10:30:00Z'
    Error:
      type: object
      properties:
        error:
          oneOf:
            - type: string
            - type: object
              properties:
                description:
                  type: array
                  items:
                    type: string
          description: Error message or validation errors
          example: Unauthorized access
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: API-KEY
      description: API key for authentication

````