Teams
Manage teams and team members via the API
Teams
Teams group agents together for routing and organization. Conversations can be assigned to a team so any member can handle them.
Base path: /api/v1/accounts/:account_id/teams
List teams
Returns all teams in your account.
GET /api/v1/accounts/:account_id/teamsResponse
[
{
"id": 1,
"name": "Billing Support",
"description": "Handles billing and payment queries",
"allow_auto_assign": true,
"created_at": 1711000000,
"updated_at": 1711000000
}
]const response = await fetch(
'https://app.usendoto.com/api/v1/accounts/1/teams',
{
headers: { 'api_access_token': 'YOUR_TOKEN' },
}
);
const teams = await response.json();
console.log(teams);import requests
response = requests.get(
'https://app.usendoto.com/api/v1/accounts/1/teams',
headers={'api_access_token': 'YOUR_TOKEN'},
)
print(response.json())<?php
$ch = curl_init('https://app.usendoto.com/api/v1/accounts/1/teams');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['api_access_token: YOUR_TOKEN'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);import 'package:http/http.dart' as http;
import 'dart:convert';
final response = await http.get(
Uri.parse('https://app.usendoto.com/api/v1/accounts/1/teams'),
headers: {'api_access_token': 'YOUR_TOKEN'},
);
print(jsonDecode(response.body));require 'net/http'
require 'json'
uri = URI('https://app.usendoto.com/api/v1/accounts/1/teams')
req = Net::HTTP::Get.new(uri)
req['api_access_token'] = 'YOUR_TOKEN'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)Get a team
Returns a single team by ID.
GET /api/v1/accounts/:account_id/teams/:idconst response = await fetch(
'https://app.usendoto.com/api/v1/accounts/1/teams/1',
{
headers: { 'api_access_token': 'YOUR_TOKEN' },
}
);
const team = await response.json();
console.log(team);response = requests.get(
'https://app.usendoto.com/api/v1/accounts/1/teams/1',
headers={'api_access_token': 'YOUR_TOKEN'},
)
print(response.json())<?php
$ch = curl_init('https://app.usendoto.com/api/v1/accounts/1/teams/1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['api_access_token: YOUR_TOKEN'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);final response = await http.get(
Uri.parse('https://app.usendoto.com/api/v1/accounts/1/teams/1'),
headers: {'api_access_token': 'YOUR_TOKEN'},
);
print(jsonDecode(response.body));uri = URI('https://app.usendoto.com/api/v1/accounts/1/teams/1')
req = Net::HTTP::Get.new(uri)
req['api_access_token'] = 'YOUR_TOKEN'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)List team members
Returns all agents who are members of a team.
GET /api/v1/accounts/:account_id/teams/:id/team_membersconst response = await fetch(
'https://app.usendoto.com/api/v1/accounts/1/teams/1/team_members',
{
headers: { 'api_access_token': 'YOUR_TOKEN' },
}
);
const members = await response.json();
console.log(members);response = requests.get(
'https://app.usendoto.com/api/v1/accounts/1/teams/1/team_members',
headers={'api_access_token': 'YOUR_TOKEN'},
)
print(response.json())<?php
$ch = curl_init('https://app.usendoto.com/api/v1/accounts/1/teams/1/team_members');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['api_access_token: YOUR_TOKEN'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);final response = await http.get(
Uri.parse('https://app.usendoto.com/api/v1/accounts/1/teams/1/team_members'),
headers: {'api_access_token': 'YOUR_TOKEN'},
);
print(jsonDecode(response.body));uri = URI('https://app.usendoto.com/api/v1/accounts/1/teams/1/team_members')
req = Net::HTTP::Get.new(uri)
req['api_access_token'] = 'YOUR_TOKEN'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)