API
Creating a teamโ
POST /teams.create
Sample request
{
name: 'Sms Customer Service',
query: {
conversations: 'source:*sms AND unread_count:[1 TO *]',
},
user_ids: ['user id 1', 'user id 2'],
}
Sample response
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'Sms Customer Service',
query: {
conversations: 'source:*sms AND unread_count:[1 TO *]',
},
user_ids: ['user_id_1', 'user_id_2'],
}
Add a memberโ
POST /teams.addMember
Sample request
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
user_id: 'user_id_1',
}
Sample response
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'Sms Customer Service',
query: {
conversations: 'source:*sms AND unread_count:[1 TO *]',
},
user_ids: ['user_id_1', 'user_id_2'],
}
Remove a memberโ
POST /teams.removeMember
Sample request
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
user_id: 'user_id_1',
}
Sample response
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'SMS Customer Service',
query: {
conversations: 'source:*sms AND unread_count:[1 TO *]',
},
user_ids: ['user_id_2'],
}
Listing teamsโ
POST /teams.list
This is a paginated endpoint.
Sample response
{
data: [
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'SMS Customer Service',
query: {
conversations: 'source:*sms AND unread_count:[1 TO *]',
},
user_ids: ['user_id_1', 'user_id_2'],
},
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'Menlo Street Coffee team',
query: {
conversations: 'metadata.source.google.place_id:1234',
},
user_ids: ['user_id_2', 'user_id_3'],
},
],
}
Get a single teamโ
POST /teams.info
Sample request
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
}
Sample response
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'Menlo Street Coffee team',
query: {
conversations: 'metadata.source.google.place_id:1234',
},
user_ids: ['user_id_2', 'user_id_3'],
}
Update a teamโ
POST /teams.update
All fields except for the id
are optional and will be applied on top of the
existing record.
Sample request
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'Sms Customer Service', // optional
query: {
// optional
conversations: 'source:*sms AND unread_count:[1 TO *]',
},
}
Sample response
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
name: 'SMS Customer Service',
query: {
conversations: 'source:*sms AND unread_count:[1 TO *]',
},
}
Delete a teamโ
POST /teams.delete
Sample request
{
id: '7491e1a8-eff4-46d7-9f41-26730e826378',
}
Empty response (204)