# Create a Jira work item with the REST API

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

POST /rest/api/3/issue creates one work item from a fields object and answers 201 with only id, key and self. In v3 the description must be Atlassian Document Format, and a plain string is rejected with a 400; the v2 path accepts wiki markup instead.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| POST | `/rest/api/3/issue` | Creates a work item or sub-task from fields and update. |

## Examples

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

Create a Task in project WEB with an ADF description, one label and a due date. Project and issue type are given by key and name.

```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 created through REST API",
    "description": {
      "type": "doc",
      "version": 1,
      "content": [
        {
          "type": "paragraph",
          "content": [
            {
              "type": "text",
              "text": "Created with POST /rest/api/3/issue."
            }
          ]
        }
      ]
    },
    "labels": [
      "api-example"
    ],
    "duedate": "2026-12-15"
  }
}' \
  '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 created through REST API',
                     'description': {'type': 'doc',
                                     'version': 1,
                                     'content': [{'type': 'paragraph',
                                                  'content': [{'type': 'text',
                                                               'text': 'Created with POST '
                                                                       '/rest/api/3/issue.'}]}]},
                     'labels': ['api-example'],
                     'duedate': '2026-12-15'}},
)
print(r.status_code, r.text)
```

Response: HTTP 201

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

Response headers:

```
X-Ratelimit-Limit: 200
X-Ratelimit-Remaining: 199
```

Sent to Atlassian Cloud on 29 Nov 2026.

### POST /rest/api/2/issue

The v2 endpoint takes the description as a wiki-markup string, so no ADF document is needed.

```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 created through REST API v2",
    "description": "Created with *wiki markup* through v2."
  }
}' \
  'https://your-domain.atlassian.net/rest/api/2/issue'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/2/issue',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'project': {'key': 'WEB'},
                     'issuetype': {'name': 'Task'},
                     'summary': 'Example created through REST API v2',
                     'description': 'Created with *wiki markup* through v2.'}},
)
print(r.status_code, r.text)
```

Response: HTTP 201

```
{
 "id": "10769",
 "key": "WEB-58",
 "self": "https://your-domain.atlassian.net/rest/api/2/issue/10769"
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

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

The same string sent to v3 is refused with a field error on description.

```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": "Plain string description",
    "description": "plain string"
  }
}' \
  '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': 'Plain string description',
                     'description': 'plain string'}},
)
print(r.status_code, r.text)
```

Response: HTTP 400

```
{
 "errorMessages": [],
 "errors": {
  "description": "The field value is not valid Atlassian Document Format (ADF) content."
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

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

A project key the caller cannot create in produces both a general message and a field error.

```bash
curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "project": {
      "key": "NOPE"
    },
    "issuetype": {
      "name": "Task"
    },
    "summary": "x"
  }
}' \
  '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': 'NOPE'}, 'issuetype': {'name': 'Task'}, 'summary': 'x'}},
)
print(r.status_code, r.text)
```

Response: HTTP 400

```
{
 "errorMessages": [
  "The target project doesn't exist or you don't have permission to create issues in it."
 ],
 "errors": {
  "project": "The target project doesn't exist or you don't have permission to create issues in it."
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- A successful create answers 201 with id, key and self and nothing else. Fields such as status or created need a follow-up GET.
- project and issuetype can be given by key and name: {"project": {"key": "WEB"}, "issuetype": {"name": "Task"}} was accepted without ids.
- duedate is a plain YYYY-MM-DD string and labels is an array of strings; both were accepted in the same call as the ADF description.
- v2 and v3 create the same kind of work item. Only the representation differs: the v2 call took a wiki string and returned a self URL under /rest/api/2.
- The create call carried X-Ratelimit-Limit 200, lower than the limit of 400 seen on a read.

## Pitfalls

- Sending description as a string to /rest/api/3/issue fails. Wrap the text in a doc, version 1, paragraph and text node, or use the v2 path.
- Required fields differ per project and issue type. Read createmeta for the project and type before building the body, and do not copy one body across projects.
- A sub-task needs a sub-task issue type and a parent key; the spec states that parent must hold the id or key of the parent work item.
- Rate limiting applies to writes too. Creating work items in a loop should honour Retry-After on a 429 instead of retrying at once.

## Questions and answers

### How do I get the created work item back in the same call?

The create response has no option for it. Read the id or key from the 201 body and send GET /rest/api/3/issue/{key}.

### Which fields can I set?

The ones on the project's create screen. Use the createmeta endpoints to list them with their required flag.

## Related

- [Create work item errors](https://goingstellar.ro/reference/atlassian-rest-api/create-issue-errors/)
- [Bulk create work items](https://goingstellar.ro/reference/atlassian-rest-api/bulk-create-issues/)
- [createmeta](https://goingstellar.ro/reference/atlassian-rest-api/issue-createmeta/)
- [ADF in request bodies](https://goingstellar.ro/reference/atlassian-rest-api/adf-in-request-bodies/)
- [Jira REST API v2 vs v3](https://goingstellar.ro/reference/atlassian-rest-api/jira-v2-vs-v3/)
- [Get a work item](https://goingstellar.ro/reference/atlassian-rest-api/get-issue/)

## Sources

- [The Jira Cloud platform REST API v3 (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)
- [Create issue (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post)
- [Rate limiting, Jira (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rate-limiting/)

