For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create User Attribute Value

Set a user attribute value directly on a user.

A value set here takes precedence over any value the user inherits from a group.

Returns 404 if user_attribute_definition_id doesn't reference an existing definition in the workspace.

Returns 409 if the user already has a value set for that definition - patch the existing value instead.

Returns 400 if value doesn't match the definition's data_type format: YYYY-MM-DD for date, a numeric string for number.

post
/workspaces/{workspace_id}/members/{user_id}/user_attributes
Authorizations
AuthorizationstringRequired

A Personal Access Token (PAT).

Path parameters
workspace_idstringRequired
user_idstringRequired
Body
user_attribute_definition_idstringRequired

ID of an existing definition in this workspace - see GET .../user_attribute_definitions.

valuestringRequired

Must match the referenced definition's data_type format: "string" allows free text, "number" requires a parseable number, "date" requires YYYY-MM-DD.

Responses
201

Successful Response

application/json
post/workspaces/{workspace_id}/members/{user_id}/user_attributes
curl -L -X POST https://api-external.zenlytic.com/api/v2/workspaces/<workspace_id>/members/<user_id>/user_attributes \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"user_attribute_definition_id": "uad_123", "value": "west"}'
{
  "data": {
    "id": "ua_789",
    "user_attribute_definition_id": "uad_123",
    "value": "west",
    "data_type": "string",
    "name": "region",
    "source": "user",
    "source_id": "usr_111",
    "is_overridden": false
  },
  "meta": {
    "status": "success",
    "errors": [],
    "warnings": []
  }
}

Last updated

Was this helpful?