Delete email account
Soft deletes an email account from the workspace. The account is marked as deleted but not permanently removed from the database.
Supported Account Types:
- Works for all account types (IMAP, Google, Office365)
- Unlike create/update operations, deletion is allowed for OAuth accounts via API
Deletion Process:
- Account is marked with a deletion timestamp
- Account will no longer appear in listing endpoints
- Associated data may be retained for audit purposes
- Account cannot be used for sending/receiving emails after deletion
Response:
- Returns a success confirmation
- Returns 404 if account does not exist
DELETE
/administration/email-accounts/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredResponses
200Email account deleted successfully
successboolean401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Email account not found
Request
curl -X DELETE "https://leadtime.app/api/public/administration/email-accounts/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/administration/email-accounts/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/administration/email-accounts/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Email account not found