API referenceSections

Terminate the account; its websites, databases, mail, caches and DNS zones are removed the usual way

Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication

DELETE /api/v1/tenants/{tid}/provisioning/accounts/{ref} may answer 202

Terminate the account; its websites, databases, mail, caches and DNS zones are removed the usual way (ADR 0104), in the background (ADR 0131)

Permissions: plan.manage, site.read, site.write, database.read, database.write, mail.read, mail.write. The account is suspended at once; the removal runs in the background. 204 when it finished within a few seconds; otherwise 202 with the progress (Ending), Location the account, whose ending field shows it until terminated_at is set and account.terminated is sent. A 202 is not kept under the Idempotency-Key: the same call again reports the progress and tries a failed step again at once. Already terminated: 204.

Authentication: API key (Authorization: Bearer …) or session cookie __Host-panel_session.

Parameters

NameInTypeRequiredDescription
tidpathstringrequired
refpathstringrequired

The billing system's own reference: 1 to 64 of A-Z a-z 0-9 . _ : -

  • pattern ^[A-Za-z0-9._:-]{1,64}$
confirmquerystringrequired

Repeat the ref

keep_backups_daysqueryintegeroptional

Remove the account's backups after this many days (0: now); left out, they are kept

  • minimum 0
  • maximum 365
Idempotency-Keyheaderstringoptional

Same key and same request within 24 hours: the first answer is replayed (header Idempotent-Replayed: true). Same key, different request: 422 IDEMPOTENCY_KEY_REUSED.

  • max length 255
X-CSRF-Tokenheaderstringoptional

Required on unsafe requests authenticated by session cookie; API keys do not use it.

Responses

202 Ending: the removal runs in the background

HeaderTypeDescription
Locationstring

Content type: application/json

How far an account's end got (ADR 0131). The end runs in the background: a failed step is tried again at next_try_at (1, 2, 4, 8 then every 15 minutes), or at once when the end is asked again.

  • state string required
    Allowed values: "ending" "ended" "not_ending"
  • tenant_id string required
  • ref string optional
  • reseller boolean required
  • started_at string (date-time) optional
  • ended_at string (date-time) optional
  • steps array<EndStep> required
    • name string required
      Allowed values: "customers" "sites" "databases" "mail" "caches" "dns" "backups"
    • state string required
      Allowed values: "waiting" "running" "done" "failed"
    • total integer required
    • done integer required
    • error StepError optional
      • code string required
      • message string required
      • retryable boolean required
  • attempts integer required

    Passes that stopped on an error

  • last_error StepError optional

    Fields of StepError are shown above.

  • next_try_at string (date-time) optional
  • remote_backups_left array<RemoteBackupLeft> optional

    With keep_backups_days 0: off-machine copies given up because their target did not answer; the end completes without them

    • backup_id string required
    • target string required

      sftp, s3, or the cloud provider

    • where string optional

      Folder or bucket the copy is in, as the backup settings named it (no secret)

    • created_at string (date-time) required
    • code string required

      Why its deletion failed, e.g. BACKUP_DELETE_FAILED, SERVER_TIMEOUT

    • at string (date-time) required
Example
{
  "state": "ending",
  "tenant_id": "string",
  "ref": "string",
  "reseller": true,
  "started_at": "2026-01-01T00:00:00Z",
  "ended_at": "2026-01-01T00:00:00Z",
  "steps": [
    {
      "name": "customers",
      "state": "waiting",
      "total": 0,
      "done": 0,
      "error": {
        "code": "string",
        "message": "string",
        "retryable": true
      }
    }
  ],
  "attempts": 0,
  "last_error": {
    "code": "string",
    "message": "string",
    "retryable": true
  },
  "next_try_at": "2026-01-01T00:00:00Z",
  "remote_backups_left": [
    {
      "backup_id": "string",
      "target": "string",
      "where": "string",
      "created_at": "2026-01-01T00:00:00Z",
      "code": "string",
      "at": "2026-01-01T00:00:00Z"
    }
  ]
}

204 Terminated

429 Error

Content type: application/json

  • code string required
  • message string required
  • details_redacted boolean required
  • correlation_id string required
  • retryable boolean required

default Error

Content type: application/json

Fields of Error are shown above.