dots.v2.cdn.endpoints.post()
Generated on 5 Nov 2026
from DoTs version
v1.23.0
Usage
client.v2.cdn.endpoints.post(body: Cdn_endpoint, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | EndpointsPostResponse>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.
certificateIdstring optionalExample:
892071a0-bb95-49bc-8021-3afd67a210bfThe ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.
customDomainstring optionalExample:
static.example.comThe fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint.
createdAtstring 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.