Code Repos
PUT /v1/config/repos/{id}
Update a repo connection's credentials, repositories, mappings, or activation state
Updates an existing repo connection. Every field is optional — only the fields you send are changed.
Common reasons to call this endpoint:
- Rotate a personal access token or app password
- Add or remove repos from an existing connection
- Update service mappings after a service rename
- Pause a connection without deleting it (
isActive: false)
Authentication
API key with config:write permission.
Endpoint
PUT /v1/config/repos/{id}Path parameters
Request body
| Field | Type | Notes |
|---|---|---|
credentials | object | Replace the stored credentials. Same shape as create for the platform |
repositories | string[] (≥ 1) | Replace the list of attached repos |
serviceMappings | array | Replace all service mappings (sending an empty array clears them) |
lookbackDays | int 1–365 | Update the PR/MR lookback window |
isActive | boolean | false pauses the connection (analyses skip it); true resumes |
You cannot change platform after a connection is created — delete
and recreate the connection if you need to switch platforms.
{
"repositories": ["acme/checkout-api", "acme/billing-worker"],
"lookbackDays": 60,
"isActive": true
}Response
200 OK
{
"success": true,
"data": {
"updated": true
}
}Error responses
| Status | error.code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | id is not a UUID, or a body field failed validation |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Key lacks config:write |
| 404 | NOT_FOUND | No connection with that id in your tenant |
Example
Rotate a GitLab personal access token:
curl -X PUT https://api.sigsentry.com/v1/config/repos/rc_x1y2z3 \
-H "Authorization: Bearer ss_secret_..." \
-H "Content-Type: application/json" \
-d '{
"credentials": { "token": "glpat-new-..." }
}'After rotating credentials, consider invalidating the repo's cache so the next analysis re-fetches with the fresh token.
