
Remove All Origin Pull Request Labels via the API
Remove every label from a pull request with DELETE https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/pulls/{pullNumber}/labels. Official reference: Origin API → Remove All Pull Request Labels (OpenAPI OriginService_RemoveAllPullRequestLabels).
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:write. Availability: Early Beta per the API overview.
The call succeeds when the pull already has no labels. An unknown or unreachable pull returns 404. A 404 never distinguishes a missing pull from one your installation cannot reach. Pull request number is a JSON string. The successful response body is empty.
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) |
curl --request DELETE \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/pulls/17/labels' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN'
Response
204 No Content with an empty body.
204 No Content
To remove a single label and receive the remaining set, use Remove Pull Request Label. Base URL: https://api.cursor.com/v1/origin.