Skip to content
Suomi

Change the organisation's settings

PATCH
/v1/organisation
Code sample: Shell / cURL
curl --request PATCH \
--url https://api.whatsbuilt.fi/v1/organisation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "default_language": "fi", "gs1_company_prefix": "example", "mcp_enabled": true, "public_api_enabled": true }'

The default language, the GS1 company prefix, and whether AI assistants and the REST API are on. Each field sent is set; the rest stay. Turning mcp_enabled off ends every AI assistant connection of the organisation; sending its current value changes nothing.

Media typeapplication/json

The body of updateOrganisation: at least one field.

object
default_language
One of:

An interface language as /v1 answers it.

string
Allowed values: fi en
gs1_company_prefix

7 to 12 digits; null clears it.

string | null
/^\d{7,12}$/
mcp_enabled
boolean
public_api_enabled

False turns the API off for the organisation, this integration included: the next call answers PUBLIC_API_DISABLED

boolean

The organisation

Media typeapplication/json

Organisation: the caller’s organisation and its settings.

object
id
required
string format: uuid
name
required
string
gs1_company_prefix
required
string | null
giai_mode
required
string
default_language
required
One of:

An interface language as /v1 answers it.

string
Allowed values: fi en
mcp_enabled
required
boolean
public_api_enabled
required
boolean
created_at
required
string

Example

{
"default_language": "fi"
}

VALIDATION_ERROR; GS1_PREFIX_INVALID

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INSUFFICIENT_SCOPE; INSUFFICIENT_ROLE when the principal is not an admin of its organisation; PUBLIC_API_DISABLED

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Not found in the organisation

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}