# Jira duedate field: set a date through the REST API

URL: https://goingstellar.ro/reference/jira-fields/duedate-field/

duedate is a date without a time, written and read as a yyyy-MM-dd string. The JQL names are due and duedate. A different date format is rejected with a 400 that spells out the expected pattern.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| PUT | `/rest/api/3/issue/{issueIdOrKey}` | Sets fields.duedate to a date string. |
| GET | `/rest/api/3/issue/{issueIdOrKey}` | Returns duedate as a string, or with expand=renderedFields as a formatted date. |
| GET | `/rest/api/3/issue/{issueIdOrKey}/editmeta` | Lists duedate with a date schema and the set operation. |

## Examples

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

Sets the due date and reads the edited field back.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "duedate": "2026-12-20"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=duedate'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=duedate',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'duedate'},
    json={'fields': {'duedate': '2026-12-20'}},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "key": "ZZREF-6",
 "fields": {
  "duedate": "2026-12-20"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

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

The edit metadata describes duedate as a date with one operation.

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

```python
import os
import requests

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

Response: HTTP 200

```
{
 "fields": {
  "duedate": {
   "required": false,
   "schema": {
    "type": "date",
    "system": "duedate"
   },
   "name": "Due date",
   "key": "duedate",
   "operations": [
    "set"
   ]
  }
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

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

Reads the due date with other system fields.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'fields=priority,duedate,labels,components,fixVersions,environment,timetracking,reporter,status,resolution,issuetype,project,created,updated' \
  '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'},
    params={'fields': 'priority,duedate,labels,components,fixVersions,environment,timetracking,reporter,status,resolution,issuetype,project,created,updated'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "key": "ZZREF-6",
 "fields": {
  "duedate": "2026-12-20"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

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

Clears the due date with null.

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

```python
import os
import requests

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

Response: HTTP 200

```
{
 "key": "ZZREF-11",
 "fields": {
  "duedate": null
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

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

Sends 15/12/2026 to a date picker custom field. The system field uses the same date schema, and the error names the pattern.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10169": "15/12/2026"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10169'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10169',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10169'},
    json={'fields': {'customfield_10169': '15/12/2026'}},
)
print(r.status_code, r.text)
```

Response: HTTP 400

```
{
 "errorMessages": [],
 "errors": {
  "customfield_10169": "The zz-ref date must be of the format \"yyyy-MM-dd\""
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

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

Shows what expand=renderedFields does to a date, shown on the date picker custom field: the stored value and a display string.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'fields=customfield_10163,customfield_10169,customfield_10170' \
  --data-urlencode 'expand=renderedFields' \
  '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'},
    params={'fields': 'customfield_10163,customfield_10169,customfield_10170', 'expand': 'renderedFields'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "renderedFields": {
  "customfield_10169": "15/Dec/26"
 },
 "fields": {
  "customfield_10169": "2026-12-15"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- fields.duedate set to 2026-12-20 answered 200 and read back as the same string (sys-duedate, read-system-fields).
- In GET /rest/api/3/field duedate answers to the JQL names due and duedate (fields-all).
- On the date picker custom field a value written as 15/12/2026 answered 400 with the format yyyy-MM-dd named in the message (set-date-bad). The system field was not sent a bad date.
- With expand=renderedFields a date custom field came back as 15/Dec/26 next to the raw 2026-12-15 (read-cf-rendered).
- null clears the field: the call answered 200 and duedate read back as null (sys-duedate-null).

## Pitfalls

- Send an ISO date. Local formats such as day first with slashes are refused on the date picker custom field, and the system field has the same schema type.
- A date has no time zone. For a moment in time use a date-time custom field, since duedate cannot hold a time.
- renderedFields gave a display string while fields kept the ISO value, so parse the raw field and not the rendered one.

## Questions and answers

### How do I clear the due date?

Send fields.duedate as null. The call answered 200 and the field read back as null.

### Which JQL names find the due date?

Both due and duedate are listed as clauseNames for the field.

## Related

- [Date picker](https://goingstellar.ro/reference/jira-fields/date-picker-field/)
- [Date time picker](https://goingstellar.ro/reference/jira-fields/date-time-field/)
- [Field ids, keys and names](https://goingstellar.ro/reference/jira-fields/field-ids-and-names/)
- [Reading field values: names, schema, v2 and v3](https://goingstellar.ro/reference/jira-fields/reading-field-values/)
- [JQL on custom fields](https://goingstellar.ro/reference/jira-fields/jql-on-custom-fields/)

## Sources

- [Issues (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/)
- [Edit issue (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)
- [Get fields (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-get)

