POST
/
integrations
/
{integrationType}
/
connect
{
  "authUrl": "https://api.notion.com/v1/oauth/authorize?client_id=..."
}

Start the OAuth flow to connect a third-party integration.

URL Parameters

integrationType
string
required

The type of integration to connect. Valid values:

  • google-analytics
  • notion
  • slack
  • zoho
  • gmail

Request

externalUserIdentifier
string
required

Unique identifier for the user in your system

passthroughRedirectUri
string
required

The URL to redirect to after OAuth completion

dc
string

Data center for Zoho integration (e.g., ‘com’, ‘eu’)

scopes
string[]

Additional OAuth scopes for Zoho integration

Response

authUrl
string

The OAuth authorization URL to redirect the user to

Example

curl -X POST https://suada.ai/api/public/integrations/notion/connect \
  -H "Authorization: Bearer sk-suada-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "externalUserIdentifier": "user-123",
    "passthroughRedirectUri": "https://your-app.com/oauth/callback"
  }'
{
  "authUrl": "https://api.notion.com/v1/oauth/authorize?client_id=..."
}

Integration-Specific Parameters

Google Analytics

No additional parameters required.

Notion

No additional parameters required.

Slack

No additional parameters required.

Zoho

dc
string
default:"com"

Zoho data center:

  • com - US data center
  • eu - EU data center
  • in - India data center
  • com.cn - China data center
  • com.au - Australia data center
scopes
string[]

List of Zoho API scopes to request. Default scopes include:

  • ZohoCRM.modules.ALL
  • ZohoBooks.fullaccess.ALL
  • ZohoProjects.projects.ALL

Gmail

No additional parameters required.

Error Codes

400
object

Invalid request

{
  "error": "Missing required parameters"
}
401
object

Authentication error

{
  "error": "Invalid or expired API key"
}
500
object

Server error

{
  "error": "Failed to initialize OAuth flow"
}

Notes

  • The OAuth flow is a multi-step process:
    1. Call this endpoint to get the authorization URL
    2. Redirect the user to the authorization URL
    3. User authorizes your application
    4. Integration provider redirects to your callback URL
    5. Call the callback endpoint to complete the flow
  • The passthroughRedirectUri should be a URL in your application that can handle the OAuth callback
  • Store the externalUserIdentifier to associate the integration with the correct user after the callback