This page documents the canonical HTTP contract for this endpoint.
Replace territory with an active custom-field key defined for your organization. Each value is validated against that field's declared type/options. Blank values clear the field. Provenance records a declared qualification basis, not independent verification; its keys must accompany values in the same write.
The response example is abridged; the handler returns the serialized Company, including detail sections.
Path parameters
company_idrequiredstring
Company ID.
| Name | Type | Description |
|---|---|---|
| company_idrequired | string | Company ID. |
Body parameters
valuesrequiredobject
Non-empty custom field name to value map. Values are checked against active organization company-field definitions; blank/null values clear fields.
provenance· optionalobject
Optional map keyed by a field in values. Each value has basis (source_evidence, model_inference, user_assumption, or unknown), nonblank rationale (max 2,000 chars), and up to 20 sources. Each source has kind (url, crm_record, user_statement, tool_result, or model_run), nonblank reference (max 2,000 chars), and optional excerpt (max 2,000 chars). source_evidence requires at least one source; cleared values cannot carry provenance.
| Name | Type | Description |
|---|---|---|
| valuesrequired | object | Non-empty custom field name to value map. Values are checked against active organization company-field definitions; blank/null values clear fields. |
| provenance | object | Optional map keyed by a field in values. Each value has basis (source_evidence, model_inference, user_assumption, or unknown), nonblank rationale (max 2,000 chars), and up to 20 sources. Each source has kind (url, crm_record, user_statement, tool_result, or model_run), nonblank reference (max 2,000 chars), and optional excerpt (max 2,000 chars). source_evidence requires at least one source; cleared values cannot carry provenance. |
Errors
| Status | Meaning |
|---|---|
| 400 | Organization ID missing, invalid company ID, empty values, unknown field key, invalid value/type/option, or provenance that does not match a value. |
| 401 | Invalid or missing authentication. |
| 403 | Missing companies:write scope. |
| 404 | Company not found. |
| 422 | Request body does not satisfy the values/provenance model. |
