Skip to main content

Update company custom fields in bulk

Set custom field values for selected companies.

POST/api/companies/bulk_custom_fields
HTTP referenceScope companies:write (organization admin)Updated September 27, 2026

This page documents the canonical HTTP contract for this endpoint.

Requires an authenticated user with user-admin permission plus the companies:write developer-key scope. Replace the sample territory key with an active Company custom-field definition in your organization. Provide at least one value and either company_ids or a selection. Blank values clear fields. The queued response is an admission receipt, not proof the update finished.

Body parameters

  • values · optional

    object

    Non-empty custom field name to value map. May be supplied as values or custom_field_values, but not with conflicting contents.

  • custom_field_values · optional

    object

    Alias for values; conflicting non-empty values are rejected.

  • company_ids · optional

    array<string>

    Non-empty explicit company IDs when selection is omitted.

  • selection · optional

    object

    CompanyBulkSelectionModel: mode=ids requires a non-empty ids list; mode=descriptor takes a FilterDescriptor in descriptor. Other supported selector fields include search, sort, limit, source_table_id, source_table_scope, scope, and owner_id. Do not use filter/filters aliases inside selection.

  • provenance · optional

    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; source_evidence requires a source. Each source has kind, nonblank reference (max 2,000 chars), and optional excerpt (max 2,000 chars). Provenance keys must accompany values and cannot accompany cleared values.

Errors

StatusMeaning
400Invalid selection, empty/invalid values, or provenance mismatch.
401Authentication required or organization/user context missing.
403Missing companies:write scope or user-admin permission.
404No companies found for the selection.
503Company selection query timed out or required search is unavailable.

Docs