Content-Length
to zero when calling out to this endpoint. For more information, see “HTTP verbs.”
The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.
Updating an existing collaborator’s permission level
The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission
parameter. The response will be a 204
, with no other indication that the permission level changed.
Rate limits
You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.
External DocumentationTo learn more, visit the GitHub documentation.
Parameters
Parameter | Description |
---|---|
Owner | The account owner of the repository. The name is not case sensitive. |
Permission | The permission to grant the collaborator. Only valid on organization-owned repositories. In addition to the enumerated values, you can also specify a custom repository role name, if the owning organization has defined any. |
Repo | The name of the repository. The name is not case sensitive. |
Username | The handle for the GitHub user account. |