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

# Add MotherDuck connection

> Create a new MotherDuck data warehouse connection.



## OpenAPI

````yaml https://api.camelai.com/api/schema/ post /api/v1/sources/add/motherduck/
openapi: 3.0.3
info:
  title: camelAI API
  version: 1.0.0 (v1)
  description: API for camelAI - AI-powered data analytics platform
servers:
  - url: https://api.camelai.com
    description: camelAI API server
security: []
paths:
  /api/v1/sources/add/motherduck/:
    post:
      tags:
        - sources
      summary: Add MotherDuck connection
      description: Create a new MotherDuck data warehouse connection.
      operationId: sources_add_motherduck_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MotherDuckConnectionRequest'
            examples:
              MotherDuck:
                value:
                  type: motherduck
                  database_name: my_database
                  token: motherduck_token_12345
                summary: MotherDuck cloud database connection
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: The ID of the created connection
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  errors:
                    type: object
                    description: Field-specific validation errors
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    MotherDuckConnectionRequest:
      type: object
      description: Serializer for MotherDuck connection configuration.
      properties:
        type:
          type: string
          minLength: 1
          description: Connection type identifier. Must be `MOTHERDUCK`
        account_name:
          type: string
          minLength: 1
          default: MotherDuck
          description: Display name for the connection
        database_name:
          type: string
          minLength: 1
          description: Database name
          maxLength: 255
        token:
          type: string
          writeOnly: true
          minLength: 1
          description: MotherDuck authentication token
      required:
        - database_name
        - token
        - type
      title: MotherDuck
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: API key authentication using Bearer scheme

````