---
title: "Sets values to a custom user properties by uid"
method: POST
path: "/v1/users/set-custom-user-properties-by-uid"
tags: ["users"]
---

# Sets values to a custom user properties by uid

`POST /v1/users/set-custom-user-properties-by-uid`

## Request

- Base URL: `https://api.memberspot.de` (the document declares no server; this is the origin it was published from)
- URL: `https://api.memberspot.de/v1/users/set-custom-user-properties-by-uid`
- Auth: API key in header `X-API-KEY`

## Request body

- SetCustomPropertyByUidDto
  - `uid` string, required: User Uid
  - `properties` UserCustomPropertyValueDto[], required: User custom properties
    - `id` string, required: Id of the custom property
    - `value` string, required: The value of the custom property

## Response `201`

Returns updated user with all custom properties. <br>
     If user does not exist, a bad request exception will be thrown. <br>
     If one or multiple properties does not exist, a bad request exception will be thrown. <br>
     If one or multiple properties does not contain valid values for properties, a bad request exception will be thrown.

- User
  - `uid` string, required: User identifier
  - `email` string, required: User email
  - `created` string, date-time, required: Date user was created
  - `firstname` string, required: Users firstname
  - `name` string, required: Users lastname
  - `progress` UserCourseProgress[]: Course progress of the user. Only populated when the request filters by courseId (then it contains that single course); an empty array otherwise.
    - `activePosts` number: Number of lessons that count towards the course progress of this user (published lessons in accessible chapters)
    - `completedPosts` number: Number of completed lessons of this user in the course
    - `grantedAt` string, date-time: Date the course was first granted to the user. Revoking and re-granting access keeps this date; check "active" for the current access state.
    - `startDate` string, date-time: Date from which course access and drip scheduling are anchored for the user. Derived from the offer launch date or set by an admin, so it can be before or after grantedAt.
    - `updatedAt` string, date-time: Date the course assignment was last written. It changes whenever progress, access state, chapter access or start date change, and can also move when the access of the user is re-evaluated without a visible change. An unchanged value therefore guarantees unchanged data; a newer value does not guarantee a difference. Omitted for assignments that have not been written since the field was introduced.
    - `courseId` string, required
    - `scormProgress` object
  - `active` boolean: Is user active
  - `customUserProperties` object: Custom user properties key value pairs

## Other responses

- `400`: Missing arguments (check your api key)
- `401`: Api key provided but invalid
- `429`: Too many requests - only 4 requests per second allowed

---

[API](https://skmtc.dev/memberspot/apis/memberspot-api.md) · [All operations](https://skmtc.dev/memberspot/apis/memberspot-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memberspot/apis/memberspot-api/revisions/48a9411d4339?raw)
