# Update user

`PATCH /user`

Updates the authorized user

**Required Scopes:** `USER_INFO`

## Body Parameters

```typescript
interface BodyParameters {
  /** The name of the user */
  name?: string;
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The ID of the user */
  id?: number;
  /** The name of the user */
  name?: string;
  /** The avatar URL of the user */
  avatar_url?: string;
  /** The email address of the user */
  email?: string;
  /** The workspaces URL of the user */
  workspaces_url?: string;
}
```

## Request Example

```bash
curl -X PATCH "https://api.buddy.works/user" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "John Doe"
}'
```

## Response Example

**Status:** `200 OK`

```json
{
  "url": "https://api.buddy.works/user",
  "html_url": "https://app.buddy.works/my-id",
  "id": 123,
  "name": "john.doe",
  "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/123/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/w/32/32/AVATAR.png?ts=1724320218123",
  "workspaces_url": "https://api.buddy.works/workspaces",
  "email": "john.doe@company.com"
}
```

---
Original source: https://buddy.works/docs/api/platform/account/update