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

# Create Integration

## Create Integration

Create a new integration for the authenticated user.

## Request Body

<ParamField body name="integration" type="object" required>
  Integration object

  <ParamField body name="integration_type" type="string" required>
    Type of integration (e.g., 'elevenlabs', 'openai', 'anthropic')
  </ParamField>

  <ParamField body name="config" type="object" required>
    Integration-specific configuration
  </ParamField>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.example.com/api/v1/integrations" \
    -H "X-API-Key: your-api-key-here" \
    -H "Content-Type: application/json" \
    -d '{
      "integration": {
        "integration_type": "elevenlabs",
        "config": {
          "api_key": "sk_your_elevenlabs_key"
        }
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.example.com/api/v1/integrations', {
    method: 'POST',
    headers: {
      'X-API-Key': 'your-api-key-here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      integration: {
        integration_type: 'elevenlabs',
        config: {
          api_key: 'sk_your_elevenlabs_key'
        }
      }
    })
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'X-API-Key': 'your-api-key-here',
      'Content-Type': 'application/json'
  }

  payload = {
      'integration': {
          'integration_type': 'elevenlabs',
          'config': {
              'api_key': 'sk_your_elevenlabs_key'
          }
      }
  }

  response = requests.post(
      'https://api.example.com/api/v1/integrations',
      headers=headers,
      json=payload
  )

  data = response.json()
  ```
</RequestExample>

## Response

<ResponseField name="status" type="object">
  Response status information

  <ResponseField name="code" type="integer">
    HTTP status code (201)
  </ResponseField>

  <ResponseField name="message" type="string">
    Status message
  </ResponseField>
</ResponseField>

<ResponseField name="data" type="object">
  Created integration object
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": {
      "code": 201,
      "message": "Integration created successfully"
    },
    "data": {
      "id": 1,
      "integration_type": "elevenlabs",
      "config": {
        "api_key": "sk_***"
      },
      "schema": {
        "required": ["api_key"],
        "optional": [],
        "fields": {
          "api_key": {
            "type": "string",
            "description": "ElevenLabs API key"
          }
        }
      },
      "user_id": 1,
      "user_email": "user@example.com",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  }
  ```
</ResponseExample>

## Error Responses

<ResponseField name="401" type="object">
  Unauthorized - Invalid or missing authentication
</ResponseField>

<ResponseField name="422" type="object">
  Validation error - Invalid request body
</ResponseField>
