---
updatedAt: 2026-05-27T00:39:46.000Z
agentTools:
  projectIndex: https://docs.trybadge.com/llms.txt
---

# Update user attributes

Update information about the specified user in `userSelector`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Badge API",
    "version": "0"
  },
  "servers": [
    {
      "url": "https://api.trybadge.com/v0"
    }
  ],
  "security": [
    {
      "WorkspaceAuth": []
    }
  ],
  "tags": [
    {
      "name": "User"
    }
  ],
  "paths": {
    "/rpc/userUpdateAttributes": {
      "post": {
        "operationId": "userUpdateAttributes",
        "tags": [
          "User"
        ],
        "summary": "Update user attributes",
        "description": "Update information about the specified user in `userSelector`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userSelector"
                ],
                "properties": {
                  "userSelector": {
                    "$ref": "#/components/schemas/UserSelector"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The user's display name."
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number"
                      ]
                    }
                  },
                  "primaryLocation": {
                    "$ref": "#/components/schemas/Coordinate",
                    "description": "Used for selection of most relevant location messages."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "user"
                  ],
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400ErrorMessage"
          },
          "404": {
            "$ref": "#/components/responses/404NotFound"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "WorkspaceAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Coordinate": {
        "type": "object",
        "required": [
          "latitude",
          "longitude"
        ],
        "properties": {
          "latitude": {
            "type": "number",
            "format": "float",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude coordinate in decimal degrees"
          },
          "longitude": {
            "type": "number",
            "format": "float",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude coordinate in decimal degrees"
          }
        }
      },
      "UserSelector": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              }
            }
          }
        ]
      }
    },
    "responses": {
      "404NotFound": {
        "description": "The specified resource was not found."
      },
      "400ErrorMessage": {
        "description": "Invalid input was received.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
```