
List Origin Rulesets via the API
List every ruleset configured on a repository with GET https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/rulesets. Official reference: Origin API and changelog (OpenAPI OriginService_ListRulesets; added 2026-08-21).
Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) or a user access token that carries repository:rulesets:read. Availability: Early Beta per the API overview.
Rulesets are bounded configuration, so the response is the full set in one body (no pagination). You can also address the repository by stable id as /v1/origin/repos/_/REPO_ID (changelog).
Cost: 1 point against the principal budget (ordinary read).
Path parameters
| Param | Required | Meaning |
|---|---|---|
ownerSlug |
yes | Owning entity's unique slug (or _ with repo id as repoName) |
repoName |
yes | Repo name unique to the owner, or stable repo_… id when owner is _ |
curl --request GET \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/rulesets' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN'
Response
200 returns a ListRulesetsResponse: rulesets is an array of Ruleset objects, and repository is the shared RepositoryReference for the listing.
{
"rulesets": [
{
"id": "rs_01k2ja2000e0080000000000t7",
"name": "require-review",
"description": "Require an approving review before merging to main.",
"enforcement": "active",
"kind": "merge_branch",
"includedRefNames": ["refs/heads/main"],
"rules": [
{
"id": "rsr_01k2ja2000e0080000000000v8",
"ruleType": "pull_request",
"parameters": {
"requiredApprovingReviewCount": 1
}
}
],
"bypassActors": [
{
"id": "rsba_01k2ja2000e0080000000000w9",
"bypassMode": "always",
"user": {
"id": "act_01k2ja2000e0080000000000x0"
}
}
]
}
],
"repository": {
"id": "repo_01k2ja2000e0080000000000q4",
"name": "rocket",
"owner": {
"slug": "acme",
"id": "ns_01k2ja2000e0080000000000p3",
"type": "team"
}
}
}
A missing or unreachable repository returns 404. For one ruleset by id, use Get Ruleset. Base URL: https://api.cursor.com/v1/origin.