Remove the agent's profile picture and revert to the default avatar.
DELETE https://www.chatzuri.com/api/v1/delete-agent-profile-pictureconst res = await fetch('https://www.chatzuri.com/api/v1/delete-agent-profile-picture', {
method: 'DELETE',
headers: {
Authorization: 'Bearer <Your-Secret-Key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({ agentId: '<Your-Agent-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.