API ReferenceEndpointsPublic API (v1)Create a region

Create a region

Supports Idempotency-Key header for safe retries.

POST
/v1/regions
AuthorizationBearer <token>

Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.

In: header

Header Parameters

Idempotency-Key?string

Client-supplied key (a UUID v4 is the recommended form, max 255 characters) that makes this mutation safe to retry.

  • Replay window: 24 hours. The first response for a key is cached; a retry inside the window with the same request body returns the original status and body without re-running the handler.
  • Reusing a key with a different body returns 409 Conflict with code: "IDEMPOTENCY_KEY_REUSED". The request fingerprint (method + path + body hash) is compared against the stored one; a mismatch is refused rather than served the old response.
  • Keys are scoped to the calling credential and store — two API keys may safely use the same key value.
  • Error responses are cached too, so a retry of a request that failed validation returns the same 400 immediately.
  • Sending this header on a GET returns 400 with code: "IDEMPOTENCY_KEY_NOT_SUPPORTED" — GETs are already idempotent.
  • Support is per-route and this parameter is the authoritative signal: a key sent to a route that does not declare it is accepted and silently ignored.

See /docs/api/idempotency.

Lengthlength <= 255
namestring

Region display name. 1 to 100 characters.

Length1 <= length <= 100
currencystring

ISO 4217 currency code that prices in this region are shown and charged in.

countriesarray<string>

ISO 3166-1 alpha-2 country codes the region covers, case-insensitive (stored upper-case). A country can belong to only one region of the store.

taxInclusive?boolean | null

Tax-inclusive override for buyers in this region. null (or omitted on create) = same as the store setting pricesIncludeTax; true/false = explicit override. On update, omit to keep the current value, send null to clear the override.

automaticTaxes?boolean

Accepted for backward compatibility. Stored, but nothing reads it: it does not change tax calculation. Defaults to true.

Defaulttrue
isDefault?boolean

Make this the default region, used for buyers whose country is in no region. The previous default is unset. Defaults to false.

Defaultfalse
paymentProviderIds?array<string>

Installed payment provider IDs (app installation IDs) to enable for this region. Each must be an installed payment app of the store that is available in the region countries.

curl -X POST "https://api.brainerce.com/api/v1/regions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "name": "Europe",    "currency": "EUR",    "countries": [      "DE",      "FR",      "IT"    ]  }'
{
  "id": "clx1a2b3c4d5e6f7g8h9",
  "accountId": "clx1a2b3c4d5e6f7g8h9",
  "storeId": "clx1a2b3c4d5e6f7g8h9",
  "name": "Israel",
  "slug": "israel",
  "currency": "USD",
  "fxBufferPercent": "2.00",
  "countries": [
    "string"
  ],
  "provinces": {},
  "taxInclusive": true,
  "effectiveTaxInclusive": true,
  "automaticTaxes": true,
  "isDefault": true,
  "isActive": true,
  "metadata": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "paymentProviders": [
    {
      "id": "clx1a2b3c4d5e6f7g8h9",
      "regionId": "clx1a2b3c4d5e6f7g8h9",
      "appInstallationId": "clx1a2b3c4d5e6f7g8h9",
      "isEnabled": true,
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ]
}

{
  "statusCode": 400,
  "code": "VALIDATION_FAILED",
  "message": "name should not be empty, price must be a positive number",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/regions"
}

{
  "statusCode": 401,
  "code": "UNAUTHORIZED",
  "message": "Invalid or expired credential",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/products/bulk/{jobId}"
}

{
  "statusCode": 403,
  "code": "INSUFFICIENT_SCOPE",
  "message": "API key does not have the required scope: products:write",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/regions"
}

{
  "statusCode": 409,
  "code": "CONFLICT",
  "message": "The request conflicts with the current state of the resource",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/regions"
}

{
  "statusCode": 429,
  "code": "RATE_LIMITED",
  "message": "Too many requests",
  "details": {
    "retryAfterSeconds": 12
  },
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/store"
}