Puntos de conexión de la API de REST para invitaciones del repositorio
Usa la API de REST para ver y administrar invitaciones para colaborar en un repositorio.
Acerca de las invitaciones a un repositorio
Puedes ver y administrar invitaciones para colaborar en un repositorio. Los usuarios invitados (o los servicios externos en nombre de estos) pueden elegir aceptar o rechazar la invitación.
Para agregar un usuario como colaborador, usa los puntos de conexión de colaboradores en su lugar. Para más información, consulta Puntos de conexión de la API de REST para colaboradores.
Tenga en cuenta que el ámbito de OAuth repo:invite concede acceso de destino a las invitaciones sin conceder también acceso al código del repositorio, mientras que el ámbito repo concede permiso para el código y las invitaciones.
List repository invitations
When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
Tokens de acceso específicos para "List repository invitations"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener al menos uno de los siguientes conjuntos de permisos:
- "Administration" repository permissions (read)
- "Private repository invitations" user permissions (read)
Parámetros para "List repository invitations"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| ownerstring RequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostring RequeridoThe name of the repository without the  | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List repository invitations"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List repository invitations"
Ejemplo de solicitud
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
Tokens de acceso específicos para "Update a repository invitation"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Administration" repository permissions (write)
Parámetros para "Update a repository invitation"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| ownerstring RequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostring RequeridoThe name of the repository without the  | 
| invitation_idinteger RequeridoThe unique identifier of the invitation. | 
| Nombre, Tipo, Descripción | 
|---|
| permissionsstringThe permissions that the associated user will have on the repository. Valid values are  Puede ser uno de los siguientes:  | 
Códigos de estado de respuesta HTTP para "Update a repository invitation"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "Update a repository invitation"
Ejemplo de solicitud
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
Tokens de acceso específicos para "Delete a repository invitation"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Administration" repository permissions (write)
Parámetros para "Delete a repository invitation"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| ownerstring RequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostring RequeridoThe name of the repository without the  | 
| invitation_idinteger RequeridoThe unique identifier of the invitation. | 
Códigos de estado de respuesta HTTP para "Delete a repository invitation"
| status code | Descripción | 
|---|---|
| 204 | No Content | 
Ejemplos de código para "Delete a repository invitation"
Ejemplo de solicitud
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.
Tokens de acceso específicos para "List repository invitations for the authenticated user"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Administration" repository permissions (read)
Este punto de conexión se puede usar sin autenticación o los permisos mencionados anteriormente si solo se solicitan recursos públicos.
Parámetros para "List repository invitations for the authenticated user"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List repository invitations for the authenticated user"
| status code | Descripción | 
|---|---|
| 200 | OK | 
| 304 | Not modified | 
| 401 | Requires authentication | 
| 403 | Forbidden | 
| 404 | Resource not found | 
Ejemplos de código para "List repository invitations for the authenticated user"
Ejemplo de solicitud
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
Tokens de acceso específicos para "Accept a repository invitation"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Administration" repository permissions (write)
Parámetros para "Accept a repository invitation"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| invitation_idinteger RequeridoThe unique identifier of the invitation. | 
Códigos de estado de respuesta HTTP para "Accept a repository invitation"
| status code | Descripción | 
|---|---|
| 204 | No Content | 
| 304 | Not modified | 
| 403 | Forbidden | 
| 404 | Resource not found | 
| 409 | Conflict | 
Ejemplos de código para "Accept a repository invitation"
Ejemplo de solicitud
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
Tokens de acceso específicos para "Decline a repository invitation"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Administration" repository permissions (write)
Parámetros para "Decline a repository invitation"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| invitation_idinteger RequeridoThe unique identifier of the invitation. | 
Códigos de estado de respuesta HTTP para "Decline a repository invitation"
| status code | Descripción | 
|---|---|
| 204 | No Content | 
| 304 | Not modified | 
| 403 | Forbidden | 
| 404 | Resource not found | 
| 409 | Conflict | 
Ejemplos de código para "Decline a repository invitation"
Ejemplo de solicitud
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