Jira Cloud fields and work types
Trash, restore and delete a Jira custom field via API
POST /rest/api/3/field/{id}/trash moves a custom field to the trash and POST /rest/api/3/field/{id}/restore brings it back, both answering 200 with no body. While the field is in the trash a work item edit that names it fails with 400. DELETE /rest/api/3/field/{id} removes a field for good and answers 303 with a link to a task.
Endpoints
| Method | Path | What it does |
|---|---|---|
POST | /rest/api/3/field/{id}/trash | Moves a custom field to the trash. |
GET | /rest/api/3/field/search/trashed | Lists custom fields in the trash with trashedDate and plannedDeletionDate. |
POST | /rest/api/3/field/{id}/restore | Restores a custom field from the trash. |
DELETE | /rest/api/3/field/{id} | Deletes a custom field, in the trash or not, as an asynchronous task. |
Examples
POST /rest/api/3/field/customfield_10181/trash
Trashes the read-only text field. The answer is 200 with an empty body.
curl
curl -X POST \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
'https://your-domain.atlassian.net/rest/api/3/field/customfield_10181/trash'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.post(
'https://your-domain.atlassian.net/rest/api/3/field/customfield_10181/trash',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)Response: HTTP 200
No response body.
Response headers
Content-Type: text/html;charset=UTF-8
X-Ratelimit-Limit: 200Sent to Atlassian Cloud on .
GET /rest/api/3/field/search/trashed
Lists the trash filtered by a name fragment. Each row carries the trash date, who trashed it and the date Jira plans to delete it.
curl
curl -G \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
--data-urlencode 'query=zz-ref' \
'https://your-domain.atlassian.net/rest/api/3/field/search/trashed'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/field/search/trashed',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'query': 'zz-ref'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"total": 1,
"values": [
{
"id": "customfield_10181",
"name": "zz-ref readonly",
"typeDisplayName": "Text Field (read only)",
"trashedDate": "2026-11-29T20:02:52.374+0200",
"plannedDeletionDate": "2027-01-28T20:02:52.374+0200",
"trashedBy": {
"accountId": "<accountId>",
"accountType": "atlassian"
}
}
]
}Sent to Atlassian Cloud on .
PUT /rest/api/3/issue/{issueIdOrKey}
Tries to write the trashed field on a work item. The edit is refused and the message names the field.
curl
curl -X PUT \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"fields": {
"customfield_10181": "x"
}
}' \
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.put(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
json={'fields': {'customfield_10181': 'x'}},
)
print(r.status_code, r.text)Response: HTTP 400
{
"errorMessages": [],
"errors": {
"customfield_10181": "Field 'customfield_10181' cannot be set. It is not on the appropriate screen, or unknown."
}
}Sent to Atlassian Cloud on .
POST /rest/api/3/field/customfield_10181/restore
Restores the field. Again 200 with no body.
curl
curl -X POST \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
'https://your-domain.atlassian.net/rest/api/3/field/customfield_10181/restore'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.post(
'https://your-domain.atlassian.net/rest/api/3/field/customfield_10181/restore',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)Response: HTTP 200
No response body.
Sent to Atlassian Cloud on .
GET /rest/api/3/field/search
After the restore the field is found by id in the normal search again, under its old id.
curl
curl -G \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
--data-urlencode 'id=customfield_10181' \
'https://your-domain.atlassian.net/rest/api/3/field/search'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/field/search',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'id': 'customfield_10181'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"total": 1,
"values": [
{
"id": "customfield_10181",
"name": "zz-ref readonly",
"schema": {
"type": "string",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:readonlyfield",
"customId": 10181
}
}
]
}Sent to Atlassian Cloud on .
DELETE /rest/api/3/field/customfield_10223
Deletes a field directly, without trashing it first. The answer is 303 with no body and a Location header that points at a task.
curl
curl -X DELETE \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
'https://your-domain.atlassian.net/rest/api/3/field/customfield_10223'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.delete(
'https://your-domain.atlassian.net/rest/api/3/field/customfield_10223',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)Response: HTTP 303
No response body.
Response headers
Location: https://your-domain.atlassian.net/rest/api/3/task/15524
X-Ratelimit-Limit: 400Sent to Atlassian Cloud on .
GET /rest/api/3/field/search
Searches for the deleted field by id afterwards. Nothing is found.
curl
curl -G \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
--data-urlencode 'id=customfield_10223' \
'https://your-domain.atlassian.net/rest/api/3/field/search'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/field/search',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'id': 'customfield_10223'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"maxResults": 50,
"startAt": 0,
"total": 0,
"isLast": true,
"values": []
}Sent to Atlassian Cloud on .
How it behaves
- Trash and restore both answered 200 with an empty body and Content-Type text/html, and were charged to a bucket of 200.
- The trash listing showed trashedDate 2026-11-29T20:02:52.374+0200 and plannedDeletionDate 2027-01-28T20:02:52.374+0200, 60 days later, plus trashedBy as a user object.
- A PUT on a work item that sets the trashed field answered 400 with errors.customfield_10181 = "Field 'customfield_10181' cannot be set. It is not on the appropriate screen, or unknown.".
- The restored field was found again by GET /field/search?id=... with its original id; the type, name and description were unchanged.
- DELETE on a field that was not in the trash answered 303 with Location https://your-domain.atlassian.net/rest/api/3/task/15524 and no body. A search by that id then returned total 0. The task itself was not polled.
Pitfalls
- DELETE does not need the trash step: the spec says the field is deleted whether it is in the trash or not, and the run confirmed it. The work is asynchronous, so follow the Location link with the task API; the 303 itself carries no body.
- The screen wording of the 400 for a trashed field is generic. Other fields get the same message while on the screen, so look at the trash, not the screen.
- The plannedDeletionDate is Jira's own schedule. Restore before that date; the trash listing is the only place it is shown.
- Trashing needs Administer Jira, like the other field administration calls.
Questions and answers
Can a trashed custom field still be set on work items?
No. The edit answers 400 and names the field, as in the run above.
How long does a field stay in the trash?
The trash listing shows plannedDeletionDate, 60 days after trashedDate in this run. DELETE removes a field at once and also works on a field that is not in the trash.
Related
- Find fields with field/search
- Fields on screens
- Create a custom field: types and searchers
- Text field (read only)
- Rename a custom field
- Custom field contexts