Add item to organization owned project
Add an issue or pull request item to the specified organization owned project.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
The project’s number.
Request Body required
Section titled “ Request Body required ”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.
object
The type of item to add to the project. Must be either Issue or PullRequest.
The unique identifier of the issue or pull request to add to the project.
The repository owner login.
The repository name.
The issue or pull request number.
object
The type of item to add to the project. Must be either Issue or PullRequest.
The unique identifier of the issue or pull request to add to the project.
The repository owner login.
The repository name.
The issue or pull request number.
Examples
Add an issue using its unique ID
{ "type": "Issue", "id": 3}Add a pull request using its unique ID
{ "type": "PullRequest", "id": 3}Add an issue using repository owner, name, and issue number
{ "type": "Issue", "owner": "octocat", "repo": "hello-world", "number": 42}Add a pull request using repository owner, name, and PR number
{ "type": "PullRequest", "owner": "octocat", "repo": "hello-world", "number": 123}Responses
Section titled “ Responses ”Response
An item belonging to a project
object
The unique identifier of the project item.
The node ID of the project item.
Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.
object
URL for the issue
Number uniquely identifying the issue within its repository
State of the issue; either ‘open’ or ‘closed’
The reason for the current state
Title of the issue
Contents of the issue
A GitHub user.
object
Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository
object
A GitHub user.
object
A GitHub user.
object
A collection of related issues and pull requests.
object
The number of the milestone.
The state of the milestone.
The title of the milestone.
A GitHub user.
object
object
A GitHub user.
object
The type assigned to the issue. This is only present for issues in repositories where issue types are supported.
object
The unique identifier of the issue type.
The node identifier of the issue type.
The name of the issue type.
The description of the issue type.
The color of the issue type.
The time the issue type created.
The time the issue type last updated.
The enabled state of the issue type.
A repository on GitHub.
object
Unique identifier of the repository
The name of the repository.
License Simple
object
object
A GitHub user.
object
Whether the repository is private or public.
The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
The default branch of the repository.
Whether this repository acts as a template that can be used to generate new repositories.
Whether issues are enabled.
Whether projects are enabled.
Whether the wiki is enabled.
Whether downloads are enabled.
Whether discussions are enabled.
Whether pull requests are enabled.
The policy controlling who can create pull requests: all or collaborators_only.
Whether the repository is archived.
Returns whether or not this repository disabled.
The repository visibility: public, private, or internal.
Whether to allow rebase merges for pull requests.
Whether to allow squash merges for pull requests.
Whether to allow Auto-merge to be used on pull requests.
Whether to delete head branches when pull requests are merged
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use squash_merge_commit_title instead.
The default value for a squash merge commit title:
PR_TITLE- default to the pull request’s title.COMMIT_OR_PR_TITLE- default to the commit’s title (if only one commit) or the pull request’s title (when more than one commit).
The default value for a squash merge commit message:
PR_BODY- default to the pull request’s body.COMMIT_MESSAGES- default to the branch’s commit messages.BLANK- default to a blank commit message.
The default value for a merge commit title.
PR_TITLE- default to the pull request’s title.MERGE_MESSAGE- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
The default value for a merge commit message.
PR_TITLE- default to the pull request’s title.PR_BODY- default to the pull request’s body.BLANK- default to a blank commit message.
Whether to allow merge commits for pull requests.
Whether to allow forking this repo
Whether to require contributors to sign off on web-based commits
Whether anonymous git access is enabled for this repository
The status of the code search index for this repository
object
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
object
Unique identifier of the GitHub app
The slug name of the GitHub app
A GitHub user.
object
An enterprise on GitHub.
object
A short description of the enterprise.
The enterprise’s website URL.
Unique identifier of the enterprise
The name of the enterprise.
The slug url identifier for the enterprise.
The name of the GitHub app
The set of permissions for the GitHub app
object
The list of events for the GitHub app. Note that the installation_target, security_advisory, and meta events are not included because they are global events and not specific to an installation.
The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself.
How the author is associated with the repository.
object
object
URL to get the parent issue of this issue, if it is a sub-issue
Comments provide a way for people to collaborate on an issue.
object
Unique identifier of the issue comment
URL for the issue comment
Contents of the issue comment
A GitHub user.
object
How the author is associated with the repository.
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
object
Unique identifier of the GitHub app
The slug name of the GitHub app
A GitHub user.
object
An enterprise on GitHub.
object
A short description of the enterprise.
The enterprise’s website URL.
Unique identifier of the enterprise
The name of the enterprise.
The slug url identifier for the enterprise.
The name of the GitHub app
The set of permissions for the GitHub app
object
The list of events for the GitHub app. Note that the installation_target, security_advisory, and meta events are not included because they are global events and not specific to an installation.
The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself.
object
Context around who pinned an issue comment and when it was pinned.
object
A GitHub user.
object
Details about why an issue comment was minimized.
object
The reason the comment was minimized.
object
A value assigned to an issue field
object
Unique identifier for the issue field.
The human-readable name of the issue field.
The data type of the issue field
Details about the selected option (only present for single_select fields)
object
Unique identifier for the option.
The name of the option
The color of the option
Details about the selected options
object
Unique identifier for the option.
The name of the option
The color of the option
Pull Request Simple
object
A GitHub user.
object
object
A collection of related issues and pull requests.
object
The number of the milestone.
The state of the milestone.
The title of the milestone.
A GitHub user.
object
A GitHub user.
object
A GitHub user.
object
A GitHub user.
object
Groups of organization members that gives permissions on specified repositories.
object
object
The ownership type of the team
How the team’s access to the repository was granted. This property is only
present when the team is returned in a repository context, such as
GET /repos/{owner}/{repo}/teams.
Unique identifier of the organization to which this team belongs
Unique identifier of the enterprise to which this team belongs
Groups of organization members that gives permissions on specified repositories.
object
Unique identifier of the team
URL for the team
Name of the team
Description of the team
Permission that the team will have for its repositories
The level of privacy this team should have
The notification setting the team has set
Distinguished Name (DN) that team maps to within LDAP environment
The ownership type of the team
Unique identifier of the organization to which this team belongs
Unique identifier of the enterprise to which this team belongs
object
A repository on GitHub.
object
Unique identifier of the repository
The name of the repository.
License Simple
object
object
A GitHub user.
object
Whether the repository is private or public.
The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
The default branch of the repository.
Whether this repository acts as a template that can be used to generate new repositories.
Whether issues are enabled.
Whether projects are enabled.
Whether the wiki is enabled.
Whether downloads are enabled.
Whether discussions are enabled.
Whether pull requests are enabled.
The policy controlling who can create pull requests: all or collaborators_only.
Whether the repository is archived.
Returns whether or not this repository disabled.
The repository visibility: public, private, or internal.
Whether to allow rebase merges for pull requests.
Whether to allow squash merges for pull requests.
Whether to allow Auto-merge to be used on pull requests.
Whether to delete head branches when pull requests are merged
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use squash_merge_commit_title instead.
The default value for a squash merge commit title:
PR_TITLE- default to the pull request’s title.COMMIT_OR_PR_TITLE- default to the commit’s title (if only one commit) or the pull request’s title (when more than one commit).
The default value for a squash merge commit message:
PR_BODY- default to the pull request’s body.COMMIT_MESSAGES- default to the branch’s commit messages.BLANK- default to a blank commit message.
The default value for a merge commit title.
PR_TITLE- default to the pull request’s title.MERGE_MESSAGE- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
The default value for a merge commit message.
PR_TITLE- default to the pull request’s title.PR_BODY- default to the pull request’s body.BLANK- default to a blank commit message.
Whether to allow merge commits for pull requests.
Whether to allow forking this repo
Whether to require contributors to sign off on web-based commits
Whether anonymous git access is enabled for this repository
The status of the code search index for this repository
object
A GitHub user.
object
object
A repository on GitHub.
object
Unique identifier of the repository
The name of the repository.
License Simple
object
object
A GitHub user.
object
Whether the repository is private or public.
The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
The default branch of the repository.
Whether this repository acts as a template that can be used to generate new repositories.
Whether issues are enabled.
Whether projects are enabled.
Whether the wiki is enabled.
Whether downloads are enabled.
Whether discussions are enabled.
Whether pull requests are enabled.
The policy controlling who can create pull requests: all or collaborators_only.
Whether the repository is archived.
Returns whether or not this repository disabled.
The repository visibility: public, private, or internal.
Whether to allow rebase merges for pull requests.
Whether to allow squash merges for pull requests.
Whether to allow Auto-merge to be used on pull requests.
Whether to delete head branches when pull requests are merged
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use squash_merge_commit_title instead.
The default value for a squash merge commit title:
PR_TITLE- default to the pull request’s title.COMMIT_OR_PR_TITLE- default to the commit’s title (if only one commit) or the pull request’s title (when more than one commit).
The default value for a squash merge commit message:
PR_BODY- default to the pull request’s body.COMMIT_MESSAGES- default to the branch’s commit messages.BLANK- default to a blank commit message.
The default value for a merge commit title.
PR_TITLE- default to the pull request’s title.MERGE_MESSAGE- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
The default value for a merge commit message.
PR_TITLE- default to the pull request’s title.PR_BODY- default to the pull request’s body.BLANK- default to a blank commit message.
Whether to allow merge commits for pull requests.
Whether to allow forking this repo
Whether to require contributors to sign off on web-based commits
Whether anonymous git access is enabled for this repository
The status of the code search index for this repository
object
A GitHub user.
object
object
Hypermedia Link
object
Hypermedia Link
object
Hypermedia Link
object
Hypermedia Link
object
Hypermedia Link
object
Hypermedia Link
object
Hypermedia Link
object
Hypermedia Link
object
How the author is associated with the repository.
The status of auto merging a pull request.
object
A GitHub user.
object
The merge method to use.
Title for the merge commit message.
Commit message for the merge commit.
The stack information associated with a pull request.
object
object
The base ref of the stack this pull request belongs to.
The base SHA of the stack this pull request belongs to.
The total number of pull requests in the stack.
The one-based position of this pull request within the stack, where 1 is the bottom of the stack.
The ID of the stack that this pull request belongs to.
The number of the stack that this pull request belongs to.
Indicates whether or not the pull request is a draft.
A draft issue in a project
object
The ID of the draft issue
The node ID of the draft issue
The title of the draft issue
The body content of the draft issue
A GitHub user.
object
The time the draft issue was created
The time the draft issue was last updated
The type of content tracked in a project item
A GitHub user.
object
The time when the item was created.
The time when the item was last updated.
The time when the item was archived.
The URL of the project this item belongs to.
The URL of the item in the project.
Examples
Response for adding an issue using its unique ID
{ "value": { "id": 17, "node_id": "PVTI_lADOANN5s84ACbL0zgBueEI", "content": { "id": 38, "node_id": "I_kwDOANN5s85FtLts", "title": "Example Draft Issue", "body": "This is a draft issue in the project.", "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "user": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false } }, "content_type": "DraftIssue", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "archived_at": null, "project_url": "https://api.github.com/users/octocat/projectsV2/1", "item_url": "https://api.github.com/users/octocat/projectsV2/items/17" }}Response for adding a pull request using its unique ID
{ "value": { "id": 17, "node_id": "PVTI_lADOANN5s84ACbL0zgBueEI", "content": { "id": 38, "node_id": "I_kwDOANN5s85FtLts", "title": "Example Draft Issue", "body": "This is a draft issue in the project.", "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "user": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false } }, "content_type": "DraftIssue", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "archived_at": null, "project_url": "https://api.github.com/users/octocat/projectsV2/1", "item_url": "https://api.github.com/users/octocat/projectsV2/items/17" }}Response for adding an issue using repository owner, name, and issue number
{ "value": { "id": 17, "node_id": "PVTI_lADOANN5s84ACbL0zgBueEI", "content": { "id": 38, "node_id": "I_kwDOANN5s85FtLts", "title": "Example Draft Issue", "body": "This is a draft issue in the project.", "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "user": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false } }, "content_type": "DraftIssue", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "archived_at": null, "project_url": "https://api.github.com/users/octocat/projectsV2/1", "item_url": "https://api.github.com/users/octocat/projectsV2/items/17" }}Response for adding a pull request using repository owner, name, and PR number
{ "value": { "id": 17, "node_id": "PVTI_lADOANN5s84ACbL0zgBueEI", "content": { "id": 38, "node_id": "I_kwDOANN5s85FtLts", "title": "Example Draft Issue", "body": "This is a draft issue in the project.", "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "user": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false } }, "content_type": "DraftIssue", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z", "archived_at": null, "project_url": "https://api.github.com/users/octocat/projectsV2/1", "item_url": "https://api.github.com/users/octocat/projectsV2/items/17" }}Not modified
Requires authentication
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}