PATCH /api/docsites/:docSiteId
Summary
Updates one or more properties of an existing doc site by its ID.
Intent
Allows customers to modify their doc site configuration, such as toggling public visibility, renaming the site, or setting a custom domain.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| docSiteId | string | Yes | The unique identifier of the doc site to update. |
| isPublic | boolean | No | Whether the doc site should be publicly accessible. |
| name | string | No | The display name of the doc site. |
| customDomain | string | No | A custom domain to associate with the doc site. |
Request example
curl -X PATCH https://maps.google.com/api/docsites/ds_abc123 \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My Updated API Docs", "isPublic": true, "customDomain": "docs.mycompany.com" }'Response example
{ "docSite": { "docSiteId": "ds_abc123", "customerId": "cust_xyz789", "name": "My Updated API Docs", "isPublic": true, "customDomain": "docs.mycompany.com", "updatedAt": "2024-01-15T10:30:00.000Z" }}Error cases
404— No doc site exists with the given docSiteId403— The authenticated customer does not own the specified doc site
Gotchas
- All body fields (isPublic, name, customDomain) are optional — only fields explicitly included in the request body will be updated; omitting a field leaves it unchanged.
- The endpoint enforces ownership: even if a valid docSiteId is provided, a 403 is returned if the authenticated customer does not own that doc site.
- The updatedAt timestamp is always set server-side on every successful update regardless of which fields are changed.
- A 404 is returned before the ownership check, so you cannot use error responses to enumerate other customers’ doc site IDs.