Get Integration Status
curl --request GET \
--url https://api.example.com/integrations/status/{externalUserIdentifier}import requests
url = "https://api.example.com/integrations/status/{externalUserIdentifier}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/integrations/status/{externalUserIdentifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/integrations/status/{externalUserIdentifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/integrations/status/{externalUserIdentifier}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/integrations/status/{externalUserIdentifier}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/integrations/status/{externalUserIdentifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"type": "google-analytics",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T15:30:00Z",
"propertyId": "123456789",
"syncSchedule": "0 */6 * * *"
},
{
"type": "notion",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T15:00:00Z",
"workspaceName": "My Workspace",
"syncSchedule": "0 */12 * * *"
},
{
"type": "zoho",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T14:45:00Z",
"organizationId": "org-123",
"dc": "com",
"enabledModules": {
"crm": true,
"books": true,
"projects": true
},
"syncSchedule": "0 */4 * * *"
}
]
Integrations
Get Integration Status
Get the status of all integrations for a user
GET
/
integrations
/
status
/
{externalUserIdentifier}
Get Integration Status
curl --request GET \
--url https://api.example.com/integrations/status/{externalUserIdentifier}import requests
url = "https://api.example.com/integrations/status/{externalUserIdentifier}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/integrations/status/{externalUserIdentifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/integrations/status/{externalUserIdentifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/integrations/status/{externalUserIdentifier}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/integrations/status/{externalUserIdentifier}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/integrations/status/{externalUserIdentifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"type": "google-analytics",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T15:30:00Z",
"propertyId": "123456789",
"syncSchedule": "0 */6 * * *"
},
{
"type": "notion",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T15:00:00Z",
"workspaceName": "My Workspace",
"syncSchedule": "0 */12 * * *"
},
{
"type": "zoho",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T14:45:00Z",
"organizationId": "org-123",
"dc": "com",
"enabledModules": {
"crm": true,
"books": true,
"projects": true
},
"syncSchedule": "0 */4 * * *"
}
]
Get the current status and configuration of all integrations for a specific user.
URL Parameters
string
required
Unique identifier for the user in your system
Response
array
List of integration statuses
{
type: string
enabled: boolean
connected: boolean
lastSynced: string
// Additional fields vary by integration type
}[]
Integration-Specific Fields
Google Analytics
string
Selected Google Analytics property ID
string
Data sync schedule
Notion
string
Connected Notion workspace name
string
Data sync schedule
Slack
string
Connected Slack team ID
string
Data sync schedule
Zoho
string
Connected Zoho organization ID
string
Zoho data center
object
Enabled Zoho modules
{
crm: boolean
books: boolean
projects: boolean
}
string
Data sync schedule
Example
curl https://suada.ai/api/public/integrations/status/user-123 \
-H "Authorization: Bearer sk-suada-your-api-key"
import { Suada } from '@suada/node';
const suada = new Suada({
apiKey: 'your-api-key'
});
const status = await suada.getIntegrationStatus('user-123');
from suada import Suada, SuadaConfig
suada = Suada(
config=SuadaConfig(
api_key="your-api-key"
)
)
status = suada.get_integration_status('user-123')
[
{
"type": "google-analytics",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T15:30:00Z",
"propertyId": "123456789",
"syncSchedule": "0 */6 * * *"
},
{
"type": "notion",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T15:00:00Z",
"workspaceName": "My Workspace",
"syncSchedule": "0 */12 * * *"
},
{
"type": "zoho",
"enabled": true,
"connected": true,
"lastSynced": "2024-02-20T14:45:00Z",
"organizationId": "org-123",
"dc": "com",
"enabledModules": {
"crm": true,
"books": true,
"projects": true
},
"syncSchedule": "0 */4 * * *"
}
]
Error Codes
object
Authentication error
{
"error": "Invalid or expired API key"
}
object
User not found
{
"error": "User not found"
}
object
Server error
{
"error": "Failed to get integration status"
}
Notes
- The response includes all available integrations, whether connected or not
- The
lastSyncedtimestamp indicates when data was last synchronized - The
syncScheduleis in cron format - Each integration type may have additional fields specific to its configuration
- The
enabledfield indicates whether the integration is currently active - The
connectedfield indicates whether the OAuth connection is valid
Was this page helpful?