Create Region

This feature is in Beta and may change. Requests return 403 until the feature flag is enabled for your site or workspace.

Creates a region in one locale. The element tree’s root component type becomes the region’s type. A region in a site locale requires the region to exist in the default locale first.

Authentication

x-api-keystring
API key authentication. Accepts either: - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ) - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)

Request

This endpoint expects an object.
siteIdstringRequiredformat: "uuid"
The site ID to create the region in.
idstringRequired>=1 character
The region ID, assigned by the host. Unique within a site and locale.
namestringRequired>=1 character
The region name.
elementsobjectRequired

The root of the region’s element tree. Its component type becomes the region’s type.

localestringOptional

The locale to create the region in. Accepts either a locale code (e.g. en-US) or a site_locale UUID. Defaults to the site’s default locale.

Response

objectenum
Allowed values:
idstring
The region ID. Assigned by the host, not generated by Makeswift.
namestring
The region name.
typestring
The component type at the root of the region's element tree.
localestring
The locale of this region.
updatedAtdatetime
The region last update date and time.
elementsany

Always null here. Get Region returns the region’s element tree with include=elements.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error