Remove account
DELETE/v1/account/:account
Stop processing and clear the account's cache. Pass revoke=true to also attempt revocation of the upstream OAuth2 grant at the provider before the account is removed; the response then reports the outcome under revocation. Pass revoke=required to delete the account only when the grant is gone: when the provider does not confirm the revocation the request fails with code RevocationNotConfirmed (502 when the provider was asked, 409 when it could not be) and the account and its credentials are kept, so the request can be retried.
Removes the account, its credentials, its cached data and any messages still queued for delivery. Webhook events generated before the deletion are never delivered afterwards and are discarded once the queue reaches them. Records of deliveries that had already failed permanently are not removed here; they expire on the queue retention window, seven days by default.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
Returns a deletion marker. The account stops syncing immediately; stored data is removed in the background.
Invalid input - the path parameters, query arguments, or request payload did not pass validation. Also returned when the email server refused the request, in which case the response carries a code and the server response instead of a field list
Authentication failed - the access token is missing, invalid, or was not accepted
Access denied - the access token does not grant permission for this operation (token scope, account, or IP address restriction)
Not found - the requested entity (account, message, mailbox, etc.) does not exist
Rate limit exceeded - too many requests were made with this access token
Internal server error - an unexpected error occurred while processing the request