API / delete-origin-ruleset-via-api

API

Delete Origin Ruleset via the API

Delete a repository ruleset by its stable Origin id with DELETE https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/rulesets/{rulesetId}. Official reference: Origin API and changelog (OpenAPI OriginService_DeleteRuleset; added 2026-08-22). The response body is empty.

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:write. Availability: Early Beta per the API overview.

An empty rulesetId returns InvalidArgument (HTTP 400). A ruleset stored on a different repository reads as an unknown ruleset and returns 404.

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
rulesetId yes Stable Origin ruleset id
curl --request DELETE \
  --url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/rulesets/rs_01k2ja2000e0080000000000t7' \
  --header 'Authorization: Bearer YOUR_ORIGIN_TOKEN'

Response

Successful requests return 204 No Content with an empty body.

204 No Content

Confirm with List Rulesets or Get Ruleset. Base URL: https://api.cursor.com/v1/origin.