Documentation · API reference
POST
/api/v1/admin/accounts/{id}/cancelStop the account's plan from renewing
This page as Markdown, or in an AI chatMore ways to read this page
Stop the account's plan from renewing.
# Stop the account's plan from renewing
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-admin-accounts-id-cancel
`POST /api/v1/admin/accounts/{id}/cancel`
Stop the account's plan from renewing.
## Parameters
- `id` (in path, needed): The account
## What to send
`Reason`: Every action of an operator's says why.
- `reason` (string, needed)
## The answer
200, `AdminAccount`
- `agreed` (integer or null): When the agreement now running was made.
- `audit` (list of AdminLine, needed): What its members did, newest first.
- `buyer` (string): Who the account buys as: empty, `business` or `consumer`.
- `deletion_by` (string, needed)
- `events` (list of AdminEvent, needed): The provider's events about it, newest first.
- `invited` (string or null): The note of the invite code it was made with, if it was: "for Ana".
- `invoices` (list of InvoiceView, needed)
- `limits` (AdminLimits or null)
- `log` (list of AdminLine, needed): What operators did to it, newest first.
- `members` (list of AdminMember, needed)
- `notes` (list of AdminNote, needed)
- `now` (integer, needed)
- `plan` (PlanView, needed): The plan as it applies to this account: its own limits in place.
- `plans` (list of PlanView, needed)
- `row` (AdminAccountRow, needed)
- `sites` (list of AdminSite, needed)
- `subscription` (AdminSubscription or null)
- `suspended_why` (string, needed)
- `terms_ts` (integer or null)
- `terms_version` (string): The version of the terms its owner accepted at sign-up, and when (doc/audit-fixes.md 3.4). Empty where none were published.
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/admin/accounts/{id}/cancel \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"reason": "…"}'
```
Parameters
- idin the address
- neededThe account
What to send
Reason Every action of an operator's says why.
- reason
- stringneeded
The answer
Status 200
AdminAccount
- agreed
- integer or nullWhen the agreement now running was made.
- audit
- list of AdminLineneededWhat its members did, newest first.
- buyer
- stringWho the account buys as: empty, `business` or `consumer`.
- deletion_by
- stringneeded
- events
- list of AdminEventneededThe provider's events about it, newest first.
- invited
- string or nullThe note of the invite code it was made with, if it was: "for Ana".
- invoices
- list of InvoiceViewneeded
- limits
- AdminLimits or null
- log
- list of AdminLineneededWhat operators did to it, newest first.
- members
- list of AdminMemberneeded
- notes
- list of AdminNoteneeded
- now
- integerneeded
- plan
- PlanViewneededThe plan as it applies to this account: its own limits in place.
- plans
- list of PlanViewneeded
- row
- AdminAccountRowneeded
- sites
- list of AdminSiteneeded
- subscription
- AdminSubscription or null
- suspended_why
- stringneeded
- terms_ts
- integer or null
- terms_version
- stringThe version of the terms its owner accepted at sign-up, and when (doc/audit-fixes.md 3.4). Empty where none were published.
Asking
curl -X POST https://tidekeeper.eu/api/v1/admin/accounts/{id}/cancel \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"reason": "…"}'
const answer = await fetch("https://tidekeeper.eu/api/v1/admin/accounts/{id}/cancel", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"reason": "…"}), }).then((r) => r.json());