Apply production-ready CodeRabbit SDK patterns for TypeScript and Python. Use when implementing CodeRabbit integrations, refactoring SDK usage, or establishing team coding standards for...
CodeRabbit documents REST APIs for organizations, metrics, learnings, users, roles, logs, and security. Implement only referenced operations.
references/official-docs.md and re-check any time-sensitive contract before execution.x-coderabbitai-api-key header.Treat Git-provider sessions, CodeRabbit web sessions, CLI credentials, and CodeRabbit API keys as separate credentials. Use only an already-approved session or secret-manager reference, never print a secret, and do not place credentials in .coderabbit.yaml, source files, logs, or deliverables.
Select one operation and record plan, permission, key type, request, pagination, and response.
Build a thin typed adapter with injected URL and secret reference.
Implement only documented errors and preserve partial success.
Test fixtures, then one approved read-only request.
Require Admin and security approval for keys; require separate approval for writes, roles, seats, or exports. Keep analysis and drafts local until approval is explicit, and record who approved the action and its scope.
A contract record, adapter, redacted fixtures, pagination handling, live-read receipt, and rotation owner. Include source dates, unknowns, and the exact boundary between observed fact and recommendation.
| Condition | Response |
|---|---|
| Current contract is unclear or docs disagree | Stop mutation, cite both sources, and request owner resolution. |
| Required access or approval is missing | Produce a draft and evidence plan only. |
| Validation or pilot behavior differs from expectation | Restore the prior state and retain the failed evidence. |
| Output contains secrets or private code | Stop, quarantine the artifact, redact it, and notify the data owner. |
Fetch paginated metrics with cursor provenance.
Reconcile partial success before bulk role changes.
references/official-docs.md.