---
title: "Remove an account"
method: DELETE
path: "/accounts/{id}"
tags: ["Accounts"]
---

# Remove an account

`DELETE /accounts/{id}`

## Request

- Base URL: `https://api.rizamo.com/v1`
- URL: `https://api.rizamo.com/v1/accounts/{id}`
- Auth: HTTP bearer

It stops publishing and is no longer billed, and nothing changes on its network. Its posts: one that goes to it alone moves to Deleted (`post.deleted`), scheduled, draft or published, and can be restored for 30 days; one with other accounts keeps them, loses this account's part that never went out (`post.updated`) and keeps the part that did, with its `url` and without its numbers (`accountRemoved` on the target). The answer counts them by status (`Preview removing an account` counts them before). Its name, picture and followers go at once; its handle stays to name those parts, with their links, for as long as their posts exist. What Rizamo read from the network about its posts there is deleted, and so are its comments and messages in the inbox, with the events that carry them (`comment.received`, `message.received`, `message.sent`, `comment_automation.*`) and their webhook deliveries. Its comment automations are paused (each with a `comment_automation.paused` event) and their runs deleted with the comments, so their numbers start again from zero and people they answered may be answered once more. It is told as `account.removed` with `reason` `removed_by_team`, never `account.disconnected`, which is a lost login. Connecting it again brings back the same account, its automations paused, to resume; posts in Deleted are restored by hand. Removing an account changes the bill, so only owners remove one, or an API key an owner let remove accounts and delete profiles when making it (Developers in the web app); other API keys are refused (403).

## Path parameters

- `id` string, required: The account's id (`acc_`).

## Response `200`

OK

- AccountRemoved
  - `posts` object, required: By the post's status now.
    - `scheduled` object, required
      - `posts` integer, required: Posts that use the account. Deleted posts are left out.
      - `movedToDeleted` integer, required: Of those, the ones that go to no other account: they move to Deleted, where they can be restored for 30 days.
    - `drafts` object, required
      - `posts` integer, required: Posts that use the account. Deleted posts are left out.
      - `movedToDeleted` integer, required: Of those, the ones that go to no other account: they move to Deleted, where they can be restored for 30 days.
    - `published` object, required: Published or partly published. A post with other accounts keeps the removed account's published part, with its link and without its numbers.
      - `posts` integer, required: Posts that use the account. Deleted posts are left out.
      - `movedToDeleted` integer, required: Of those, the ones that go to no other account: they move to Deleted, where they can be restored for 30 days.
    - `failed` object, required
      - `posts` integer, required: Posts that use the account. Deleted posts are left out.
      - `movedToDeleted` integer, required: Of those, the ones that go to no other account: they move to Deleted, where they can be restored for 30 days.
  - `id` string, required

## Other responses

- `400`: `invalid_request`: A field is missing or wrong, or the request cannot be done as asked: the message names the field or says what to change.
- `401`: `unauthorized`: No API key or sign-in, or the key does not work: it was deleted, or it expired.
- `403`: `forbidden`: The caller may not do this: the key or agent lacks the scope (the message names it), or the action needs another role or a fresh sign-in.
- `404`: `not_found`: No such object, or it is outside your team or the profiles your key reaches.
- `409`: `conflict`: The object's state does not allow it now, such as an account that needs a new login. `queue_empty`: A post with `queue: true` whose profile has no posting times: set them, or give a `scheduledAt`. `queue_full`: No posting time free for the post's accounts in the next 90 days: add times, or give a `scheduledAt`. `idempotency_key_in_use`: A request with this `Idempotency-Key` is still running: try again in a moment.
- `413`: `payload_too_large`: The body is over 1 MB: files go up through the upload links of `POST /v1/media`.
- `415`: `unsupported_media_type`: The body is not JSON: send it with `Content-Type: application/json`.
- `429`: `rate_limited`: Over one of Rizamo's limits, or a network asked Rizamo to slow down: wait for `Retry-After` seconds, or as long as the message says.
- `500`: `internal`: Our side failed: retry, and send the `requestId` if it keeps failing.
- `503`: `timeout`: The request took too long to work out, most often a report: try again in a moment, or ask a report for a shorter period or one profile.

---

[API](https://skmtc.dev/rizamo/apis/rizamo-api.md) - [All operations](https://skmtc.dev/rizamo/apis/rizamo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rizamo/apis/rizamo-api/revisions/31b0c1b1ffb5?raw)
