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

Add item to organization owned project

Add an issue or pull request item to the specified organization owned project.

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

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

Details of the item to add to the project. You can specify either the unique ID or the repository owner, name, and issue/PR number.

typestringrequired
The type of item to add to the project. Must be either Issue or PullRequest.
Allowed:IssuePullRequest
idintegeroptional
The unique identifier of the issue or pull request to add to the project.
ownerstringoptional
The repository owner login.
repostringoptional
The repository name.
numberintegeroptional
The issue or pull request number.

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.