Create an Issue
Use the REST API to create a new issue with the default values for issue custom fields.
Summary
To create an issue, you need to know the entity ID of the project to which the issue should be reported. To get the project ID, see Get a Project ID.
The user account that sends the request must have the Create Issue permission in the target project.
Step-by-Step
Get the ID of the project where you want to create the issue. For instructions, see Get a Project ID. This sample uses the project ID
0-0.Send a
POSTrequest to create a new issue in the target project:curl -X POST \ https://example.youtrack.cloud/api/issues \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <YouTrack_token>' \ -H 'Content-Type: application/json' \ -d '{ "project":{"id":"0-0"}, "summary":"REST API lets you create issues!", "description":"Let'\''s create a new issue using YouTrack'\''s REST API." }'The request body must contain at least the target
projectand issuesummary. In this example, thedescriptionattribute is optional.In the body of the response, the server returns the entity id of the created issue:
{ "id": "2-38", "$type": "Issue" }
That's it: We created a new issue. All custom fields of the issue are set to their default values.