Sample - GitHub REST API
POST/orgs/{org}/projectsV2/{project_number}/drafts

Create draft item for organization owned project

Create draft issue item for the specified organization owned project.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 2 body fields
orgstringrequired
The organization name. The name is not case sensitive.
project_numberintegerrequired
The project's number.

Details of the draft item to create in the project.

titlestringrequired
The title of the draft issue item to create in the project.
bodystringoptional
The body content of the draft issue item to create in the project.

4 status codes
201Response
idnumberrequired
The unique identifier of the project item.
node_idstringoptional
The node ID of the project item.
contentobjectoptional
The content represented by the item.
content_typestringrequired
The type of content tracked in a project item
Allowed:IssuePullRequestDraftIssue
creatorobjectoptional
A GitHub user.
created_atstringrequired
The time when the item was created.
updated_atstringrequired
The time when the item was last updated.
archived_atstringrequired
The time when the item was archived.
project_urlstringoptional
The URL of the project this item belongs to.
item_urlstringoptional
The URL of the item in the project.
304Not modified
401Requires authentication
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 401 is returned: Requires authentication. A 403 is returned: Forbidden.