Skip to content

Create Team

POST
/teams

Create a team, with its members and channels, in ONE transaction.

Everything in the body lands atomically: a team is never briefly visible with none of its mailboxes attached, and a rejected member id rolls the whole thing back rather than leaving a half-built team.

409 when the name is already taken in this organisation.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Create a team. Mirrors teams.TeamCreateDTO.

Every *_ids list is applied in the SAME transaction as the team row, so a team is never briefly visible with none of its channels attached.

object
agent_id
Any of:
string
<= 255 characters
campaign_ids
Any of:
Array<string>
chat_intent
Any of:
string
chatbot_ids
Any of:
Array<string>
color
Any of:
string
<= 20 characters /^(#[0-9A-Fa-f]{6})?$/
description
Any of:
string
linkedin_account_ids
Any of:
Array<string>
mailbox_ids
Any of:
Array<integer>
members
Any of:
Array<object>

One member in a team’s single-save membership list.

object
role

Member | manager

string
default: member
Allowed values: member manager
user_id
required
string
>= 1 characters <= 255 characters
name
required
string
>= 1 characters <= 100 characters
phone_number_ids
Any of:
Array<integer>
sequence_ids
Any of:
Array<string>
type
string
default: functional <= 50 characters

Responses

201

Successful Response

object
data
required

An open envelope for a single role, team, member or account record.

Open on purpose. The app’s own response models on this surface grow with the product - RoleResponse gained rep_limits and manages_role_slugs, TeamResponse gained channel counts and a campaign count - and a pinned mirror would SILENTLY DROP whatever it had not caught up on. A dropped permission in a role read is the worst possible kind of stale: it reads as “they do not have it”.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string