Files

48 lines
1.1 KiB
YAML

tags:
- Teams
operationId: create-a-team
summary: Create a team
security:
- userApiKey: []
description: Create a team in the account
parameters:
- $ref: '#/components/parameters/account_id'
x-codeSamples:
- lang: python
label: "Create a team"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
team = client.teams.create(
account_id=1,
name="Support Team",
description="Customer support team",
allow_auto_assign=True
)
print(team.id, team.name)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/team_create_update_payload'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/team'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'