POST
/
v1
/
integrations
/
{integration_id}
/
connect
{
  "user_id": "user_123",
  "api_key": "your_api_key_here"
}
{
  "success": true,
  "message": "Successfully connected to Perplexity",
  "integration_id": "perplexity",
  "user_id": "user_123"
}
integration_id
string
required
The unique identifier of the integration to connect to

API Key Authentication

For integrations that use API key authentication (like Perplexity):
curl -X POST "https://api.incredible.one/v1/integrations/{integration_id}/connect" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"user_123","api_key":"YOUR_API_KEY"}'
{
  "user_id": "user_123",
  "api_key": "your_api_key_here"
}
{
  "success": true,
  "message": "Successfully connected to Perplexity",
  "integration_id": "perplexity",
  "user_id": "user_123"
}

OAuth Authentication

For integrations that use OAuth authentication (like Gmail):
curl -X POST "https://api.incredible.one/v1/integrations/{integration_id}/connect" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"user_123","callback_url":"https://your.app/oauth/callback"}'
{
  "user_id": "user_123",
  "callback_url": "https://backend.viss.ai/app-auth/oauth2-callback"
}
{
  "redirect_url": "https://auth.composio.com/oauth/authorize?client_id=...",
  "instructions": "Please visit the redirect URL to complete OAuth authentication"
}

Error Responses

{
  "error": "User ID required",
  "instructions": "Please provide user_id in request body"
}
{
  "error": "API key required",
  "instructions": "Please provide your Gmail API key in the request body"
}

Path Parameters

integration_id
string
required

The unique identifier of the integration to connect to

Body

application/json

Response

Connection successful or OAuth redirect URL provided

The response is of type object.