Skip to navigation

Update an organization

Updates the caller’s own organization. Send at least one field: a body with no recognised field is rejected with 400 (validation_failed). metadata, when sent, replaces the stored metadata object (it is not merged). slug cannot be changed: sending it, or any other field not listed here, is 400 (validation_failed) naming the field.

400 is also returned for a body that fails validation (validation_failed) or a non-UUID organizationId (invalid_identifier). Any organization other than the caller’s returns 404.

collectionMode (“Who collects documents”) and accountManagerUserId can be changed only by TradeGuard staff signed in to the web app. Any other caller, including every API key, gets 403 (forbidden); contact TradeGuard support to change them. Both are always readable.

Requires scope organizations:write.

Authentication

AuthorizationBearer

Session JWT or API key (ak_...)

Path parameters

organizationIdstringRequiredformat: "uuid"

Request

This endpoint expects an object.
namestringOptional1-255 characters
metadatamap from strings to anyOptional

Replaces the stored metadata object. The reserved keys sandbox and reportAdapterMode are operator-only: they are silently ignored in the request and their stored values are kept.

defaultVerificationChannelPolicyenumOptional

Which channel opens the producer verification. call_first (default): the AI call opens, the carrier email follows only if the call cannot work. email_first: the carrier email opens; calls begin once the escalation threshold is met (emails sent AND business days elapsed). email_only: never call; exhausted email raises compliance.producer_outreach_needed and opens an issue. Set per profile (verificationChannelPolicy on the profile, or in the dashboard); null on a profile inherits the organization default.

Allowed values:
defaultEmailEscalationAttemptsintegerOptional1-10
defaultEmailEscalationBusinessDaysintegerOptional0-60
collectionModeenumOptionalDefaults to tradeguard

Who collects documents from this organization’s subcontractors. tradeguard (the default): TradeGuard invites subcontractors, asks them for missing or corrected documents and follows up until each issue is fixed. customer: you collect documents yourself and TradeGuard never contacts your subcontractors; use the issues list and issue.* webhooks to see what each subcontractor needs. Document checks, monitoring and broker verification run the same either way. Only TradeGuard staff can change it.

Allowed values:
accountManagerUserIdstring or nullOptional1-255 characters

Clerk user id of a TradeGuard staff member, or null to clear. TradeGuard staff only.

Response

The updated organization
dataobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error