Create or update a company

Changed on

Synchronously create or update a company in an environment. Requires the write:entities API key scope or admin member access. This scope also grants deletion through the corresponding entity DELETE endpoints, but does not grant membership changes or flag targeting; grant write:flag:targeting separately to assign flags and read for GET requests. Attributes accept JSON values and are normalized and merged using the same rules as ingestion. Recognized name and avatar attributes also update the corresponding company fields; top-level name takes precedence over name attributes. Omitting a field preserves its existing value. New companies may omit all fields. When this request succeeds, a subsequent company targeting request can read the company. Flag configuration propagation to SDKs is independent. Delayed ingestion writes may later replace overlapping values because the last database writer wins.

put/apps/{appId}/envs/{envId}/companies/{companyId}

Request

  • Base URL
    https://app.reflag.com/api
  • Auth
    HTTP bearer

Path parameters

appIdstring required

App identifier

envIdstring required

Environment identifier

companyIdstring required

Company ID within your application

Request body

namestring

Company name. Omit it to preserve an existing name; new companies may be unnamed.

attributesEntityAttributesInput nullable

Entity attributes. Values are normalized exactly like ingestion before being merged with existing attributes.

Response

Company created or updated successfully

namestring

Company name. Omit it to preserve an existing name; new companies may be unnamed.

attributesEntityAttributesInputOutput nullable

Entity attributes. Values are normalized exactly like ingestion before being merged with existing attributes.

idstring required

Company ID within your application

Changes