# Update my settings

`PATCH /api/me`

URL: https://repsona.com/api/patch-me

Partially updates profile, locale, and notification settings of the current user.

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | body | string |  | Username (@name), 3 to 15 characters of letters, digits, `.`, `_` and `-`. Must be unique in the space. |
| `fullName` | body | string |  | Display name, up to 255 characters. |
| `whatAreYouDoing` | body | string |  | Short status message shown on your profile ("What are you doing?"), up to 10,000 characters. |
| `languageId` | body | integer |  | ID of the display language. |
| `timeZoneId` | body | integer |  | ID of the time zone. |
| `emailNotification` | body | all \| mentions \| none |  | Which notifications are sent by email: `all`, only `mentions`, or `none`. |
| `notificationSettings` | body | object |  | Notification settings. Only the keys you send are changed. |
| `wantsUpdateInformation` | body | boolean |  | Receive product update news by email. |
| `wantsReminderEmail` | body | boolean |  | Receive reminders by email. |
| `extra` | body | object |  | Display preferences. Only the keys you send are changed. |
| `timeZoneCode` | body | string |  | IANA time zone name, such as `Asia/Tokyo`. Sets the time zone like `timeZoneId`, but by name. |

## Request

```sh
curl -X PATCH "https://<space>.repsona.com/api/me" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fullName": "Reon Walls",
    "whatAreYouDoing": "Preparing the beta release",
    "emailNotification": "mentions",
    "extra": {
      "dateFormat": "M/D",
      "firstDay": 1
    }
  }'
```

## Responses

- 200: Updated settings
- 400: Invalid request payload or name conflict
- 401: Authentication is required

## Example response

```json
{
  "id": 1126,
  "name": "reon",
  "fullName": "Reon Walls",
  "whatAreYouDoing": "Preparing the beta release",
  "avatarUrl": null,
  "backgroundUrl": null,
  "email": "reon.walls@example.com",
  "emailVerified": true,
  "changeRequestedEmail": null,
  "languageId": 1,
  "timeZoneId": 100,
  "emailNotification": "mentions",
  "notificationSettings": {
    "withoutUpdatesByMyself": true,
    "notifyTo": {
      "email": true,
      "browserPush": true,
      "mobilePush": true
    },
    "reminder": {
      "hurries": true,
      "starts": true,
      "ballHoldings": true,
      "responsibles": true
    }
  },
  "wantsUpdateInformation": true,
  "wantsReminderEmail": false,
  "twoFactorEnabled": false,
  "pushTokens": {
    "web": false,
    "mobile": false
  },
  "extra": {
    "dateFormat": "M/D",
    "firstDay": 1,
    "color": null,
    "autoTimeZone": true
  }
}
```
