Permanently delete a team. Only the team owner can do this.
Warning: Deleting a team is irreversible. All agents, conversations, leads, and members will be permanently removed.
DELETE https://www.chatzuri.com/api/v1/delete-teamconst res = await fetch('https://www.chatzuri.com/api/v1/delete-team', {
method: 'DELETE',
headers: {
Authorization: 'Bearer <Your-Secret-Key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({ teamId: '<Your-Team-ID>' })
});
const data = await res.json();
console.log(data); // { success: true }{
"success": true
}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.