object-storage-2
Create static website configuration
Creates a new static website hosting configuration for a domain.
post/1.3/object-storage-2/{service-uuid}/static-websites
Request
- Base URL: https://api.upcloud.com
- URL: https://api.upcloud.com/1.3/object-storage-2/{service-uuid}/static-websites
- 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
Example request
{
"domain_name": "www.example.com",
"bucket_name": "my-website",
"bucket_prefix": "v2/",
"index_document": "index.html",
"enabled": true,
"error_pages": [
{
"status_code": 404,
"error_document": "errors/404.html"
},
{
"status_range": {
"start": 500,
"end": 599
},
"error_document": "errors/5xx.html"
}
]
}Response
Created
Example response
{
"domain_name": "abc123-static.upbucket.example.com",
"bucket_name": "my-website",
"bucket_prefix": "v2/",
"index_document": "index.html",
"spa_mode": true,
"error_pages": [
{
"status_code": 403,
"error_document": "errors/403.html"
},
{
"status_code": 404,
"error_document": "errors/404.html"
},
{
"status_range": {
"start": 400,
"end": 499
},
"error_document": "errors/4xx.html"
}
],
"enabled": true,
"created_at": "2025-10-28T10:00:00Z",
"updated_at": "2025-10-28T12:00:00Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.