---
title: "Delete intents (single or multiple)"
description: "Delete one or more intents by their IDs. Only intents that have not been sent (notified_at is null) can be deleted. If any of the intents have been sent, the entire operation will fail and return a 422 error with the IDs"
url: https://docs.stoqapp.com/v1/back-in-stock/delete-intents-single-or-multiple/
api: "API v1 (legacy)"
method: DELETE
path: "/external/intents/bulk_destroy"
---

# Delete intents (single or multiple)

`DELETE https://app.stoqapp.com/api/v1/external/intents/bulk_destroy`

Delete one or more intents by their IDs. Only intents that have not been sent (notified_at is null) can be deleted.
If any of the intents have been sent, the entire operation will fail and return a 422 error with the IDs of sent intents.
You can pass a single intent ID in the array to delete just one intent.

## Headers

- `X-Auth-Token` (string, required): API key for authentication

## Request body

- `intent_ids` (array of strings, required): Array of intent IDs to delete

## Returns

- `success` (boolean): e.g. `true`
- `deleted_count` (integer): Number of intents successfully deleted

Rate limit: this call costs 2 points ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Example request

```sh
curl -X DELETE "https://app.stoqapp.com/api/v1/external/intents/bulk_destroy" \
  -H "X-Auth-Token: $STOQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "intent_ids": [
      "8f3c2b1a-7d4e-4c2a-9f10-2b3c4d5e6f70",
      "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809"
    ]
  }'
```

## 200

All intents deleted successfully

```json
{
  "success": true,
  "deleted_count": 2
}
```

## 400

Bad request - invalid parameters

## 401

Unauthorized

## 404

No valid intents found

## 422

Cannot delete intents that have already been sent

