# Create a new issue

URL: https://docs.ones.cn/developer/openapi/api/02-create-a-new-issue

```
POST
## /project/issues

```

Create a new issue.

## History

| Version | Changes |
| --- | --- |
| v3.14.117, v3.15.26 | Added in: v3.14.117, v3.15.26 |

## Request

### Query Parameters

**teamID** stringrequired The team ID

- application/json

### Body

**required

** The issue information to be created.

**assignee** stringrequired **Possible values:**`non-empty` and `<= 8 characters`

Issue assignee.

**title** stringrequired **Possible values:**`non-empty` and `<= 1024 characters`

Issue title.

**projectID** stringrequired **Possible values:**`non-empty` and `<= 16 characters`

Project of the issue.

**issueTypeID** stringrequired **Possible values:**`non-empty` and `<= 8 characters`

Type of the issue.

**fieldValues

** object[]

required

Issue Property Information.

- Array [
**fieldID** stringrequired **Possible values:**`>= 8 characters`

ID of the issue.

**type** integer **Possible values:**`>= 1`

Type of the field value (required in v6.94.6 and earlier).

**value

** object

Value of the issue. For operation steps (field159), use an array of OperationStep objects. When either null is passed or no value is provided, the existing property value will be cleared.

**** object

- ]

**watchers** string[]required **Possible values:**`non-empty` and `<= 8 characters`

When the issue information changes, watchers will be notified by email, etc.

**parentID** string **Possible values:**`non-empty` and `<= 16 characters`

Parent issue ID.

## Responses

- 200
- 401
- 403
- 404
- 500

Request is successful.

- application/json

- Schema
- Example (from schema)

**Schema

**

**data

** object

**id** string ID of the issue.

**number** integer Number of the issue.

**title** string Title of the issue.

**projectID** string Project of the issue.

**issueTypeID** string Type of the issue.

**parentID** string Parent issue ID.

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

**errorData** object Error meta data for this request.

```json
[
  {
    "result": "SUCCESS",
    "data": {
      "id": "5f1b8a16",
      "number": 1,
      "title": "test",
      "projectID": "5f1b8a158765h",
      "issueTypeID": "9c6d4c01",
      "parentID": "7f1b8a18"
    }
  },
  {
    "result": "FAIL",
    "errorCode": "NotFound",
    "errorMsg": "NotFound issue"
  },
  {
    "result": "FAIL",
    "errorCode": "AlreadyExists",
    "errorMsg": "AlreadyExists issue"
  },
  {
    "result": "FAIL",
    "errorCode": "NotFound",
    "errorMsg": "NotFound parentIssue"
  }
]
```

Returned if the authentication credentials are incorrect or missing.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Unauthorized",
  "errorMsg": "Access token is invalid"
}
```

Returns if the scope check fails.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Forbidden",
  "errorMsg": "Scope is invalid"
}
```

Returned if the resource object was not found.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "NotFound",
  "errorMsg": "Not Found"
}
```

Internal Server Error.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Internal Server Error",
  "errorMsg": "Internal Server Error"
}
```
