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

# Create endpoint connection

> Create a new endpoint connection. See [Endpoint Connections](https://docs.galtea.ai/concepts/product/endpoint-connection).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /endpointConnections
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:
    post:
      tags:
        - endpoint-connections
      summary: Create endpoint connection
      description: >-
        Create a new endpoint connection. See [Endpoint
        Connections](https://docs.galtea.ai/concepts/product/endpoint-connection).
      operationId: createEndpointConnection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndpointConnection'
      responses:
        '201':
          description: Endpoint connection created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointConnection'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    EndpointConnection:
      type: object
      required:
        - productId
        - name
        - url
        - httpMethod
        - authType
        - inputTemplate
        - outputMapping
      properties:
        id:
          type: string
          example: ec_123
        productId:
          type: string
          example: prod_123
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: My API Connection
        url:
          type: string
          example: https://api.example.com/v1/chat/completions
        httpMethod:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
          example: POST
        authType:
          type: string
          enum:
            - NONE
            - BEARER
            - API_KEY
            - BASIC
          example: BEARER
        hasAuthToken:
          type: boolean
          description: Whether an auth token is configured (token value is not exposed)
        username:
          type: string
          nullable: true
          description: Username for Basic auth
        hasPassword:
          type: boolean
          description: Whether a password is configured (password value is not exposed)
        headers:
          type: object
          nullable: true
          additionalProperties:
            type: string
          example:
            Content-Type: application/json
        inputTemplate:
          type: string
          nullable: true
          description: >-
            Jinja2/Nunjucks template for request body. Must contain {{
            input.user_message }} placeholder.
          example: '{"prompt": "{{ input.user_message }}"}'
        inputSchema:
          type: object
          nullable: true
          description: >-
            Optional JSON Schema (draft 2020-12) defining the structure of input
            fields, their types, and valid values. Must have type "object" with
            a "properties" key.
          example:
            type: object
            properties:
              user_message:
                type: string
                description: The main user message to the agent
              reasoning_level:
                type: string
                enum:
                  - low
                  - medium
                  - high
                description: How much reasoning the agent should apply
              topic:
                type: string
                enum:
                  - billing
                  - shipping
                  - returns
                  - account
                description: Conversation topic
              customer_id:
                type: string
                pattern: ^C-\d{3,6}$
                description: Customer identifier
            required:
              - user_message
        outputMapping:
          type: object
          nullable: true
          additionalProperties:
            type: string
          description: >-
            JSONPath expressions to extract values from API response. Must
            include "output" key.
          example:
            output: $.choices[0].message.content
        type:
          type: string
          enum:
            - INITIALIZATION
            - CONVERSATION
            - FINALIZATION
          example: CONVERSATION
        timeout:
          type: integer
          nullable: true
          minimum: 1
          maximum: 120
          default: 15
          example: 15
          description: >-
            Per-attempt request timeout in seconds. Unset applies the default
            (15). Capped server-side at 120 seconds.
        rateLimit:
          type: integer
          nullable: true
          minimum: 1
          example: 60
          description: Maximum requests per minute. Unset (null) means no rate limit.
        retryEnabled:
          type: boolean
          default: true
          description: Whether automatic retry is enabled for failed requests
        retryMaxAttempts:
          type: integer
          nullable: true
          minimum: 0
          maximum: 10
          default: 1
          description: >-
            Maximum number of retry attempts (applied when retryEnabled is
            true). 0 is only valid when retryEnabled is false; with retry
            enabled the minimum is 1.
        retryInitialDelayMs:
          type: integer
          nullable: true
          minimum: 0
          default: 1000
          description: Initial delay in milliseconds before first retry
        retryBackoffStrategy:
          type: string
          nullable: true
          enum:
            - FIXED
            - EXPONENTIAL
            - LINEAR
          default: EXPONENTIAL
          description: Strategy for increasing delay between retries
        retryMaxDelayMs:
          type: integer
          nullable: true
          minimum: 0
          maximum: 60000
          default: 3000
          description: >-
            Maximum delay between retry attempts, in milliseconds. Capped
            server-side at 60000 (60 seconds) to bound retry blast radius.
        retryableStatusCodes:
          type: array
          items:
            type: integer
            minimum: 100
            maximum: 599
          default:
            - 429
            - 500
            - 502
            - 503
            - 504
          description: HTTP status codes that should trigger a retry
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    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-...`.

````