Docs
Account, keys and webhooks ›

Close account

POST/v1/me/close

Close the account. A person signed in only. It can be reopened for 30 days.

Requestcurl
  1. curl -X POST https://agental.io/v1/me/close \
  2. -H "Authorization: Bearer $AGENTAL_API_KEY" \
  3. -H "Content-Type: application/json" \
  4. -d '{"confirm":"[email protected]"}'
Answer200 OK

No JSON body.

The account is closed.

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Body

confirmrequired
string
The account's email address, to show it is meant. e.g. "[email protected]"

Returns

200 The account is closed. Its plan has ended, its API keys and other sessions are ended, mail is off on every sandbox, and running sandboxes are stopped with their disks kept. It can be reopened until eraseAt, when it is erased. Closing a closed account changes nothing.

Errors and other answers

400confirm_close_required confirm is not the account's email address. Nothing was closed.
403session_required an API key cannot do this. A person signed in can, from Settings in the console.
409team_owner the account is the only owner of a team that has other members. Make another member an owner first. Nothing was closed.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.