# Delete a Jira work item with the REST API

URL: https://goingstellar.ro/reference/atlassian-rest-api/delete-issue/

DELETE /rest/api/3/issue/{issueIdOrKey} removes a work item and answers 204 with no body. A later read of the same key gives 404. The spec adds that a work item with sub-tasks is refused with 400 unless deleteSubtasks=true.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| DELETE | `/rest/api/3/issue/{issueIdOrKey}` | Deletes a work item; deleteSubtasks removes its sub-tasks too. |

## Examples

### POST /rest/api/3/issue

A throwaway work item to delete in the next call.

```bash
curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "project": {
      "key": "WEB"
    },
    "issuetype": {
      "name": "Task"
    },
    "summary": "Example to delete"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/issue',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'project': {'key': 'WEB'},
                     'issuetype': {'name': 'Task'},
                     'summary': 'Example to delete'}},
)
print(r.status_code, r.text)
```

Response: HTTP 201

```
{
 "id": "10771",
 "key": "WEB-60",
 "self": "https://your-domain.atlassian.net/rest/api/3/issue/10771"
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### DELETE /rest/api/3/issue/{issueIdOrKey}

Delete it by key. The answer is 204 and there is no body.

```bash
curl -X DELETE \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.delete(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)
```

Response: HTTP 204

No response body.

Response headers:

```
X-Ratelimit-Limit: 400
X-Ratelimit-Remaining: 399
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/issue/{issueIdOrKey}

Reading the deleted key gives the same 404 as a key that never existed.

```bash
curl \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)
```

Response: HTTP 404

```
{
 "errorMessages": [
  "Issue does not exist or you do not have permission to see it."
 ],
 "errors": {}
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- A successful delete answers 204 with no body.
- A GET on the deleted key answers 404 with 'Issue does not exist or you do not have permission to see it.', the same text as for an unknown key.
- The delete call showed X-Ratelimit-Limit 400, the same bucket size as reads.

## Pitfalls

- Deletion is permanent through the API. Confirm the key before sending, since the response gives no undo hint.
- The spec says a work item with sub-tasks cannot be deleted unless deleteSubtasks is true. That path was not probed, so test it on a copy first.
- The caller needs Delete issues permission as well as Browse projects; a 403 from the spec means the permission is missing.
- Resolve the key from a search or a stored id first. A key that exists is deleted whether or not it was the one you meant.

## Questions and answers

### Can I delete a work item that has sub-tasks?

Set deleteSubtasks=true. Without it the spec says the API answers 400.

### How do I confirm it worked?

The 204 is the confirmation; a following GET gives 404.

## Related

- [Create a work item](https://goingstellar.ro/reference/atlassian-rest-api/create-issue/)
- [Get a work item](https://goingstellar.ro/reference/atlassian-rest-api/get-issue/)
- [Edit a work item](https://goingstellar.ro/reference/atlassian-rest-api/edit-issue/)
- [Work item links](https://goingstellar.ro/reference/atlassian-rest-api/issue-links/)
- [HTTP status codes](https://goingstellar.ro/reference/atlassian-rest-api/http-status-codes/)

## Sources

- [The Jira Cloud platform REST API v3 (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)
- [Delete issue (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-delete)

