PATCH /api/repos/:repoId/settings
Summary
Updates one or more settings for a specific repository, such as branding, feature flags, and branch configuration.
Intent
Allows clients to partially update repository-level settings including UI customization (logo, colors), HITL (human-in-the-loop) enablement, and the tracked branch, without requiring a full settings object to be submitted.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| repoId | string | Yes | The unique identifier of the repository whose settings are being updated. |
| customerId | string | No | If provided, must match the customerId already associated with the repo. Used to verify ownership before applying changes. |
| hitlEnabled | boolean | No | Enables or disables human-in-the-loop review for this repository. |
| logoUrl | string | No | URL of the logo image to display in the generated documentation site. |
| primaryColor | string | No | Primary brand color (e.g. hex code) used in the generated documentation site. |
| accentColor | string | No | Accent brand color (e.g. hex code) used in the generated documentation site. |
| branch | string | No | The Git branch to track for this repository. |
Request example
curl -X PATCH https://maps.google.com/api/repos/repo-123/settings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "customerId": "cust-456", "hitlEnabled": true, "logoUrl": "https://cdn.example.com/logo.png", "primaryColor": "#1A73E8", "accentColor": "#FBBC04", "branch": "main" }'Response example
{ "settings": { "repoId": "repo-123", "hitlEnabled": true, "logoUrl": "https://cdn.example.com/logo.png", "primaryColor": "#1A73E8", "accentColor": "#FBBC04", "branch": "main" }}Error cases
404— No repository exists with the given repoId403— A customerId was provided in the request body but it does not match the customerId already associated with the repository
Gotchas
- This is a PATCH endpoint — only fields included in the request body are updated. Omitted fields retain their current values.
- The customerId field is not a settings value; it is used solely as an ownership check. If provided and it does not match the repo’s stored customerId, the request is rejected with 403.
- If no settings have been saved yet for the repo, defaults are applied first (seeded from the repo’s current branch), and then the provided fields are merged on top.
- Sending customerId alone (with no other fields) will perform an ownership check but make no changes to the stored settings.
- There is no input validation on color format or URL format — the API stores whatever string values are provided.