Sample - GitHub REST API
PATCH/repos/{owner}/{repo}/invitations/{invitation_id}

Update a repository invitation

Updates the permissions associated with an invitation to collaborate on a repository. Provide owner, repo, and invitation_id, and optionally set permissions to control the invitee's repository access.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters · 1 body field
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
invitation_idintegerrequired
The unique integer identifier of the invitation to update.

Optional repository invitation settings to update.

permissionsstringoptional
The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`.
Allowed:readwritemaintaintriageadmin

1 status code
200Returns the updated repository invitation, including its identifier, repository, invitee, inviter, permissions, creation timestamp, expiration state, and invitation URLs.
idintegerrequired
Unique identifier of the repository invitation.
repositoryobjectrequired
Minimal Repository
inviteeobjectrequired
A GitHub user.
inviterobjectrequired
A GitHub user.
permissionsstringrequired
The permission associated with the invitation.
Allowed:readwriteadmintriagemaintain
created_atstringrequired
expiredbooleanoptional
Whether or not the invitation has expired
urlstringrequired
URL for the repository invitation
html_urlstringrequired
node_idstringrequired

Error handling

owner and repo must identify the repository, and invitation_id must identify the invitation to update. If supplied, permissions must be one of: read, write, maintain, triage, or admin.