---
updatedAt: 2025-06-11T23:23:15.000Z
agentTools:
  projectIndex: https://developers.workramp.com/llms.txt
---

# Set Custom Attributes for a User

Adds or updates custom attributes for a user

## Setting attribute values

* Pass a raw JSON body of `{ "attributes": { "API_Name": (new value) } }`
* You can set as many different attributes as you want at one time.

## Sending Date values

When updating a `Date` type custom attribute, for this endpoint, please be aware of these formatting rules:

### Standard Formats

#### *Recommended:* Use ISO8601 date format as a string: `"2024-12-31"`

* ```json
  {
    "attributes": {
    	dateOfBirth: "2024-12-31"
    }
  }
  ```
* You can also use the above with slashes instead of the standard `-` : `"2024/12/31"`

#### Integer format (Deprecated):

* EPOCH in miliseconds: e.g.`1735678800000` passed as an **integer** in the JSON
* Please note that this is not an ideal way to send a Date, because an Epoch represents a specific single moment in time, and when the application converts that to a calendar date, that could be one of two dates depending on which time zone we are interpreting the timestamp in. Many times in the day correspond to say, a Saturday in London, and a Friday in California. Our servers are in the UTC time zone (roughly corresponding to London time in the winter), so if you send this format, the date saved will reflect what calendar date it was **in UTC** when that moment took place.

### Custom Formats (requires configuration by Support)

If you have a need for one of the below custom input formats, have the support team set one of these custom import formats for the field(s) where you need it.

* Available Formats:
  * MM/DD/YYYY -- e.g. `"12/31/2024"`
  * DD/MM/YYYY -- e.g. `"31/12/2024"`
* Once we have customized the import format for a field for you, you will need to always use the agreed-upon format for that field, unless you pass another key `"skip_formatting": "true"` at the top level of the object. If you pass this key, this reverts the processing to expect one of the **Standard Formats** (that is, `"2024-12-31"`or the integer format)

Example:

```json
{
  "skip_formatting": "true",
  "attributes": {
  	dateOfBirth: "2024-12-31"
  }
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "json-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://app.workramp.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "ACCESS_TOKEN"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v1/attributes/user/{UserID}": {
      "post": {
        "summary": "Set Custom Attributes for a User",
        "description": "Adds or updates custom attributes for a user",
        "operationId": "add-custom-user-attributes",
        "parameters": [
          {
            "name": "UserID",
            "in": "path",
            "description": "ID to set attributes for",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "attributes": {
                    "type": "string",
                    "description": "Key `attributes` is required and is a dictionary of your attribute 'api names' → value",
                    "default": "{}",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "true"
                  }
                },
                "schema": {
                  "type": "boolean",
                  "example": true,
                  "default": true
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Bad Date Format": {
                    "value": "{\"type\":\"bad_request\",\"message\":\"Date format not accepted, please try a different format.\"}"
                  },
                  "User not found": {
                    "value": "\"user with id 12345 not found\""
                  },
                  "Nonexistent Attribute": {
                    "value": "{ \"errors\": \"'example' is not a custom attribute on 'user' of id '12345'\""
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Bad Date Format",
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "bad_request"
                        },
                        "message": {
                          "type": "string",
                          "example": "Date format not accepted, please try a different format."
                        }
                      }
                    },
                    {
                      "title": "User not found",
                      "type": "string",
                      "example": "user with id 12345 not found"
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```