Stable resources
Separate durable repository IDs from mutable names and model branches as references that move between immutable commits.
Code repository API
Design an interface that connects source code, merge workflows, internal portals, automation, and analytics without exposing unstable implementation details.
API contract
Repository APIs need durable identity, immutable commit references, safe branch updates, clear authorization, and consistent asynchronous work.
Separate durable repository IDs from mutable names and model branches as references that move between immutable commits.
Require expected commit IDs or conditional requests so two callers cannot silently overwrite the same branch state.
Use signed webhooks for notification and job resources for imports, exports, forks, archives, and other long-running work.
PATCH /repositories/{id}/refs/{branch}Developer experience
Document validation errors, authorization failures, conflicts, rate limits, queued jobs, webhook retries, and pagination—not only the ideal request.
Read the API design guideConnected topics
Design a stable repository API with durable identities, explicit concurrency, narrow authorization, predictable HTTP behavior, webhooks, jobs, and useful examples.
Read the guide →
Choose the right automation point, package hooks responsibly, secure webhook delivery, build idempotent handlers, and keep CI/CD observable and recoverable.
Read the guide →
Anchor pipelines to immutable commits, isolate untrusted work, promote verified artifacts, report clear status, and protect deployment environments.
Read the guide →A specific repository question?
Use email for editorial feedback, corrections, topic suggestions, or questions about the published guides.