v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
User Properties

Set (upsert) properties for a user

Upserts one or more properties for the specified user (1-100 items per call). Each property is identified by a key; existing values are overwritten. Supports partial success: as long as at least one property passes validation, the response is 200 with successfully saved properties under saved_properties and per-key failures under property_errors.

Effective validation (applied per-item):

  • key — 1-80 characters, matching ^[-a-zA-Z0-9_.:]+$ and containing at least one letter. Keys starting with _ are reserved for Qonversion system properties; only pre-registered keys prefixed with _q_ (e.g. _q_email, _q_name) are accepted.
  • value — up to 120 bytes, must not contain \n, \r, ", or '.

400 behaviour — returned without a per-key breakdown when:

  • the request itself is malformed (empty array, more than 100 items, or key/value exceeding the gateway's 256/1024-character limits), or
  • every property in the request fails validation (there is nothing to save). In that case retry with the offending keys removed to see per-key reasons in the 200 response.
post/users/{user_id}/properties

Path parameters

user_idstring required

Qonversion User ID. SDK-generated IDs are prefixed with QON_.

Headers

Idempotency-Keystring

Idempotency key for safe retries. Same key returns the original response.

Request body

Example request

{
  "properties": [
    {
      "key": "color",
      "value": "blue"
    }
  ]
}

Response

Properties processed (check property_errors for per-key failures).

object'user_properties_set_result' required
urlstring required

Example response

{
  "url": "/v4/users/QON_3af4c5b8a4d24f21b72e9d0c8aef9d4e/properties",
  "saved_properties": [
    {
      "key": "color",
      "value": "blue"
    }
  ],
  "property_errors": [
    {
      "key": "bad_key",
      "error": "invalid key"
    }
  ]
}