Skip to main content
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"
}

Authorizations

Authorization
string
header
required

Enter your API key. Get your API key from https://platform.incredible.one

Path Parameters

integration_id
string
required

The unique identifier of the integration to connect to

Body

application/json
user_id
string
required

The unique identifier of the user attempting to connect

api_key
string

The API key for API key-based authentication (required only for integrations using API key auth)

callback_url
string<uri>

The URL to redirect to after OAuth authentication completes (optional for OAuth flows)

Response

Connection successful or OAuth redirect URL provided

success
boolean

Whether the connection was successful (for API key auth)

message
string

Success or error message

redirect_url
string<uri>

The OAuth authorization URL to redirect the user to (for OAuth flows)

instructions
string

Instructions for the user on how to complete the authentication