SigSentrySigSentry
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

ParamTypeNotes
idUUIDThe connection id (from list or create)

Request body

FieldTypeNotes
credentialsobjectReplace the stored credentials. Same shape as create for the platform
repositoriesstring[] (≥ 1)Replace the list of attached repos
serviceMappingsarrayReplace all service mappings (sending an empty array clears them)
lookbackDaysint 1–365Update the PR/MR lookback window
isActivebooleanfalse 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

Statuserror.codeWhen
400VALIDATION_ERRORid is not a UUID, or a body field failed validation
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENKey lacks config:write
404NOT_FOUNDNo 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.