Integrări
10 endpoint-uri. Fiecare cale de mai jos este relativă la URL-ul de bază al API-ului și include deja prefixul /api/v1 — vezi convențiile pentru autentificare, paginare, erori și idempotență.
| Endpoint | ||
|---|---|---|
| GET | /integrations | The connect gallery: connectable integrations by category, with this org's connections |
| GET | /integrations/{slug} | One catalogue entry, including its declared action schemas |
| GET | /integrations/connections | List this organization's integration connections |
| POST | /integrations/connections | Connect an integration, encrypting any supplied secrets into a credential row, and return the connection |
| GET | /integrations/connections/{connection} | Retrieve one integration connection; secrets live in the credential row and are not returned |
| DELETE | /integrations/connections/{connection} | Disconnect an integration: revoke the OAuth grant, wipe and delete the credential, drop the connection |
| POST | /integrations/connections/{connection}/actions/{action} | Run one of the connector's declared actions and return the connector's result envelope |
| POST | /integrations/connections/{connection}/sync | Pull remote records from the connector into CallAgent and return the sync result |
| POST | /integrations/connections/{connection}/test | Make a cheap read-only call through the connection to prove the stored credential still works |
| GET | /integrations/tools | List the connector actions this organization's connected integrations expose to assistants as tools |
Endpoint-uri
The connect gallery: connectable integrations by category, with this org's connections
- Handler-ul nu impune niciun scope — orice cheie validă îl poate apela.
- Enforces no scope. data is an object keyed by category, not an array, and connectors whose maturity is not
implementedare omitted entirely.
curl -X GET "$CALLAGENT_API_URL/integrations" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.get(
f"{os.environ['CALLAGENT_API_URL']}/integrations",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | data-wrapped object |
Exemplu de răspuns, generat din schemă:
{
"data": {}
}One catalogue entry, including its declared action schemas
- Handler-ul nu impune niciun scope — orice cheie validă îl poate apela.
- Only connectors with maturity
implementedresolve; a registered but unimplemented connector 404s here even though it exists in code.
Parametri de cale
| Nume | Tip | Obligatoriu | Note |
|---|---|---|---|
slug | string | da |
curl -X GET "$CALLAGENT_API_URL/integrations/google-calendar" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/google-calendar`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/google-calendar');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.get(
f"{os.environ['CALLAGENT_API_URL']}/integrations/google-calendar",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | data-wrapped object |
Erori
| Status | Când apare |
|---|---|
404 | No connectable integration with that slug |
Exemplu de răspuns, generat din schemă:
{
"data": {
"slug": "string",
"name": "Support Line",
"category": "string",
"description": "string",
"auth_type": "string",
"auth_fields": {},
"default_scopes": {},
"capabilities": {},
"documentation_url": "https://example.com/hook"
}
}List this organization's integration connections
- Handler-ul nu impune niciun scope — orice cheie validă îl poate apela.
- Enforces no scope — there is no integration.read in the vocabulary, so any authenticated key can list connections. The
integrationfilter matches the connector slug.
curl -X GET "$CALLAGENT_API_URL/integrations/connections" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/connections`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/connections');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.get(
f"{os.environ['CALLAGENT_API_URL']}/integrations/connections",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | Array of IntegrationConnectionResource |
Exemplu de răspuns, generat din schemă:
{
"data": [
{
"id": "01JQ0000000000000000000000",
"object": "string",
"integration": "string",
"name": "Support Line",
"status": "string",
"active": true,
"config": {},
"granted_capabilities": {},
"auth": "oauth2",
"connected_at": "2026-01-01T12:00:00+00:00",
"last_tested_at": "2026-01-01T12:00:00+00:00",
"last_test_status": "string",
"last_synced_at": "2026-01-01T12:00:00+00:00",
"last_error": "string",
"created_at": "2026-01-01T12:00:00+00:00"
}
]
}Connect an integration, encrypting any supplied secrets into a credential row, and return the connection
API-key connectors take their credentials in secrets, which are encrypted immediately and never returned. OAuth connectors take an oauth_connection_id from a completed authorization.
- Necesită
integration.write. - A connector whose maturity is not
implementedis refused with 422 invalid_integration. Missing catalogue rows 404 via firstOrFail, which the spec does not declare.
Corpul cererii
| Câmp | Tip | Obligatoriu | Note |
|---|---|---|---|
integration | string | da | max 64 chars |
name | string | da | max 255 chars |
secrets | string[] | null | — | |
config | string[] | null | — | |
oauth_connection_id | string | null | — |
curl -X POST "$CALLAGENT_API_URL/integrations/connections" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"integration": "string",
"name": "Support Line",
"oauth_connection_id": "01JQ0000000000000000000000"
}'const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/connections`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"integration": "string",
"name": "Support Line",
"oauth_connection_id": "01JQ0000000000000000000000"
}),
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/connections');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'integration' => 'string',
'name' => 'Support Line',
'oauth_connection_id' => '01JQ0000000000000000000000',
]),
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.post(
f"{os.environ['CALLAGENT_API_URL']}/integrations/connections",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
json={
"integration": "string",
"name": "Support Line",
"oauth_connection_id": "01JQ0000000000000000000000"
},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
201 | data-wrapped object |
Erori
| Status | Când apare |
|---|---|
403 | The presenting API key does not carry the integration.write scope |
404 | The connector exists in code but has no row in the integrations catalogue |
422 | Validation failed, the connector slug is unknown, or the connector is not implemented yet |
Exemplu de răspuns, generat din schemă:
{
"data": {
"id": "01JQ0000000000000000000000",
"object": "string",
"integration": "string",
"name": "Support Line",
"status": "string",
"active": true,
"config": {},
"granted_capabilities": {},
"auth": "oauth2",
"connected_at": "2026-01-01T12:00:00+00:00",
"last_tested_at": "2026-01-01T12:00:00+00:00",
"last_test_status": "string",
"last_synced_at": "2026-01-01T12:00:00+00:00",
"last_error": "string",
"created_at": "2026-01-01T12:00:00+00:00"
}
}Retrieve one integration connection; secrets live in the credential row and are not returned
- Handler-ul nu impune niciun scope — orice cheie validă îl poate apela.
- Enforces no scope, unlike every write action on the same resource.
Parametri de cale
| Nume | Tip | Obligatoriu | Note |
|---|---|---|---|
connection | string | da | The connection ID |
curl -X GET "$CALLAGENT_API_URL/integrations/connections/01JQ0000000000000000000000" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/connections/01JQ0000000000000000000000`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/connections/01JQ0000000000000000000000');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.get(
f"{os.environ['CALLAGENT_API_URL']}/integrations/connections/01JQ0000000000000000000000",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | IntegrationConnectionResource |
Erori
| Status | Când apare |
|---|---|
404 | No such connection in this organization |
Exemplu de răspuns, generat din schemă:
{
"data": {
"id": "01JQ0000000000000000000000",
"object": "string",
"integration": "string",
"name": "Support Line",
"status": "string",
"active": true,
"config": {},
"granted_capabilities": {},
"auth": "oauth2",
"connected_at": "2026-01-01T12:00:00+00:00",
"last_tested_at": "2026-01-01T12:00:00+00:00",
"last_test_status": "string",
"last_synced_at": "2026-01-01T12:00:00+00:00",
"last_error": "string",
"created_at": "2026-01-01T12:00:00+00:00"
}
}Disconnect an integration: revoke the OAuth grant, wipe and delete the credential, drop the connection
- Necesită
integration.write. - Acest răspuns nu este împachetat în
data. - The credential's ciphertext is cleared before the row is soft-deleted, so the disconnect leaves no usable key material behind.
Parametri de cale
| Nume | Tip | Obligatoriu | Note |
|---|---|---|---|
connection | string | da | The connection ID |
curl -X DELETE "$CALLAGENT_API_URL/integrations/connections/01JQ0000000000000000000000" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/connections/01JQ0000000000000000000000`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/connections/01JQ0000000000000000000000');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.delete(
f"{os.environ['CALLAGENT_API_URL']}/integrations/connections/01JQ0000000000000000000000",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
204 | No content |
Erori
| Status | Când apare |
|---|---|
403 | The presenting API key does not carry the integration.write scope |
404 | No such connection in this organization |
Run one of the connector's declared actions and return the connector's result envelope
- Necesită
integration.write. - Only error code unknown_action maps to 404; not_connected and unknown_connector both come back as 502. The action's declared input_schema is NOT validated by the API.
Parametri de cale
| Nume | Tip | Obligatoriu | Note |
|---|---|---|---|
connection | string | da | The connection ID |
action | string | da |
Corpul cererii
| Câmp | Tip | Obligatoriu | Note |
|---|---|---|---|
input | string[] | null | — |
curl -X POST "$CALLAGENT_API_URL/integrations/connections/01JQ0000000000000000000000/actions/createEvent" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/connections/01JQ0000000000000000000000/actions/createEvent`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/connections/01JQ0000000000000000000000/actions/createEvent');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.post(
f"{os.environ['CALLAGENT_API_URL']}/integrations/connections/01JQ0000000000000000000000/actions/createEvent",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | JSON object |
Erori
| Status | Când apare |
|---|---|
403 | The presenting API key does not carry the integration.write scope |
404 | The connection does not exist, or the connector does not declare that action |
422 | input was sent but is not an array |
502 | The connector failed, is not registered, or the connection is not in a connected state |
Exemplu de răspuns, generat din schemă:
"string"Pull remote records from the connector into CallAgent and return the sync result
- Necesită
integration.write. - Effectively a stub for all but one connector: only McpConnector overrides sync, so every other connection returns 502 with error code not_implemented.
Parametri de cale
| Nume | Tip | Obligatoriu | Note |
|---|---|---|---|
connection | string | da | The connection ID |
curl -X POST "$CALLAGENT_API_URL/integrations/connections/01JQ0000000000000000000000/sync" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/connections/01JQ0000000000000000000000/sync`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/connections/01JQ0000000000000000000000/sync');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.post(
f"{os.environ['CALLAGENT_API_URL']}/integrations/connections/01JQ0000000000000000000000/sync",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | JSON object |
Erori
| Status | Când apare |
|---|---|
403 | The presenting API key does not carry the integration.write scope |
404 | No such connection in this organization |
502 | The connector failed, is not registered, or does not implement sync |
Exemplu de răspuns, generat din schemă:
"string"Make a cheap read-only call through the connection to prove the stored credential still works
- Necesită
integration.write. - A failing test is HTTP 502 with ok:false, and it also writes last_tested_at, last_test_status and status back onto the connection.
Parametri de cale
| Nume | Tip | Obligatoriu | Note |
|---|---|---|---|
connection | string | da | The connection ID |
curl -X POST "$CALLAGENT_API_URL/integrations/connections/01JQ0000000000000000000000/test" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/connections/01JQ0000000000000000000000/test`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/connections/01JQ0000000000000000000000/test');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.post(
f"{os.environ['CALLAGENT_API_URL']}/integrations/connections/01JQ0000000000000000000000/test",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | JSON object |
Erori
| Status | Când apare |
|---|---|
403 | The presenting API key does not carry the integration.write scope |
404 | No such connection in this organization |
502 | The connector rejected the credential, failed, or is not registered |
Exemplu de răspuns, generat din schemă:
"string"List the connector actions this organization's connected integrations expose to assistants as tools
- Handler-ul nu impune niciun scope — orice cheie validă îl poate apela.
- Only connections in a connected state and connectors with exposesTools() contribute; tool names are
<slug>_<action>.
curl -X GET "$CALLAGENT_API_URL/integrations/tools" \
-H "Authorization: Bearer $CALLAGENT_API_KEY" \
-H "Accept: application/json"const response = await fetch(`${process.env.CALLAGENT_API_URL}/integrations/tools`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CALLAGENT_API_KEY}`,
Accept: 'application/json',
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();<?php
$handle = curl_init(getenv('CALLAGENT_API_URL') . '/integrations/tools');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CALLAGENT_API_KEY'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($handle), true);
$status = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
if ($status >= 400) {
throw new RuntimeException("{$body['error']['type']}: {$body['error']['message']}");
}
$data = $body['data'];import os, requests
response = requests.get(
f"{os.environ['CALLAGENT_API_URL']}/integrations/tools",
headers={"Authorization": f"Bearer {os.environ['CALLAGENT_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()["data"]Răspunsuri
| Status | Corp |
|---|---|
200 | data-wrapped array |
Exemplu de răspuns, generat din schemă:
{
"data": [
{
"name": "Support Line",
"description": "string",
"input_schema": "string",
"connection_id": "01JQ0000000000000000000000",
"action": "string",
"mutating": "string"
}
]
}