Early Beta reference for the Cursor Origin API. Origin is Cursor’s code forge; its public REST API lets apps and tools work with Origin repositories, commits, checks, pull requests, apps, and installations.
The base URL for API requests is https://api.cursor.com/v1/origin. The Origin API is in Early Beta and subject to change.
Every link below is a Markdown page. Each reference section, endpoint, and webhook payload has its own page, named by its heading anchor on the web reference: the #pagination section is /docs/api/origin/reference/pagination.md.
Docs¶
- Full reference (Markdown): The complete Origin API reference as a single Markdown file.
- OpenAPI specification: Machine-readable OpenAPI 3.1 spec with request and response schemas.
- Origin Migration API: Endpoints for migrating repositories between GitHub and Origin mirrors, called with a user access token.
Guides¶
- Overview
- Base URL
- Protocol conventions
- Preview
- Changelog
- Getting started
- Origin access
- Origin CLI
- Installation
- Installation receipt
- Authentication
- Generate an app signing key
- App JWT
- Installation access token
- Git HTTPS authentication
- User-authenticated CLI requests
- Discovery and signing keys
- Acting on Behalf of Users
- Scopes
- Mirrored repositories
- Rate limits
- Response headers
- Exceeding the limit
- Checking remaining quota
- Common conventions
- Pagination
- Errors
- IDs
- Repository paths
- Resource references
- Check runs
- Attempts and the current attempt
- Ordering writes
- Timestamps and deadlines
- Current limitations
- Implementation checklist
- Endpoint reference
Apps and installations¶
- Apps and installations
- Get Rate Limit
- Get Authenticated App
- List App Installations
- Get App Installation
- Delete App Installation
- Create Installation Access Token
- Create Installation User Token
- List App Installation Repositories
- List Webhook Deliveries
- Batch Redeliver Webhook Deliveries
- Ping Webhook
- Get App
- Update App
- Add App Signing Key
- Revoke App Signing Key
- List Namespace Apps
- Create App
- Add App Installation Repositories
Repositories¶
- Repositories
- List Namespaces
- List Repos
- Get Repo
- Update Repo
- Create Repo
- List Branches
- Get Repository Collaborator Permission
- Get Repo Tarball
- Sync Mirror
Checks¶
- Checks
- Post Check Run
- Batch Upsert Check Runs
- Get Check Run
- List Check Run Annotations
- Create Check Run Annotations
- Rerequest Check Run
- Get Check Suite
- List Check Runs For Suite
- List Check Runs For Commit
- List Check Suites For Commit
Commits and contents¶
- Commits and contents
- List Commits
- Get Commit
- List Commit Files
- Compare Commits
- List Comparison Files
- Get Contents
- Batch Get Contents
- Grep Contents
Git data¶
- Git data
- Get Blob
- Get Git Commit
- Create Commit From Files
- Get Git Ref
- Create Git Ref
- Delete Git Ref
- List Matching Git Refs
- List Matching Git Refs by Path
- Get Tag
- Get Tree
Grants¶
- Grants
- List Repository Grants
- Upsert Repository Grant
- Delete Repository Grant
- List Namespace Grants
- Upsert Namespace Grant
- Delete Namespace Grant
Grants concepts¶
Inbound IP allowlist¶
- Inbound IP allowlist
- Get Inbound IP Allowlist
- Update Inbound IP Allowlist
- Add Inbound IP Allowlist Entry
- Get Inbound IP Allowlist Entry
- Delete Inbound IP Allowlist Entry
- Update Inbound IP Allowlist Entry
- Replace Inbound IP Allowlist Entries
Labels¶
Pull requests¶
- Pull requests
- List Pull Requests
- Get Pull Request
- Create Pull Request
- Update Pull Request
- Enable Pull Request Auto Merge
- Disable Pull Request Auto Merge
- List Pull Request Comments
- Get Pull Request Comment
- Delete Pull Request Comment
- Create Pull Request Comment
- Update Pull Request Comment
- Add Pull Request Comment Reaction
- Remove Pull Request Comment Reaction
- Update Pull Request Thread
- List Pull Request Commits
- List Pull Request Files
- List Pull Request Labels
- Set Pull Request Labels
- Add Pull Request Labels
- Remove All Pull Request Labels
- Remove Pull Request Label
- Merge Pull Request
- Prepare Pull Request Merge Ref
- Get Pull Request Mergeability
- List Pull Request Requested Reviewers
- Request Pull Request Reviewers
- Remove Pull Request Requested Reviewers
- List Pull Request Reviews
- Create Pull Request Review
- Update Pull Request Review
- Dismiss Pull Request Review
- Search Pull Requests
Rulesets¶
SSH certificate authorities¶
- SSH certificate authorities
- List SSH Certificate Authorities
- Add SSH Certificate Authority
- Delete SSH Certificate Authority
- Set SSH Certificate Requirement
Webhooks¶
Webhooks reference¶
- Webhooks reference
- Events
- Event payloads
- Repository Created
- Repository Deleted
- Repository Push
- Repository Metadata Updated
- Pull Request Events
- Pull Request Auto Merge Enabled
- Pull Request Auto Merge Disabled
- Pull Request Label Events
- Pull Request Comment
- Pull Request Comment Reaction Events
- Pull Request Review Events
- Pull Request Reviewer Events
- Check Run Events
- Check Run Rerequested
- Check Run Annotations
- Installation Created
- Installation Updated
- Installation Suspended
- Installation Unsuspended
- Installation Deleted