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

# Validate Connection Requirements

> Validate connection credentials without creating a connection.

This endpoint allows you to validate credentials and configuration
before attempting to create a connection. Useful for providing
real-time validation feedback in forms.

**Example:**
```bash
POST /connections/validate?integration_id=gmail
```

**Request Body:**
```json
{
    "credentials": {
        "api_key": "abc123",
        "email": "user@example.com"
    },
    "config": {}
}
```

**Success Response:**
```json
{
    "valid": true,
    "errors": []
}
```

**Validation Error Response:**
```json
{
    "valid": false,
    "errors": [
        "Field 'API Key' must be at least 20 characters",
        "Field 'Email' must be a valid email address"
    ]
}
```



## OpenAPI

````yaml api-reference/openapi.json post /api/v1/connections/validate
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/connections/validate:
    post:
      tags:
        - Connections
      summary: Validate Connection Requirements
      description: |-
        Validate connection credentials without creating a connection.

        This endpoint allows you to validate credentials and configuration
        before attempting to create a connection. Useful for providing
        real-time validation feedback in forms.

        **Example:**
        ```bash
        POST /connections/validate?integration_id=gmail
        ```

        **Request Body:**
        ```json
        {
            "credentials": {
                "api_key": "abc123",
                "email": "user@example.com"
            },
            "config": {}
        }
        ```

        **Success Response:**
        ```json
        {
            "valid": true,
            "errors": []
        }
        ```

        **Validation Error Response:**
        ```json
        {
            "valid": false,
            "errors": [
                "Field 'API Key' must be at least 20 characters",
                "Field 'Email' must be a valid email address"
            ]
        }
        ```
      operationId: validate_connection_requirements_api_v1_connections_validate_post
      parameters:
        - name: integration_id
          in: query
          required: true
          schema:
            type: string
            description: Integration ID to validate against
            title: Integration Id
          description: Integration ID to validate against
        - name: auth_method_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Authentication method ID
            title: Auth Method Id
          description: Authentication method ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              title: Request Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '404':
          description: Connection not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````