Skip to content

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

NameTypeRequiredDescription
repoIdstringYesThe unique identifier of the repository whose settings are being updated.
customerIdstringNoIf provided, must match the customerId already associated with the repo. Used to verify ownership before applying changes.
hitlEnabledbooleanNoEnables or disables human-in-the-loop review for this repository.
logoUrlstringNoURL of the logo image to display in the generated documentation site.
primaryColorstringNoPrimary brand color (e.g. hex code) used in the generated documentation site.
accentColorstringNoAccent brand color (e.g. hex code) used in the generated documentation site.
branchstringNoThe Git branch to track for this repository.

Request example

Terminal window
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 repoId
  • 403 — 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.