---
title: "Reset your data"
method: POST
path: "/my-data/reset"
tags: ["My data"]
---

# Reset your data

`POST /my-data/reset`

## Request

- Base URL: `https://gorest.co.in/public/v3`
- URL: `https://gorest.co.in/public/v3/my-data/reset`
- Auth: HTTP bearer

Deletes every v3 row your account owns (users, posts, comments, tasks, products, carts and orders; your tokens stay) in one transaction. With `{"sample_data": true}` it then copies the sample data in as your own rows, with new ids, so you can change them; your lists show these copies instead of the sample data. This is the only way to free the order caps, as orders cannot be deleted. A reset while another reset of the account runs gets 409.

## Headers

- `Idempotency-Key` string

## Request body

- MyDataReset
  - `sample_data` boolean: Copy the sample data in as your own rows after the delete.

## Response `200`

Your counts after the reset.

- MyData
  - `resources` object, required
    - `access_tokens` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `cart_items` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `carts` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `comments` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `order_items` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `orders` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `posts` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `products` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `tasks` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
    - `users` MyDataCount, required
      - `cap` integer, required: The most it may hold; over it a create answers 422 `cap_reached`.
      - `count` integer, required: Rows your account holds.
  - `sample_data_at` string, date-time, nullable, required: When you last reset with sample data; null when your lists show the shared sample data.

## Other responses

- `400`: A parameter is wrong, unknown or out of range.
- `401`: No token, or the token is wrong, expired or revoked.
- `403`: The token lacks the scope this operation needs.
- `409`: The change clashes with another row, such as an email you already use.
- `413`: The body is over 64 KiB.
- `415`: The body is not `application/json` (or `application/merge-patch+json` on PATCH).
- `422`: The body has fields that fail their rules (`validation_failed`, with `errors`), or a cap is reached (`cap_reached`).
- `429`: Over the rate limit; wait `Retry-After` seconds.
- `500`: Something failed on the server.

---

[API](https://skmtc.dev/gorest/apis/gorest-api-v3.md) - [All operations](https://skmtc.dev/gorest/apis/gorest-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/gorest/apis/gorest-api-v3/revisions/89aa429755a6?raw)
