# 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"}}}}}}}}}}}
```
