# Assign a Jira work item with the REST API

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

PUT /rest/api/3/issue/{issueIdOrKey}/assignee sets the assignee from an accountId in the body and answers 204. A null accountId unassigns the work item and the string -1 selects the project's default assignee. The endpoint exists for users with Assign issues but not Edit issues permission.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| PUT | `/rest/api/3/issue/{issueIdOrKey}/assignee` | Assigns the work item to a user, unassigns it or applies the default assignee. |

## Examples

### PUT /rest/api/3/issue/{issueIdOrKey}/assignee

Assign to a specific account by accountId.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "accountId": "<accountId>"
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/assignee'
```

```python
import os
import requests

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

Response: HTTP 204

No response body.

Response headers:

```
X-Ratelimit-Limit: 300
X-Ratelimit-Remaining: 298
```

Sent to Atlassian Cloud on 29 Nov 2026.

### PUT /rest/api/3/issue/{issueIdOrKey}/assignee

Send accountId as null to remove the assignee.

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

```python
import os
import requests

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

Response: HTTP 204

No response body.

Sent to Atlassian Cloud on 29 Nov 2026.

### PUT /rest/api/3/issue/{issueIdOrKey}/assignee

Send the string "-1" to apply the project's default assignee.

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

```python
import os
import requests

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

Response: HTTP 204

No response body.

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- All three forms answered 204 with no body.
- The requests that worked used accountId as the only key in the body.
- The assignment call shows X-Ratelimit-Limit 300, between the read limit of 400 and the create limit of 200.

## Pitfalls

- null and "-1" differ. null leaves the work item unassigned, while "-1" asks Jira to pick the project default.
- Account ids come from the user search or the work item itself; they are not email addresses. Use the user search endpoint to find one.
- A 204 is not proof the person is assignable. Read the work item again, and check the assignable users list when the project restricts it.
- Assign changes only the assignee. Other fields still go through the Edit endpoint.

## Questions and answers

### Can I assign with the Edit endpoint instead?

Editmeta lists assignee with operation set, so yes when the user has Edit issues permission. The assignee endpoint is for users who only have Assign issues.

### How do I unassign?

Send {"accountId": null}.

## Related

- [Edit a work item](https://goingstellar.ro/reference/atlassian-rest-api/edit-issue/)
- [Find users](https://goingstellar.ro/reference/atlassian-rest-api/user-search/)
- [Get a work item](https://goingstellar.ro/reference/atlassian-rest-api/get-issue/)
- [Changelog](https://goingstellar.ro/reference/atlassian-rest-api/issue-changelog/)
- [The current user](https://goingstellar.ro/reference/atlassian-rest-api/myself-current-user/)
- [Watchers](https://goingstellar.ro/reference/atlassian-rest-api/issue-watchers/)

## Sources

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

