---
title: "Update canonical URL"
method: POST
path: "/update_canonical_url"
tags: ["Canonical URLs"]
---

# Update canonical URL

`POST /update_canonical_url`

## Request

- Base URL: `https://happy-animal-123.convex.cloud/api/v1`
- URL: `https://happy-animal-123.convex.cloud/api/v1/update_canonical_url`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - API key in header `Authorization`

Set or unset the canonical URL for a deployment's convex.cloud or
convex.site domain. This allows you to customize the  CONVEX_SITE_URL and
CONVEX_CLOUD_URL environment variables in your deployment.

## Request body

- UpdateCanonicalUrlRequest
  - `requestDestination` 'convexCloud' | 'convexSite', required
  - `url` string, nullable: The new canonical URL. Omit this to reset the canonical URl to the default value.

## Response `200`

---

[API](https://skmtc.dev/operatornest/apis/convex-deployment-api.md) · [All operations](https://skmtc.dev/operatornest/apis/convex-deployment-api/llms.txt) · [OpenAPI document](https://skmtc.dev/operatornest/apis/convex-deployment-api/revisions/bd0de6c553a7?raw)
