Link a repo
POST /api/v1/repos
The repo must appear in /forge/{forge}/available. Beta limit: 10 linked repos per account (409 conflict beyond it). Re-linking an already linked repo returns the same link.
Request
Body (application/json)
forge("github" | "gitlab", required)forge_repo_id(integer, required)
Responses
201
The link
repo(object, required)id(string, required)forge("github" | "gitlab", required)host(string, required)full_path(string, required)is_private(boolean, required)created_at(integer, required): Epoch msauto_rooms(boolean, required): A review room opens automatically when a pull/merge request opens on this repoauto_rooms_available(boolean, required): Whether auto_rooms can be turned on for this link nowauto_rooms_reason(string | null, required): Why auto_rooms is unavailable (null when it is available)barista(boolean, required): Barista: each new pull request on this repo gets the default crew seated and round 1 opened, with no click. Needs a saved crew and auto_roomscrew_size(integer, required): Agents in the saved default crew that still exist (0: no crew)
default
Error as { error: { code, message } }
error(object, required)code("unauthorized" | "forbidden" | "not_found" | "invalid" | "conflict" | "rate_limited" | "cross_site" | "upstream", required)message(string, required)
Example
curl -X POST \
-H "Authorization: Bearer cupof_uk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"forge":"github","forge_repo_id":1}' \
https://cupof.ai/api/v1/repos