User Properties

Batch Update User Properties

This API enables you to modify user properties of your users listed in your User Profiles in bulk:

  • Update User Properties - $set
  • Set Unset Properties - $once
  • Increment/Decrement Numeric Properties - $add
  • Append Values to List - $append
  • Remove Values From List - $remove
  • Unset User Properties - $unset

Please refer to function specific API documentation for $set, $once, $add, $append, $remove, $unset before using this API.

Note: The user properties in User Profiles can be used to filter your users for creating user cohorts and campaigns.

post/{WSID}/{version}/profiles/properties/batch

Path parameters

WSIDstring required

Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.

version'live' | 'test' required

Specify the version for which you would like to update the user property.

Request body

Example request

{
  "batch": [
    {
      "distinct_id": "XXXXX",
      "action": {
        "$set": {
          "property_1": "some text",
          "property_2": 123,
          "property_3": 45.67
        },
        "$once": {
          "property_4": true,
          "property_5": [
            "iPhone 16 Pro",
            "iPad 32 GB"
          ],
          "property_6": "2020-10-01T18:30:00.000Z"
        },
        "$add": {
          "property_7": 10.23,
          "property_8": -11.9,
          "property_9": 223
        },
        "$append": {
          "property_10": "#12345",
          "property_11": 2030,
          "property_12": "2022-11-11T10:30:00+02:00"
        },
        "$remove": {
          "property_13": "2023-11-10",
          "property_14": "ABC1234",
          "property_15": 4010
        },
        "$unset": [
          "property_0",
          "old_property1"
        ]
      }
    }
  ]
}

Response

Request has been accepted and will be processed asynchronously.

request_idstring required

Example response

{
  "request_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "batch": [
    {
      "$set": "ok",
      "$once": "ok",
      "$add": "ok",
      "$append": "ok",
      "$remove": "ok",
      "$unset": "ok"
    }
  ]
}

Changes

Changed in 3 of the 35 revisions of this API.159

    • request property batch/items/action/$once/additionalProperties/ list-of-types was widened by adding types array to media type application/json

      request-property-list-of-types-widened

    • request property batch/items/action/$set/additionalProperties/ list-of-types was widened by adding types array to media type application/json

      request-property-list-of-types-widened

    • added subschema #3 to the batch/items/action/$append/additionalProperties/ request property oneOf list

      request-property-one-of-added

    • added subschema #3 to the batch/items/action/$remove/additionalProperties/ request property oneOf list

      request-property-one-of-added

    • the response property _message became required for the status 400

      response-property-became-required

    • the response property _message became required for the status 401

      response-property-became-required

    • the response property status became required for the status 400

      response-property-became-required

    • the response property status became required for the status 401

      response-property-became-required

    • removed the request property batch/items/action/$add/property_1

      request-property-removed

    • removed the request property batch/items/action/$add/property_2

      request-property-removed

    • removed the request property batch/items/action/$add/property_n

      request-property-removed

    • removed the request property batch/items/action/$append/property_1

      request-property-removed

    • removed the request property batch/items/action/$append/property_2

      request-property-removed

    • removed the request property batch/items/action/$append/property_n

      request-property-removed

    • removed the request property batch/items/action/$once/property_1

      request-property-removed

    • removed the request property batch/items/action/$once/property_2

      request-property-removed

    • removed the request property batch/items/action/$once/property_n

      request-property-removed

    • removed the request property batch/items/action/$remove/property_1

      request-property-removed

    • removed the request property batch/items/action/$remove/property_2

      request-property-removed

    • removed the request property batch/items/action/$remove/property_n

      request-property-removed

    • removed the request property batch/items/action/$set/property_1

      request-property-removed

    • removed the request property batch/items/action/$set/property_2

      request-property-removed

    • removed the request property batch/items/action/$set/property_n

      request-property-removed

    • endpoint added

      endpoint-added

    This revision also has 22 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog