リポジトリ招待用 REST API エンドポイント
この REST API を使い、リポジトリで共同作業するための招待を表示し、管理します。
リポジトリの招待について
リポジトリで共同作業するための招待を表示し、管理できます。 招待されたユーザ (または招待されたユーザを代行する外部サービス) は、招待を受諾または拒否できます。
コラボレーターとしてユーザーを追加するには、代わりに Collaborators エンドポイントを使います。 詳しくは、「コラボレーターの REST API エンドポイント」をご覧ください。
repo:invite OAuth スコープでは、リポジトリ コードへのアクセスを許可しないで、招待への対象アクセスを許可しますが、一方で、repo スコープでは、招待に加えてコードへのアクセス許可も許可していることに注意してください。
List repository invitations
When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
"List repository invitations" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには、次のアクセス許可セットの少なくとも 1 つが必要です:
- "Administration" repository permissions (read)
 - "Private repository invitations" user permissions (read)
 
"List repository invitations" のパラメーター
| 名前, Type, 説明 | 
|---|
accept string Setting to   | 
| 名前, Type, 説明 | 
|---|
owner string 必須The account owner of the repository. The name is not case sensitive.  | 
repo string 必須The name of the repository without the   | 
| 名前, Type, 説明 | 
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default:   | 
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default:   | 
"List repository invitations" の HTTP 応答状態コード
| 状態コード | 説明 | 
|---|---|
200 | OK  | 
"List repository invitations" のコード サンプル
要求の例
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/invitationsResponse
Status: 200[
  {
    "id": 1,
    "repository": {
      "id": 1296269,
      "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
      "name": "Hello-World",
      "full_name": "octocat/Hello-World",
      "owner": {
        "login": "octocat",
        "id": 1,
        "node_id": "MDQ6VXNlcjE=",
        "avatar_url": "https://github.com/images/error/octocat_happy.gif",
        "gravatar_id": "",
        "url": "https://HOSTNAME/users/octocat",
        "html_url": "https://github.com/octocat",
        "followers_url": "https://HOSTNAME/users/octocat/followers",
        "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
        "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
        "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
        "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
        "organizations_url": "https://HOSTNAME/users/octocat/orgs",
        "repos_url": "https://HOSTNAME/users/octocat/repos",
        "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
        "received_events_url": "https://HOSTNAME/users/octocat/received_events",
        "type": "User",
        "site_admin": false
      },
      "private": false,
      "html_url": "https://github.com/octocat/Hello-World",
      "description": "This your first repo!",
      "fork": false,
      "url": "https://HOSTNAME/repos/octocat/Hello-World",
      "archive_url": "https://HOSTNAME/repos/octocat/Hello-World/{archive_format}{/ref}",
      "assignees_url": "https://HOSTNAME/repos/octocat/Hello-World/assignees{/user}",
      "blobs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/blobs{/sha}",
      "branches_url": "https://HOSTNAME/repos/octocat/Hello-World/branches{/branch}",
      "collaborators_url": "https://HOSTNAME/repos/octocat/Hello-World/collaborators{/collaborator}",
      "comments_url": "https://HOSTNAME/repos/octocat/Hello-World/comments{/number}",
      "commits_url": "https://HOSTNAME/repos/octocat/Hello-World/commits{/sha}",
      "compare_url": "https://HOSTNAME/repos/octocat/Hello-World/compare/{base}...{head}",
      "contents_url": "https://HOSTNAME/repos/octocat/Hello-World/contents/{+path}",
      "contributors_url": "https://HOSTNAME/repos/octocat/Hello-World/contributors",
      "deployments_url": "https://HOSTNAME/repos/octocat/Hello-World/deployments",
      "downloads_url": "https://HOSTNAME/repos/octocat/Hello-World/downloads",
      "events_url": "https://HOSTNAME/repos/octocat/Hello-World/events",
      "forks_url": "https://HOSTNAME/repos/octocat/Hello-World/forks",
      "git_commits_url": "https://HOSTNAME/repos/octocat/Hello-World/git/commits{/sha}",
      "git_refs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/refs{/sha}",
      "git_tags_url": "https://HOSTNAME/repos/octocat/Hello-World/git/tags{/sha}",
      "git_url": "git:github.com/octocat/Hello-World.git",
      "issue_comment_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/comments{/number}",
      "issue_events_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/events{/number}",
      "issues_url": "https://HOSTNAME/repos/octocat/Hello-World/issues{/number}",
      "keys_url": "https://HOSTNAME/repos/octocat/Hello-World/keys{/key_id}",
      "labels_url": "https://HOSTNAME/repos/octocat/Hello-World/labels{/name}",
      "languages_url": "https://HOSTNAME/repos/octocat/Hello-World/languages",
      "merges_url": "https://HOSTNAME/repos/octocat/Hello-World/merges",
      "milestones_url": "https://HOSTNAME/repos/octocat/Hello-World/milestones{/number}",
      "notifications_url": "https://HOSTNAME/repos/octocat/Hello-World/notifications{?since,all,participating}",
      "pulls_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls{/number}",
      "releases_url": "https://HOSTNAME/repos/octocat/Hello-World/releases{/id}",
      "ssh_url": "git@github.com:octocat/Hello-World.git",
      "stargazers_url": "https://HOSTNAME/repos/octocat/Hello-World/stargazers",
      "statuses_url": "https://HOSTNAME/repos/octocat/Hello-World/statuses/{sha}",
      "subscribers_url": "https://HOSTNAME/repos/octocat/Hello-World/subscribers",
      "subscription_url": "https://HOSTNAME/repos/octocat/Hello-World/subscription",
      "tags_url": "https://HOSTNAME/repos/octocat/Hello-World/tags",
      "teams_url": "https://HOSTNAME/repos/octocat/Hello-World/teams",
      "trees_url": "https://HOSTNAME/repos/octocat/Hello-World/git/trees{/sha}",
      "hooks_url": "http://HOSTNAME/repos/octocat/Hello-World/hooks"
    },
    "invitee": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "inviter": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "permissions": "write",
    "created_at": "2016-06-13T14:52:50-05:00",
    "url": "https://HOSTNAME/user/repository_invitations/1296269",
    "html_url": "https://github.com/octocat/Hello-World/invitations",
    "node_id": "MDQ6VXNlcjE="
  }
]Update a repository invitation
"Update a repository invitation" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Administration" repository permissions (write)
 
"Update a repository invitation" のパラメーター
| 名前, Type, 説明 | 
|---|
accept string Setting to   | 
| 名前, Type, 説明 | 
|---|
owner string 必須The account owner of the repository. The name is not case sensitive.  | 
repo string 必須The name of the repository without the   | 
invitation_id integer 必須The unique identifier of the invitation.  | 
| 名前, Type, 説明 | 
|---|
permissions string The permissions that the associated user will have on the repository. Valid values are  次のいずれかにできます:   | 
"Update a repository invitation" の HTTP 応答状態コード
| 状態コード | 説明 | 
|---|---|
200 | OK  | 
"Update a repository invitation" のコード サンプル
要求の例
curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/invitations/INVITATION_ID \
  -d '{"permissions":"write"}'Response
Status: 200{
  "id": 1,
  "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
  "repository": {
    "id": 1296269,
    "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
    "name": "Hello-World",
    "full_name": "octocat/Hello-World",
    "owner": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "private": false,
    "html_url": "https://github.com/octocat/Hello-World",
    "description": "This your first repo!",
    "fork": false,
    "url": "https://HOSTNAME/repos/octocat/Hello-World",
    "archive_url": "https://HOSTNAME/repos/octocat/Hello-World/{archive_format}{/ref}",
    "assignees_url": "https://HOSTNAME/repos/octocat/Hello-World/assignees{/user}",
    "blobs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/blobs{/sha}",
    "branches_url": "https://HOSTNAME/repos/octocat/Hello-World/branches{/branch}",
    "collaborators_url": "https://HOSTNAME/repos/octocat/Hello-World/collaborators{/collaborator}",
    "comments_url": "https://HOSTNAME/repos/octocat/Hello-World/comments{/number}",
    "commits_url": "https://HOSTNAME/repos/octocat/Hello-World/commits{/sha}",
    "compare_url": "https://HOSTNAME/repos/octocat/Hello-World/compare/{base}...{head}",
    "contents_url": "https://HOSTNAME/repos/octocat/Hello-World/contents/{+path}",
    "contributors_url": "https://HOSTNAME/repos/octocat/Hello-World/contributors",
    "deployments_url": "https://HOSTNAME/repos/octocat/Hello-World/deployments",
    "downloads_url": "https://HOSTNAME/repos/octocat/Hello-World/downloads",
    "events_url": "https://HOSTNAME/repos/octocat/Hello-World/events",
    "forks_url": "https://HOSTNAME/repos/octocat/Hello-World/forks",
    "git_commits_url": "https://HOSTNAME/repos/octocat/Hello-World/git/commits{/sha}",
    "git_refs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/refs{/sha}",
    "git_tags_url": "https://HOSTNAME/repos/octocat/Hello-World/git/tags{/sha}",
    "git_url": "git:github.com/octocat/Hello-World.git",
    "issue_comment_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/comments{/number}",
    "issue_events_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/events{/number}",
    "issues_url": "https://HOSTNAME/repos/octocat/Hello-World/issues{/number}",
    "keys_url": "https://HOSTNAME/repos/octocat/Hello-World/keys{/key_id}",
    "labels_url": "https://HOSTNAME/repos/octocat/Hello-World/labels{/name}",
    "languages_url": "https://HOSTNAME/repos/octocat/Hello-World/languages",
    "merges_url": "https://HOSTNAME/repos/octocat/Hello-World/merges",
    "milestones_url": "https://HOSTNAME/repos/octocat/Hello-World/milestones{/number}",
    "notifications_url": "https://HOSTNAME/repos/octocat/Hello-World/notifications{?since,all,participating}",
    "pulls_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls{/number}",
    "releases_url": "https://HOSTNAME/repos/octocat/Hello-World/releases{/id}",
    "ssh_url": "git@github.com:octocat/Hello-World.git",
    "stargazers_url": "https://HOSTNAME/repos/octocat/Hello-World/stargazers",
    "statuses_url": "https://HOSTNAME/repos/octocat/Hello-World/statuses/{sha}",
    "subscribers_url": "https://HOSTNAME/repos/octocat/Hello-World/subscribers",
    "subscription_url": "https://HOSTNAME/repos/octocat/Hello-World/subscription",
    "tags_url": "https://HOSTNAME/repos/octocat/Hello-World/tags",
    "teams_url": "https://HOSTNAME/repos/octocat/Hello-World/teams",
    "trees_url": "https://HOSTNAME/repos/octocat/Hello-World/git/trees{/sha}",
    "hooks_url": "http://HOSTNAME/repos/octocat/Hello-World/hooks"
  },
  "invitee": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "inviter": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "permissions": "write",
  "created_at": "2016-06-13T14:52:50-05:00",
  "expired": false,
  "url": "https://HOSTNAME/user/repository_invitations/1296269",
  "html_url": "https://github.com/octocat/Hello-World/invitations"
}Delete a repository invitation
"Delete a repository invitation" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Administration" repository permissions (write)
 
"Delete a repository invitation" のパラメーター
| 名前, Type, 説明 | 
|---|
accept string Setting to   | 
| 名前, Type, 説明 | 
|---|
owner string 必須The account owner of the repository. The name is not case sensitive.  | 
repo string 必須The name of the repository without the   | 
invitation_id integer 必須The unique identifier of the invitation.  | 
"Delete a repository invitation" の HTTP 応答状態コード
| 状態コード | 説明 | 
|---|---|
204 | No Content  | 
"Delete a repository invitation" のコード サンプル
要求の例
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/invitations/INVITATION_IDResponse
Status: 204List repository invitations for the authenticated user
When authenticating as a user, this endpoint will list all currently open repository invitations for that user.
"List repository invitations for the authenticated user" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Administration" repository permissions (read)
 
このエンドポイントは、パブリック リソースのみが要求される場合は、認証または前述メンションアクセス許可なしで使用できます。
"List repository invitations for the authenticated user" のパラメーター
| 名前, Type, 説明 | 
|---|
accept string Setting to   | 
| 名前, Type, 説明 | 
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default:   | 
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default:   | 
"List repository invitations for the authenticated user" の HTTP 応答状態コード
| 状態コード | 説明 | 
|---|---|
200 | OK  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
404 | Resource not found  | 
"List repository invitations for the authenticated user" のコード サンプル
要求の例
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/user/repository_invitationsResponse
Status: 200[
  {
    "id": 1,
    "repository": {
      "id": 1296269,
      "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
      "name": "Hello-World",
      "full_name": "octocat/Hello-World",
      "owner": {
        "login": "octocat",
        "id": 1,
        "node_id": "MDQ6VXNlcjE=",
        "avatar_url": "https://github.com/images/error/octocat_happy.gif",
        "gravatar_id": "",
        "url": "https://HOSTNAME/users/octocat",
        "html_url": "https://github.com/octocat",
        "followers_url": "https://HOSTNAME/users/octocat/followers",
        "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
        "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
        "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
        "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
        "organizations_url": "https://HOSTNAME/users/octocat/orgs",
        "repos_url": "https://HOSTNAME/users/octocat/repos",
        "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
        "received_events_url": "https://HOSTNAME/users/octocat/received_events",
        "type": "User",
        "site_admin": false
      },
      "private": false,
      "html_url": "https://github.com/octocat/Hello-World",
      "description": "This your first repo!",
      "fork": false,
      "url": "https://HOSTNAME/repos/octocat/Hello-World",
      "archive_url": "https://HOSTNAME/repos/octocat/Hello-World/{archive_format}{/ref}",
      "assignees_url": "https://HOSTNAME/repos/octocat/Hello-World/assignees{/user}",
      "blobs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/blobs{/sha}",
      "branches_url": "https://HOSTNAME/repos/octocat/Hello-World/branches{/branch}",
      "collaborators_url": "https://HOSTNAME/repos/octocat/Hello-World/collaborators{/collaborator}",
      "comments_url": "https://HOSTNAME/repos/octocat/Hello-World/comments{/number}",
      "commits_url": "https://HOSTNAME/repos/octocat/Hello-World/commits{/sha}",
      "compare_url": "https://HOSTNAME/repos/octocat/Hello-World/compare/{base}...{head}",
      "contents_url": "https://HOSTNAME/repos/octocat/Hello-World/contents/{+path}",
      "contributors_url": "https://HOSTNAME/repos/octocat/Hello-World/contributors",
      "deployments_url": "https://HOSTNAME/repos/octocat/Hello-World/deployments",
      "downloads_url": "https://HOSTNAME/repos/octocat/Hello-World/downloads",
      "events_url": "https://HOSTNAME/repos/octocat/Hello-World/events",
      "forks_url": "https://HOSTNAME/repos/octocat/Hello-World/forks",
      "git_commits_url": "https://HOSTNAME/repos/octocat/Hello-World/git/commits{/sha}",
      "git_refs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/refs{/sha}",
      "git_tags_url": "https://HOSTNAME/repos/octocat/Hello-World/git/tags{/sha}",
      "git_url": "git:github.com/octocat/Hello-World.git",
      "issue_comment_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/comments{/number}",
      "issue_events_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/events{/number}",
      "issues_url": "https://HOSTNAME/repos/octocat/Hello-World/issues{/number}",
      "keys_url": "https://HOSTNAME/repos/octocat/Hello-World/keys{/key_id}",
      "labels_url": "https://HOSTNAME/repos/octocat/Hello-World/labels{/name}",
      "languages_url": "https://HOSTNAME/repos/octocat/Hello-World/languages",
      "merges_url": "https://HOSTNAME/repos/octocat/Hello-World/merges",
      "milestones_url": "https://HOSTNAME/repos/octocat/Hello-World/milestones{/number}",
      "notifications_url": "https://HOSTNAME/repos/octocat/Hello-World/notifications{?since,all,participating}",
      "pulls_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls{/number}",
      "releases_url": "https://HOSTNAME/repos/octocat/Hello-World/releases{/id}",
      "ssh_url": "git@github.com:octocat/Hello-World.git",
      "stargazers_url": "https://HOSTNAME/repos/octocat/Hello-World/stargazers",
      "statuses_url": "https://HOSTNAME/repos/octocat/Hello-World/statuses/{sha}",
      "subscribers_url": "https://HOSTNAME/repos/octocat/Hello-World/subscribers",
      "subscription_url": "https://HOSTNAME/repos/octocat/Hello-World/subscription",
      "tags_url": "https://HOSTNAME/repos/octocat/Hello-World/tags",
      "teams_url": "https://HOSTNAME/repos/octocat/Hello-World/teams",
      "trees_url": "https://HOSTNAME/repos/octocat/Hello-World/git/trees{/sha}",
      "hooks_url": "http://HOSTNAME/repos/octocat/Hello-World/hooks"
    },
    "invitee": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "inviter": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "permissions": "write",
    "created_at": "2016-06-13T14:52:50-05:00",
    "url": "https://HOSTNAME/user/repository_invitations/1296269",
    "html_url": "https://github.com/octocat/Hello-World/invitations",
    "node_id": "MDQ6VXNlcjE="
  }
]Accept a repository invitation
"Accept a repository invitation" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Administration" repository permissions (write)
 
"Accept a repository invitation" のパラメーター
| 名前, Type, 説明 | 
|---|
accept string Setting to   | 
| 名前, Type, 説明 | 
|---|
invitation_id integer 必須The unique identifier of the invitation.  | 
"Accept a repository invitation" の HTTP 応答状態コード
| 状態コード | 説明 | 
|---|---|
204 | No Content  | 
304 | Not modified  | 
403 | Forbidden  | 
404 | Resource not found  | 
409 | Conflict  | 
"Accept a repository invitation" のコード サンプル
要求の例
curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/user/repository_invitations/INVITATION_IDResponse
Status: 204Decline a repository invitation
"Decline a repository invitation" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Administration" repository permissions (write)
 
"Decline a repository invitation" のパラメーター
| 名前, Type, 説明 | 
|---|
accept string Setting to   | 
| 名前, Type, 説明 | 
|---|
invitation_id integer 必須The unique identifier of the invitation.  | 
"Decline a repository invitation" の HTTP 応答状態コード
| 状態コード | 説明 | 
|---|---|
204 | No Content  | 
304 | Not modified  | 
403 | Forbidden  | 
404 | Resource not found  | 
409 | Conflict  | 
"Decline a repository invitation" のコード サンプル
要求の例
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/user/repository_invitations/INVITATION_IDResponse
Status: 204