Skip to content

Set the organization's own Companies House API key (OWNER only)

PUT
/organizations/current/companies-house-key
curl --request PUT \
--url https://api.invogi.com/v1/organizations/current/companies-house-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api_key": "example" }'

Enables the UK register check for supplier company numbers using the organization’s own free Companies House REST API key. The key is verified against Companies House, stored encrypted, and never returned. There is no deployment-wide key: without one the check is off for the organization.

Media typeapplication/json
object
api_key
required
string
>= 8 characters <= 200 characters

Example generated

{
"api_key": "example"
}

Key verified and stored

Media typeapplication/json
object
companiesHouseKeyConfigured
required
boolean

Example generated

{
"companiesHouseKeyConfigured": true
}

Companies House rejected the key

API key lacks required scope/role

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}