| title | Repository Invitations |
|---|
{{#tip}}
We're currently offering a preview of the Repository Invitations API.
To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.swamp-thing-preview+json
{{/tip}}
{:toc}
Use the API endpoint for adding a collaborator here.
GET /repositories/:repo_id/invitations
When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:repository_invitation) { |h| [h] } %>
DELETE /repositories/:repo_id/invitations/:invitation_id
<%= headers 204 %>
PATCH /repositories/:repo_id/invitations/:invitation_id
| Name | Type | Description |
|---|---|---|
permissions |
string |
The permissions that the associated user will have on the repository. Valid values are read, write, and admin. |
<%= headers 200 %> <%= json(:repository_invitation) %>
GET /user/repository_invitations
When authenticating as a user, this endpoint will list all currently open repository invitations for that user.
<%= headers 200 %> <%= json(:repository_invitation) { |h| [h] } %>
PATCH /user/repository_invitations/:invitation_id
<%= headers 204 %>
DELETE /user/repository_invitations/:invitation_id
<%= headers 204 %>