Connect · Teams
Get team
Returns a team for the supplied organization and team IDs. The response includes its parent, subteams, chat style, and inherited chat style. Actor details may be masked depending on the caller’s permissions.
Permissions
Send an API key of the organization in the path, using the X-API-Key header.
Who may call it
- The caller must have organization access.
- The caller needs
team.read. - When organization access is not null, a non-contact actor other than the current actor is masked without
user.read. - When organization access is not null, an API actor is masked without
apiKey.read.
Request
Path parameters
-
organizationIdidrequired -
teamIdidrequired
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
--request GET 'https://cloud.campai.com/api/connect/organizations/YOUR_ORGANIZATION_ID/teams/YOUR_TEAM_ID' \
--header 'X-API-Key: YOUR_API_KEY'const response = await fetch("https://cloud.campai.com/api/connect/organizations/YOUR_ORGANIZATION_ID/teams/YOUR_TEAM_ID", {
method: "GET",
headers: {
"X-API-Key": "YOUR_API_KEY"
},
redirect: 'error',
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) throw new Error(`campai HTTP ${response.status}`);
const text = await response.text();
const result = text ? JSON.parse(text) : null;
console.log(JSON.stringify(result, null, 2));<?php
$context = stream_context_create(['http' => [
'method' => 'GET',
'header' => [
'X-API-Key: YOUR_API_KEY',
],
'timeout' => 30,
'follow_location' => 0,
'ignore_errors' => true,
]]);
$text = @file_get_contents('https://cloud.campai.com/api/connect/organizations/YOUR_ORGANIZATION_ID/teams/YOUR_TEAM_ID', false, $context);
preg_match('/^HTTP\/\S+ (\d{3})/', $http_response_header[0] ?? '', $match);
$status = (int) ($match[1] ?? 0);
if ($text === false || $status < 200 || $status >= 300) {
throw new RuntimeException("campai HTTP $status (0 means no response)");
}
$result = $text === '' ? null : json_decode($text, true, 512, JSON_THROW_ON_ERROR);
echo json_encode($result, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR), PHP_EOL;
Response
200 Successful response
Content-Type: application/json
-
_idid -
createdAtstring · date-timenullable -
updatedAtstring · date-timenullable -
removedAtstring · date-timenullable -
createdByobjectnullable -
updatedByobjectnullable -
removedByobjectnullable -
__ignoreTriggersstringnullable -
organizationid -
namestring1–80 characters
-
parentTeamidnullable -
descriptionstringat most 256 characters
-
avatarobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
membershipobject4 properties
-
contactTypesstring[]memberaddresscustomersponsorcontributoremployeesupplier -
segmentsstring[]each 1–30 characters
-
departmentsid[] -
tagsstring[]at most 20 items · each 1–40 characters
-
-
memberRoleid -
roleNamestring1–32 characters
-
contactCountintegerat least 0
-
joinedContactCountintegerat least 0
-
userCountintegerat least 0
-
membershipRevisionintegerat least 0
-
latestActivityAtstring · date-timenullable -
synchronizationobject4 properties
-
statusstringpendingfailedcompleted -
revisionintegerat least 0
-
notifyUserIdstringnullable -
contactCursoridnullable
-
-
deletionCleanupobject1 property
-
statusstringpendingfailedcompleted
-
-
chatStyleobject2 properties
-
lightobjectnullable4 properties
-
backgroundobject -
incomingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
outgoingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
accentobject3 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$ -
foregroundColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
-
darkobjectnullable4 properties
-
backgroundobject -
incomingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
outgoingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
accentobject3 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$ -
foregroundColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
-
-
inheritedChatStyleobjectnullableinheritedChatStyleis null when the organization has no chat style.2 properties
-
lightobjectnullable4 properties
-
backgroundobject -
incomingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
outgoingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
accentobject3 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$ -
foregroundColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
-
darkobjectnullable4 properties
-
backgroundobject -
incomingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
outgoingobject2 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
accentobject3 properties
-
backgroundColorstringpattern
^#[0-9a-fA-F]{6}$ -
textColorstringpattern
^#[0-9a-fA-F]{6}$ -
foregroundColorstringpattern
^#[0-9a-fA-F]{6}$
-
-
-
-
parentobjectnullableparentis null when the team has no parent team.2 properties
-
_idid -
namestring1–80 characters
-
-
subteamsobject[]subteamsis empty when the team has a parent team.9 properties
-
_idid -
namestring1–80 characters
-
descriptionstringat most 256 characters
-
avatarobjectnullable4 properties
-
resourcestringat least 1 characters
-
fileNamestringat most 128 characters
-
contentTypestringat most 75 characters
-
fileSizeBytesintegerat least 0
-
-
roleNamestring1–32 characters
-
contactCountintegerat least 0
-
joinedContactCountintegerat least 0
-
userCountintegerat least 0
-
latestActivityAtstring · date-timenullable
-
{
"_id": "000000000000000000000001",
"organization": "000000000000000000000001",
"name": "string",
"parentTeam": "000000000000000000000001",
"description": "string",
"avatar": {
"resource": "string"
},
"membership": {
"contactTypes": [
"member"
],
"segments": [
"string"
],
"departments": [
"000000000000000000000001"
],
"tags": [
"string"
]
},
"memberRole": "000000000000000000000001",
"roleName": "string",
"contactCount": 0,
"joinedContactCount": 0,
"userCount": 0,
"membershipRevision": 0,
"latestActivityAt": "2026-06-15T22:30:00Z",
"chatStyle": {
"light": {
"background": {
"kind": "gradient",
"colors": [
"string"
],
"position": 0,
"animated": true,
"speed": 0.25,
"pattern": {
"assetId": "string",
"opacity": 0,
"scale": 0.5,
"mode": "overlay"
}
},
"incoming": {
"backgroundColor": "string",
"textColor": "string"
},
"outgoing": {
"backgroundColor": "string",
"textColor": "string"
},
"accent": {
"backgroundColor": "string",
"textColor": "string",
"foregroundColor": "string"
}
},
"dark": {
"background": {
"kind": "gradient",
"colors": [
"string"
],
"position": 0,
"animated": true,
"speed": 0.25,
"pattern": {
"assetId": "string",
"opacity": 0,
"scale": 0.5,
"mode": "overlay"
}
},
"incoming": {
"backgroundColor": "string",
"textColor": "string"
},
"outgoing": {
"backgroundColor": "string",
"textColor": "string"
},
"accent": {
"backgroundColor": "string",
"textColor": "string",
"foregroundColor": "string"
}
}
},
"inheritedChatStyle": {
"light": {
"background": {
"kind": "gradient",
"colors": [
"string"
],
"position": 0,
"animated": true,
"speed": 0.25,
"pattern": {
"assetId": "string",
"opacity": 0,
"scale": 0.5,
"mode": "overlay"
}
},
"incoming": {
"backgroundColor": "string",
"textColor": "string"
},
"outgoing": {
"backgroundColor": "string",
"textColor": "string"
},
"accent": {
"backgroundColor": "string",
"textColor": "string",
"foregroundColor": "string"
}
},
"dark": {
"background": {
"kind": "gradient",
"colors": [
"string"
],
"position": 0,
"animated": true,
"speed": 0.25,
"pattern": {
"assetId": "string",
"opacity": 0,
"scale": 0.5,
"mode": "overlay"
}
},
"incoming": {
"backgroundColor": "string",
"textColor": "string"
},
"outgoing": {
"backgroundColor": "string",
"textColor": "string"
},
"accent": {
"backgroundColor": "string",
"textColor": "string",
"foregroundColor": "string"
}
}
},
"parent": {
"_id": "000000000000000000000001",
"name": "string"
},
"subteams": [
{
"_id": "000000000000000000000001",
"name": "string",
"description": "string",
"avatar": {
"resource": "string"
},
"roleName": "string",
"contactCount": 0,
"joinedContactCount": 0,
"userCount": 0,
"latestActivityAt": "2026-06-15T22:30:00Z"
}
]
}
Errors
Other errors
| Status | Error | When |
|---|---|---|
| 404 | The team was not found | If the team is not found in the organization, the endpoint returns HTTP 404 with routes.connect.teams.notFound. |
Errors nearly every request can meet are listed under Errors.