Home/Atlassian REST API reference
Jira and Confluence Cloud REST API
Assign a Jira work item with the REST API
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.
curl
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 (requests)
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: 298Sent to Atlassian Cloud on .
PUT /rest/api/3/issue/{issueIdOrKey}/assignee
Send accountId as null to remove the assignee.
curl
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 (requests)
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 .
PUT /rest/api/3/issue/{issueIdOrKey}/assignee
Send the string "-1" to apply the project's default assignee.
curl
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 (requests)
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 .
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}.