Use the REST API to view and manage invitations to collaborate on a repository.
You can view and manage invitations to collaborate on a repository. The invited users (or external services on behalf of invited users) can choose to accept or decline the invitations.
To add a user as a collaborator, use the Collaborators endpoints instead. For more information, see REST API endpoints for collaborators.
Note that the repo:invite OAuth scope grants targeted
access to invitations without also granting access to repository code, while the
repo scope grants permission to code as well as invitations.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /repos/{owner}/{repo}/invitations
When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/invitations
Response schema (Status: 200):
Array of Repository Invitation:
id: required, integer, format: int64repository: required, Minimal Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringowner: required, Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringprivate: required, booleanhtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: stringmirror_url: string or nullhooks_url: required, string, format: urisvn_url: stringhomepage: string or nulllanguage: string or nullforks_count: integerstargazers_count: integerwatchers_count: integersize: integerdefault_branch: stringopen_issues_count: integeris_template: booleantopics: array of stringhas_issues: booleanhas_projects: booleanhas_wiki: booleanhas_pages: booleanhas_discussions: booleanhas_pull_requests: booleanpull_request_creation_policy: string, enum: all, collaborators_onlyarchived: booleandisabled: booleanvisibility: stringpushed_at: string or null, format: date-timecreated_at: string or null, format: date-timeupdated_at: string or null, format: date-timepermissions: object:
admin: booleanmaintain: booleanpush: booleantriage: booleanpull: booleanrole_name: stringtemp_clone_token: stringdelete_branch_on_merge: booleansubscribers_count: integernetwork_count: integercode_of_conduct: Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: urilicense: object or null:
key: stringname: stringspdx_id: stringurl: string or nullnode_id: stringforks: integeropen_issues: integerwatchers: integerallow_forking: booleanweb_commit_signoff_required: booleansecurity_and_analysis: object or null:
advanced_security: object:
status: string, enum: enabled, disabledcode_security: object:
status: string, enum: enabled, disableddependabot_security_updates: object:
status: string, enum: enabled, disabledsecret_scanning: object:
status: string, enum: enabled, disabledsecret_scanning_push_protection: object:
status: string, enum: enabled, disabledsecret_scanning_non_provider_patterns: object:
status: string, enum: enabled, disabledsecret_scanning_ai_detection: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_alert_dismissal: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass_options: object:
reviewers: array of objectcustom_properties: object, additional properties allowedinvitee: required, any of:
inviter: required, any of:
permissions: required, string, enum: read, write, admin, triage, triage_plus, maintaincreated_at: required, string, format: date-timeexpired: booleanurl: required, stringhtml_url: required, stringnode_id: required, stringPATCH /repos/{owner}/{repo}/invitations/{invitation_id}
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
invitation_id (integer) (required)
The unique identifier of the invitation.
permissions (string)read, write, maintain, triage, adminRequest:
curl -L \
-X PATCH \
https://api.github.com/repos/OWNER/REPO/invitations/INVITATION_ID \
-d '{
"permissions": "write"
}'
Response schema (Status: 200):
id: required, integer, format: int64repository: required, Minimal Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringowner: required, Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringprivate: required, booleanhtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: stringmirror_url: string or nullhooks_url: required, string, format: urisvn_url: stringhomepage: string or nulllanguage: string or nullforks_count: integerstargazers_count: integerwatchers_count: integersize: integerdefault_branch: stringopen_issues_count: integeris_template: booleantopics: array of stringhas_issues: booleanhas_projects: booleanhas_wiki: booleanhas_pages: booleanhas_discussions: booleanhas_pull_requests: booleanpull_request_creation_policy: string, enum: all, collaborators_onlyarchived: booleandisabled: booleanvisibility: stringpushed_at: string or null, format: date-timecreated_at: string or null, format: date-timeupdated_at: string or null, format: date-timepermissions: object:
admin: booleanmaintain: booleanpush: booleantriage: booleanpull: booleanrole_name: stringtemp_clone_token: stringdelete_branch_on_merge: booleansubscribers_count: integernetwork_count: integercode_of_conduct: Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: urilicense: object or null:
key: stringname: stringspdx_id: stringurl: string or nullnode_id: stringforks: integeropen_issues: integerwatchers: integerallow_forking: booleanweb_commit_signoff_required: booleansecurity_and_analysis: object or null:
advanced_security: object:
status: string, enum: enabled, disabledcode_security: object:
status: string, enum: enabled, disableddependabot_security_updates: object:
status: string, enum: enabled, disabledsecret_scanning: object:
status: string, enum: enabled, disabledsecret_scanning_push_protection: object:
status: string, enum: enabled, disabledsecret_scanning_non_provider_patterns: object:
status: string, enum: enabled, disabledsecret_scanning_ai_detection: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_alert_dismissal: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass_options: object:
reviewers: array of objects:
reviewer_id: required, integerreviewer_type: required, string, enum: TEAM, ROLEmode: string, enum: ALWAYS, EXEMPT, default: "ALWAYS"custom_properties: object, additional properties allowedinvitee: required, any of:
inviter: required, any of:
permissions: required, string, enum: read, write, admin, triage, triage_plus, maintaincreated_at: required, string, format: date-timeexpired: booleanurl: required, stringhtml_url: required, stringnode_id: required, stringDELETE /repos/{owner}/{repo}/invitations/{invitation_id}
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
invitation_id (integer) (required)
The unique identifier of the invitation.
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/invitations/INVITATION_ID
Response schema (Status: 204):
GET /user/repository_invitations
When authenticating as a user, this endpoint will list all currently open repository invitations for that user.
accept (string)application/vnd.github+json is recommended.per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
304 - Not modified
401 - Requires authentication
403 - Forbidden
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/user/repository_invitations
Response schema (Status: 200):
Same response schema as List repository invitations.
PATCH /user/repository_invitations/{invitation_id}
accept (string)application/vnd.github+json is recommended.invitation_id (integer) (required)204 - No Content
304 - Not modified
403 - Forbidden
404 - Resource not found
409 - Conflict
451 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X PATCH \
https://api.github.com/user/repository_invitations/INVITATION_ID
Response schema (Status: 204):
DELETE /user/repository_invitations/{invitation_id}
accept (string)application/vnd.github+json is recommended.invitation_id (integer) (required)204 - No Content
304 - Not modified
403 - Forbidden
404 - Resource not found
409 - Conflict
Request:
curl -L \
-X DELETE \
https://api.github.com/user/repository_invitations/INVITATION_ID
Response schema (Status: 204):