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

# Create connection

> Create a new connection for the caller.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/connections
openapi: 3.0.0
info:
  title: Engini DeveloperAPI
  version: v1
  description: 'Merged public developer API spec: Identity + WorkflowApi.'
servers:
  - url: https://api.engini.io
security:
  - Bearer: []
  - ApiKey: []
paths:
  /v1/connections:
    post:
      tags:
        - Connections
      summary: Create connection
      description: Create a new connection for the caller.
      operationId: Connections_CreateConnection
      parameters: []
      requestBody:
        x-name: request
        description: >-
          The connection creation payload, including the connection name and
          application slug.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConnectionRequest'
        required: true
        x-position: 1
      responses:
        '200':
          description: The newly created connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionPublicDetail'
        '400':
          description: Bad request — malformed body or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized — missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden — the caller lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found — the resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests — rate limit exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error — an unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - Bearer: []
        - ApiKey: []
components:
  schemas:
    CreateConnectionRequest:
      type: object
      description: Request body for creating a connection.
      additionalProperties: false
      required:
        - applicationSlug
        - connectionName
        - authenticationId
        - fields
      properties:
        applicationSlug:
          type: string
          description: Slug of the application to connect to.
        connectionName:
          type: string
          description: Display name for the new connection.
        description:
          type: string
          description: Optional description of the connection.
          nullable: true
        authenticationId:
          type: integer
          description: Identifier of the authentication method to use.
          format: int32
        fields:
          type: object
          description: Connection field values, keyed by field name.
          additionalProperties:
            type: string
        metadata:
          type: object
          description: Optional additional connection metadata, keyed by name.
          nullable: true
          additionalProperties:
            type: string
    ConnectionPublicDetail:
      allOf:
        - $ref: '#/components/schemas/ConnectionPublicListItem'
        - type: object
          description: >-
            Public-shape detail for /api/DeveloperAPI/v1/Connections/{id} and
            create/update responses.
          additionalProperties: false
          properties:
            authenticationId:
              type: integer
              description: Identifier of the authentication method used by the connection.
              format: int32
            authenticationType:
              type: string
              description: Name of the authentication type used by the connection.
            fields:
              type: object
              description: >-
                Connection field values, keyed by field name (sensitive values
                may be masked).
              additionalProperties:
                type: string
                nullable: true
            useSelectDBObjects:
              type: boolean
              description: Whether the connection uses selected database objects.
            connectionError:
              type: string
              description: Last connection error message, if any.
              nullable: true
            isAlive:
              type: boolean
              description: Whether the connection is currently healthy/reachable.
            metadata:
              type: object
              description: Additional connection metadata, keyed by name.
              nullable: true
              additionalProperties:
                type: string
    ErrorResponse:
      type: object
      description: >-
        Unified error envelope for every non-200 response from
        /api/DeveloperAPI/v1/*.

        See applications-tools-spec.md §"Error envelope".
      additionalProperties: false
      required:
        - errorCode
        - message
        - requestId
        - timestamp
        - path
      properties:
        errorCode:
          type: string
          description: Machine-readable error code identifying the failure.
        message:
          type: string
          description: Human-readable error message.
        requestId:
          type: string
          description: Identifier of the request, for support/correlation.
        timestamp:
          type: string
          description: Timestamp when the error occurred (ISO 8601).
        path:
          type: string
          description: Request path that produced the error.
        details:
          type: array
          description: Per-field validation details, when applicable.
          nullable: true
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ConnectionPublicListItem:
      type: object
      description: >-
        Public-shape list item for /api/DeveloperAPI/v1/Connections.

        Applications are identified by slug only (no ApplicationId in the wire
        response).

        Internal queries continue to use ConnectionList which carries both.
      additionalProperties: false
      required:
        - connectionId
        - connectionName
        - applicationSlug
        - isPublic
        - createdBy
        - createdDate
      properties:
        connectionId:
          type: integer
          description: Identifier of the connection.
          format: int32
        connectionName:
          type: string
          description: Display name of the connection.
        description:
          type: string
          description: Description of the connection.
          nullable: true
        applicationSlug:
          type: string
          description: Slug of the connection's application.
        applicationName:
          type: string
          description: Display name of the connection's application.
          nullable: true
        applicationLogo:
          type: string
          description: URL of the application's logo image.
          nullable: true
        isPublic:
          type: boolean
          description: Whether the connection is shared/public.
        createdBy:
          type: string
          description: Identifier of the user who created the connection.
          format: uuid
        createdDate:
          type: string
          description: When the connection was created.
          format: date-time
        updatedBy:
          type: string
          description: >-
            Identifier of the user who last updated the connection; null if
            never updated.
          format: uuid
          nullable: true
        updatedDate:
          type: string
          description: When the connection was last updated; null if never updated.
          format: date-time
          nullable: true
    ErrorDetail:
      type: object
      description: A single field-level error detail within an ErrorResponse.
      additionalProperties: false
      required:
        - field
        - issue
      properties:
        field:
          type: string
          description: Name of the field the issue relates to.
        issue:
          type: string
          description: Description of the issue with the field.
  securitySchemes:
    Bearer:
      type: http
      description: Enter your JWT token
      scheme: bearer
      bearerFormat: JWT
    ApiKey:
      type: apiKey
      description: >-
        Opaque Developer API key (prefix `eng_`). Authenticates as the key's
        owner and resolves the account automatically — no Bearer or companytoken
        needed.
      name: x-api-key
      in: header

````