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

# Connect integration

> Connect a new integration. Tests connection before saving. Admin only.



## OpenAPI

````yaml /api-reference/openapi.json post /api/integrations
openapi: 3.1.0
info:
  title: Tedro API
  version: 1.0.0
  description: REST API for the Tedro communication operations platform.
servers:
  - url: https://api.tedro.io
    description: Production
security:
  - sessionCookie: []
    workspaceId: []
paths:
  /api/integrations:
    post:
      tags:
        - Integrations
      summary: Connect integration
      description: Connect a new integration. Tests connection before saving. Admin only.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIntegration'
      responses:
        '201':
          description: Integration connected and tools created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationCreatedResponse'
        '400':
          description: Bad Request - invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized - missing or invalid session cookie
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - insufficient role (admin required)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - sessionCookie: []
          workspaceId: []
components:
  schemas:
    CreateIntegration:
      type: object
      properties:
        type:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        credentials:
          type: string
          minLength: 1
        config:
          type: object
          additionalProperties: {}
      required:
        - type
        - name
        - credentials
      additionalProperties: false
      description: Connect a new integration (e.g., Airtable, Google Sheets)
      example:
        type: airtable
        name: My Airtable
        credentials: pat...
    IntegrationCreatedResponse:
      type: object
      properties: {}
      additionalProperties: {}
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
              - path
              - message
      required:
        - error
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Session cookie set by Better Auth on sign-in.
    workspaceId:
      type: apiKey
      in: header
      name: x-workspace-id
      description: Workspace UUID. Required on all /api/* endpoints.

````