v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_CDN Endpoints

Update a CDN Endpoint

To update the TTL, certificate ID, or the FQDN of the custom subdomain for an existing CDN endpoint, send a PUT request to /v2/cdn/endpoints/$ENDPOINT_ID.

put/v2/cdn/endpoints/{cdn_id}

Path parameters

cdn_idstring uuid required

A unique identifier for a CDN endpoint.

Request body

ttl60 | 600 | 3600 | 86400 | 604800

The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded.

certificate_idstring uuid

The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.

custom_domainstring hostname

The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint.

Example request

{
  "ttl": 3600,
  "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf",
  "custom_domain": "static.example.com"
}

Response

The response will be a JSON object with an endpoint key. This will be set to an object containing the standard CDN endpoint attributes.

Example response

{
  "endpoint": {
    "id": "892071a0-bb95-49bc-8021-3afd67a210bf",
    "origin": "static-images.nyc3.digitaloceanspaces.com",
    "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com",
    "ttl": 3600,
    "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf",
    "custom_domain": "static.example.com",
    "created_at": "2018-03-21T16:02:37Z"
  }
}