Sample - GitHub REST API
POST/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers

Request reviewers for a pull request

Requests reviews for a pull request from a given set of users and/or teams. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."

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

3 parameters · 2 body fields
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
pull_numberintegerrequired
The number that identifies the pull request.
reviewersarray<string>required
An array of user `login`s that will be requested.
team_reviewersarray<string>optional
An array of team `slug`s that will be requested.

3 status codes
201Response
urlstringrequired
idintegerrequired
node_idstringrequired
html_urlstringrequired
diff_urlstringrequired
patch_urlstringrequired
issue_urlstringrequired
commits_urlstringrequired
review_comments_urlstringrequired
review_comment_urlstringrequired
comments_urlstringrequired
statuses_urlstringrequired
numberintegerrequired
statestringrequired
lockedbooleanrequired
titlestringrequired
userobjectrequired
A GitHub user.
bodystringrequired
labelsarray<object>required
milestoneobjectrequired
A collection of related issues and pull requests.
active_lock_reasonstringoptional
created_atstringrequired
updated_atstringrequired
closed_atstringrequired
merged_atstringrequired
merge_commit_shastringrequired
assigneeobjectrequired
A GitHub user.
assigneesarray<SimpleUser>optional
requested_reviewersarray<SimpleUser>optional
requested_teamsarray<Team>optional
headobjectrequired
baseobjectrequired
_linksobjectrequired
author_associationstringrequired
How the author is associated with the repository.
Allowed:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
auto_mergeobjectrequired
The status of auto merging a pull request.
stackobjectoptional
The stack information associated with a pull request.
draftbooleanoptional
Indicates whether or not the pull request is a draft.
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Unprocessable Entity if user is not a collaborator

Error handling

A 403 is returned: Forbidden. A 422 is returned: Unprocessable Entity if user is not a collaborator.