> For the complete documentation index, see [llms.txt](https://docs.stoqapp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoqapp.com/back-in-stock-api/delete-intents-single-or-multiple.md).

# Delete intents (single or multiple)

## Delete intents (single or multiple)

> 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.<br>

```json
{"openapi":"3.0.3","info":{"title":"Back in Stock Intents API","version":"1.0.0"},"servers":[{"url":"https://app.stoqapp.com/api/v1/external","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Auth-Token"}}},"paths":{"/intents/bulk_destroy":{"delete":{"summary":"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.\nIf any of the intents have been sent, the entire operation will fail and return a 422 error with the IDs of sent intents.\nYou can pass a single intent ID in the array to delete just one intent.\n","tags":["Intents"],"parameters":[{"in":"header","name":"X-Auth-Token","required":true,"schema":{"type":"string"},"description":"API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intent_ids":{"type":"array","items":{"type":"string"},"description":"Array of intent IDs to delete"}},"required":["intent_ids"]}}}},"responses":{"200":{"description":"All intents deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"deleted_count":{"type":"integer","description":"Number of intents successfully deleted"}}}}}},"400":{"description":"Bad request - invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"No valid intents found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"422":{"description":"Cannot delete intents that have already been sent","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"sent_intent_ids":{"type":"array","items":{"type":"string"},"description":"IDs of intents that have already been sent and cannot be deleted"}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stoqapp.com/back-in-stock-api/delete-intents-single-or-multiple.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
