Create a new team. The authenticated user becomes the team owner.
POST https://www.chatzuri.com/api/v1/create-teamname — (string, required) The team display name.description — (string, optional) A short description of the team.const res = await fetch('https://www.chatzuri.com/api/v1/create-team', {
method: 'POST',
headers: {
Authorization: 'Bearer <Your-Secret-Key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Acme Corp',
description: 'Customer support team for Acme Corp'
})
});
const data = await res.json();
console.log(data);
// { teamId: 'team_abc123', url: 'acme-corp' }{
"teamId": "team_abc123",
"url": "acme-corp"
}How to handle API errors gracefully
If there are any errors during the API request, appropriate HTTP status codes will be returned along with error messages in the response body.
That's it! You should now be able to create a agent using the create API.