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

# Test endpoint connection

> Test an endpoint connection by making a sample request. Can be used in two modes: (1) Without an ID — all connection fields are required (creation flow). (2) With an ID — fetches the stored connection and applies any provided fields as overrides (update flow). See [Endpoint Connections](https://docs.galtea.ai/concepts/product/endpoint-connection).




## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /endpointConnections/testConnection
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /endpointConnections/testConnection:
    post:
      tags:
        - endpoint-connections
      summary: Test endpoint connection
      description: >
        Test an endpoint connection by making a sample request. Can be used in
        two modes: (1) Without an ID — all connection fields are required
        (creation flow). (2) With an ID — fetches the stored connection and
        applies any provided fields as overrides (update flow). See [Endpoint
        Connections](https://docs.galtea.ai/concepts/product/endpoint-connection).
      operationId: testEndpointConnection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: >-
                    Optional ID of an existing endpoint connection. When
                    provided, stored connection data is used as base and
                    remaining fields act as overrides.
                  example: id_123
                url:
                  type: string
                  description: The endpoint URL to test
                  example: https://api.example.com
                httpMethod:
                  type: string
                  description: HTTP method (GET, POST, etc.)
                authType:
                  type: string
                  description: Authentication type (NONE, BEARER, API_KEY, BASIC)
                authToken:
                  type: string
                  description: Authentication token (for BEARER or API_KEY)
                username:
                  type: string
                  description: Username (for BASIC auth)
                password:
                  type: string
                  description: Password (for BASIC auth)
                  example: securePass123!
                headers:
                  type: object
                  description: Custom headers as key-value pairs
                inputTemplate:
                  type: string
                  description: Input template with Jinja2 placeholders
                timeout:
                  type: number
                  description: Request timeout in seconds
      responses:
        '200':
          description: Test connection result
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  statusCode:
                    type: number
                  latency:
                    type: number
                  response:
                    type: object
                  error:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Endpoint connection not found (when id is provided)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````