Skip to content

Update Data Region

PATCH/v1/settings/data-region

Overview

Requires a dashboard session with write access to the workspace. With mode only, every request from the workspace routes only to endpoints documented as processing in the region, and a request no such endpoint can serve is refused with 400 data_region_unavailable. With mode prefer, those endpoints are tried first. A request's provider.data_region can narrow the region but never widen it. Send region null to clear it.

Authorization

Authorizationstring · headerRequired

Workspace session token sent as Bearer <token>. Authentication guide

Request Body

application/json
workspace_idstringRequired
regionstring | nullRequired

us, eu or a documented country code; null clears it.

modestring

Values: "only""prefer"

Default: "only"

Responses

200The saved data region.
application/json
regionstring | nullRequired

The workspace's region, or null for any region.

modestringRequired

only routes every request to endpoints documented in the region; prefer tries them first.

Values: "only""prefer"

regionsstring[]Required

The regions that can be required.

Show nested fields

string

400Request validation failed.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

401Authentication is missing or invalid.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

403Authenticated principal lacks permission.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.