Skip to navigation

Create regions in batches from the REST API

A new v1 endpoint creates many regions in one request.

POST /v1/regions/batch

Creates up to 1000 regions, each like Create Region. Each region is created on its own: the response has one result per region, in request order, and a region that fails does not stop the others.

[
{ "success": true, "data": { "object": "region", "id": "header", "version": 1, ... } },
{ "success": false, "error": { "code": "REGION_EXISTS", "message": "..." } }
]
  • Error codes: a failed region reports REGION_EXISTS, BASE_REGION_MISSING, INVALID_LOCALE, INVALID_ELEMENT_TREE, DUPLICATE_IN_BATCH, or INTERNAL_ERROR. Only INTERNAL_ERROR is worth retrying.
  • Default locale first: regions in the default locale are created before regions in site locales, so a region in a site locale may come before its default locale’s region in the same batch.

The region endpoints are in beta and may change. Requests return 403 until the feature is enabled for your site or workspace. To opt in, contact support: support@makeswift.com.

For details, see Create Regions.