
Request Origin Pull Request Reviewers via the API
Request reviews from users and groups on a pull request with POST https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/pulls/{pullNumber}/requested_reviewers. Official reference: Origin API → Request Pull Request Reviewers (OpenAPI OriginService_RequestPullRequestReviewers).
Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) or a user access token that carries repository:pull_requests:reviews:write. Availability: Early Beta per the API overview.
Identifiers resolve against the repository's reviewer candidates by public id, user email, or group slug. Display names do not resolve. An unknown or ambiguous identifier returns InvalidArgument (HTTP 400) naming the identifier. At least one non-empty entry is required across users and groups. A reviewer who is not a candidate for the repository returns PermissionDenied (HTTP 403). Requesting an already-requested reviewer bumps the request timestamp, so a reviewer who had submitted a review reappears as pending. Pull request number is a JSON string. An unknown or unreachable pull returns 404. A 404 never distinguishes a missing pull from one your installation cannot reach.
Cost: 5 points against the principal budget (ordinary write).
Path parameters
| Param | Required | Meaning |
|---|---|---|
ownerSlug |
yes | Owning entity's unique slug |
repoName |
yes | Repo name, unique to the owner |
pullNumber |
yes | Pull request number within the repository (string on the wire) |
Request body
| Field | Required | Meaning |
|---|---|---|
users |
no | User identifiers (user_… id or email). Must uniquely match a user candidate |
groups |
no | Group identifiers (grp_… id, qualified group slug, or group slug). Must uniquely match a group candidate |
At least one of users or groups must contain a non-empty entry.
curl --request POST \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/pulls/17/requested_reviewers' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"users": [
"user_01k2ja2000e0080000000000c3"
],
"groups": [
"grp_01k2ja2000e0080000000000n2"
]
}'
Response
200 returns the users and groups this call requested (same shape as List Pull Request Requested Reviewers).
{
"users": [
{
"id": "user_01k2ja2000e0080000000000c3",
"email": "jane@acme.dev"
}
],
"groups": [
{
"id": "grp_01k2ja2000e0080000000000n2"
}
]
}
List the full pending set with List Pull Request Requested Reviewers. Base URL: https://api.cursor.com/v1/origin.