pydo.cdn.create_endpoint()
Generated on 3 Aug 2026
from pydo version
v0.40.0
Usage
client.cdn.create_endpoint(
body={
"origin": "static-images.nyc3.digitaloceanspaces.com",
"ttl": 3600,
"certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf",
...,
},
)Description
To create a new CDN endpoint, send a POST request to /v2/cdn/endpoints. The
origin attribute must be set to the fully qualified domain name (FQDN) of a
DigitalOcean Space. Optionally, the TTL may be configured by setting the ttl
attribute.
A custom subdomain may be configured by specifying the custom_domain and
certificate_id attributes.
Parameters
idstring optional read-onlyExample:
892071a0-bb95-49bc-8021-3afd67a210bfA unique ID that can be used to identify and reference a CDN endpoint.
originstring requiredExample:
static-images.nyc3.digitaloceanspaces.comThe fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space.
endpointstring optional read-onlyExample:
static-images.nyc3.cdn.digitaloceanspaces.comThe fully qualified domain name (FQDN) from which the CDN-backed content is served.
ttlinteger optionalThe 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 optionalExample:
892071a0-bb95-49bc-8021-3afd67a210bfThe ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.
custom_domainstring optionalExample:
static.example.comThe fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint.
created_atstring optional read-onlyExample:
2018-03-21T16:02:37ZA time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created.
Request Sample
Response Example
More Information
See /v2/cdn/endpoints in the API reference for additional detail on responses, headers, parameters, and more.