---
search:
  tags:
    - Data fields
    - PATCH
seo:
  description: >-
    Upserts custom data field values for a user. value: null or an empty string…
    Reference for the PATCH /users/{id}/data-fields endpoint in the Fuxam API
    v4.
sidebar:
  label: Upsert user data field values
  badge: PATCH
title: Upsert user data field values
type: openapi-operation
---
Upserts custom data field values for a user. `value: null` or an empty string clears that field. Unknown `fieldName` values return 422. Scoped to your integration's institution via Basic Auth credentials.

`PATCH /users/{id}/data-fields`

**Request body** (`application/json`, required)

- `dataFields` (UserDataFieldEntry[], required)

Request body example:

```json
{
  "dataFields": [
    {
      "fieldName": "studentId",
      "value": "S-12345"
    }
  ]
}
```

**Responses**

- `200` — Data fields updated
- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `422` — Unprocessable Entity — validation or business rule error
- `429` — Too Many Requests — 1000 requests per minute per institution. Includes \`X-RateLimit-Limit\`, \`X-RateLimit-Remaining\`, \`X-RateLimit-Reset\` (ISO-8601), and \`Retry-After\` (seconds).
- `500` — Internal Server Error

Response example, 200:

```json
{
  "data": {
    "userId": "string",
    "updated": 0
  },
  "meta": {
    "requestId": "req_1234567890_abc",
    "timestamp": "2026-06-02T07:00:00.000Z",
    "version": "v4",
    "watermark": "2019-08-24T14:15:22Z"
  }
}
```
