object-storage-2

Attach custom domain

Attaches a new custom domain to the service identified by {service_uuid}.

post/1.3/object-storage-2/{service-uuid}/custom-domains

Request

  • Base URL: https://api.upcloud.com
  • URL: https://api.upcloud.com/1.3/object-storage-2/{service-uuid}/custom-domains
  • Auth: HTTP bearer

Path parameters

service-uuidstring uuid required

The unique identifier for the service.

Example:01234567-89ab-cdef-0123-456789abcdef

Service UUID

Request body

type'public' | 'private' required

Type of the custom domain. At the moment only public is accepted.

mode'api' | 'static-website'

Purpose of the domain. 'api' for S3 API access (creates base URL), 'static-website' for static website hosting (no base URL). Cannot be changed after creation.

domain_namestring hostname required

Custom domain to be added. Supports both apex domains (example.com) and subdomains (objects.example.com).

Example request

{
  "type": "public",
  "domain_name": "example.com"
}

Response

Created

domain_namestring

Custom domain name. Supports both apex domains and subdomains.

typestring

Endpoint type for the custom domain.

mode'api' | 'static-website'

Purpose of the domain. 'api' for S3 API access, 'static-website' for static website hosting.

Example response

{
  "domain_name": "example.com",
  "type": "public",
  "mode": "api"
}

Changes

No recorded changes to this operation across all 1 revision of this API.