Skip to main content

Create Integration

Create a new integration for the authenticated user.

Request Body

object
required
Integration object
string
required
Type of integration (e.g., ‘elevenlabs’, ‘openai’, ‘anthropic’)
object
required
Integration-specific configuration
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"
      }
    }
  }'

Response

status
object
Response status information
code
integer
HTTP status code (201)
message
string
Status message
data
object
Created integration object
{
  "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": "[email protected]",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}

Error Responses

401
object
Unauthorized - Invalid or missing authentication
422
object
Validation error - Invalid request body