---
title: "Update my account"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Update my account

Path: Nicer API › identity

`PUT /identity/user`

URL: `https://api.nicer.travel/identity/user`

Changes the signed-in person's own account: givenName, familyName, email, biography, calendarUrl, instagram, location, zoneinfo and tourProgress; companyName, only as the agency the request acts for; and their bookingAccessEnabled and onboardingCompleted settings at that agency, which need it to be named (403 ERROR_DO_NOT_HAVE_PERMISSION otherwise). A new email is also the one they sign in with, in every agency. Any other field, or a value of the wrong type, is refused with 400 ERROR_BODY_VALIDATION. Answers the account as it now stands. Any signed-in person, for their own account only.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Request body

_Required._

- `biography` (`identity.user.update.biography`; string, optional)
- `calendarUrl` (`identity.user.update.calendarUrl`; string, optional)
  - format: `uri`
- `companyName` (`identity.user.update.companyName`; string, optional)
  - minLength: `1`
- `email` (`identity.user.update.email`; string, optional)
  - format: `email` · pattern: `^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$`
- `bookingAccessEnabled` (`identity.user.update.bookingAccessEnabled`; boolean, optional)
- `familyName` (`identity.user.update.familyName`; string, optional)
- `givenName` (`identity.user.update.givenName`; string, optional)
- `instagram` (`identity.user.update.instagram`; string, optional)
- `location` (`identity.user.update.location`; object, optional)
  - `city` (`identity.user.update.location.city`; string, optional)
  - `country` (`identity.user.update.location.country`; string, optional)
  - `countryCode` (`identity.user.update.location.countryCode`; string, optional)
  - `state` (`identity.user.update.location.state`; string, optional)
- `onboardingCompleted` (`identity.user.update.onboardingCompleted`; boolean, optional)
- `tourProgress` (`identity.user.update.tourProgress`; map of object, optional)
- `zoneinfo` (`identity.user.update.zoneinfo`; string, optional)

## Example request

```json
{
  "biography": "string",
  "calendarUrl": "http://example.com",
  "companyName": "string",
  "email": "user@example.com",
  "bookingAccessEnabled": true,
  "familyName": "string",
  "givenName": "string",
  "instagram": "string",
  "location": {
    "city": "string",
    "country": "string",
    "countryCode": "string",
    "state": "string"
  },
  "onboardingCompleted": true,
  "tourProgress": {
    "property1": {
      "completedAt": "string",
      "status": "completed"
    },
    "property2": {
      "completedAt": "string",
      "status": "completed"
    }
  },
  "zoneinfo": "string"
}
```

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.identity.user.update({});
```

### Nicer CLI

```bash
nicer identity user update --input - <<'JSON'
{}
JSON
```

### cURL

```bash
curl --request PUT \
  --url https://api.nicer.travel/identity/user \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "biography": "string",
  "calendarUrl": "http://example.com",
  "companyName": "string",
  "email": "user@example.com",
  "bookingAccessEnabled": true,
  "familyName": "string",
  "givenName": "string",
  "instagram": "string",
  "location": {
    "city": "string",
    "country": "string",
    "countryCode": "string",
    "state": "string"
  },
  "onboardingCompleted": true,
  "tourProgress": {
    "property1": {
      "completedAt": "string",
      "status": "completed"
    },
    "property2": {
      "completedAt": "string",
      "status": "completed"
    }
  },
  "zoneinfo": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/identity/user';
const options = {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    biography: 'string',
    calendarUrl: 'http://example.com',
    companyName: 'string',
    email: 'user@example.com',
    bookingAccessEnabled: true,
    familyName: 'string',
    givenName: 'string',
    instagram: 'string',
    location: {city: 'string', country: 'string', countryCode: 'string', state: 'string'},
    onboardingCompleted: true,
    tourProgress: {
      property1: {completedAt: 'string', status: 'completed'},
      property2: {completedAt: 'string', status: 'completed'}
    },
    zoneinfo: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/identity/user"

payload = {
    "biography": "string",
    "calendarUrl": "http://example.com",
    "companyName": "string",
    "email": "user@example.com",
    "bookingAccessEnabled": True,
    "familyName": "string",
    "givenName": "string",
    "instagram": "string",
    "location": {
        "city": "string",
        "country": "string",
        "countryCode": "string",
        "state": "string"
    },
    "onboardingCompleted": True,
    "tourProgress": {
        "property1": {
            "completedAt": "string",
            "status": "completed"
        },
        "property2": {
            "completedAt": "string",
            "status": "completed"
        }
    },
    "zoneinfo": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "avatar": "string",
  "biography": "string",
  "calendarUrl": "string",
  "companyName": "string",
  "deleted": true,
  "deletedAt": "string",
  "deletedBy": "string",
  "email": "string",
  "externalIntercomId": "string",
  "familyName": "string",
  "fullName": "string",
  "givenName": "string",
  "instagram": "string",
  "invitedAt": "string",
  "invitedBy": "string",
  "lastModifiedBy": "string",
  "location": {
    "address": "string",
    "city": "string",
    "country": "string",
    "countryCode": "string",
    "latitude": 0,
    "longitude": 0,
    "neighborhood": "string",
    "region": "string",
    "state": "string",
    "zipCode": "string"
  },
  "phoneNumber": "string",
  "registrationSource": "string",
  "role": "advisor",
  "searchKey": "string",
  "tenantOwner": true,
  "tourProgress": {
    "property1": {
      "completedAt": "string",
      "status": "completed"
    },
    "property2": {
      "completedAt": "string",
      "status": "completed"
    }
  },
  "username": "string",
  "zoneinfo": "string",
  "tenantId": "string",
  "userId": "string",
  "createdAt": "string",
  "type": "User",
  "updatedAt": "string"
}
```

- `familyName` (`identity.user.update.response.200.familyName`; string, required) — The person's last name.
- `fullName` (`identity.user.update.response.200.fullName`; any of, required) — givenName and familyName joined; null until the person has both.
  - any of the following: `string`, `null`
- `givenName` (`identity.user.update.response.200.givenName`; string, required) — The person's first name.
- `role` (`identity.user.update.response.200.role`; string, required) — The person's role in the agency they last switched into.
  - one of `"advisor"`, `"traveler"`, `"admin"`, `"superadmin"`
- `tenantId` (`identity.user.update.response.200.tenantId`; string, required) — The partition the account is stored in: the userId for every account opened today.
- `userId` (`identity.user.update.response.200.userId`; string, required) — The person's id, their sign-in subject.
- `createdAt` (`identity.user.update.response.200.createdAt`; string, required) — When the account was opened.
- `type` (`identity.user.update.response.200.type`; string, required)
- `updatedAt` (`identity.user.update.response.200.updatedAt`; string, required) — When the account last changed.
- `avatar` (`identity.user.update.response.200.avatar`; string, optional) — The person's photo: a URL, or the file's storage key in the answers of DELETE /identity/user/{userId} and of an admin's GET /identity/users.
- `biography` (`identity.user.update.response.200.biography`; any of, optional) — What the person writes about themself.
  - any of the following: `string`, `null`
- `calendarUrl` (`identity.user.update.response.200.calendarUrl`; any of, optional) — A link where people book time with the person.
  - any of the following: `string`, `null`
- `companyName` (`identity.user.update.response.200.companyName`; any of, optional) — The agency the person last switched into; null, empty or absent on some older accounts.
  - any of the following: `string`, `null`
- `deleted` (`identity.user.update.response.200.deleted`; boolean, optional) — True once the account is closed.
- `deletedAt` (`identity.user.update.response.200.deletedAt`; any of, optional) — When the account was closed.
  - any of the following: `string`, `null`
- `deletedBy` (`identity.user.update.response.200.deletedBy`; string, optional) — The user id of whoever closed the account.
- `email` (`identity.user.update.response.200.email`; any of, optional) — The email the person signs in with; absent, or null on some older accounts, for a person who signed up by phone.
  - any of the following: `string`, `null`
- `externalIntercomId` (`identity.user.update.response.200.externalIntercomId`; any of, optional) — A support-tool id some older accounts keep.
  - any of the following: `string`, `null`
- `instagram` (`identity.user.update.response.200.instagram`; any of, optional) — The person's Instagram handle.
  - any of the following: `string`, `null`
- `invitedAt` (`identity.user.update.response.200.invitedAt`; any of, optional) — When the person was invited, on some older accounts.
  - any of the following: `string`, `null`
- `invitedBy` (`identity.user.update.response.200.invitedBy`; any of, optional) — The user id of whoever invited or referred the person.
  - any of the following: `string`, `null`
- `lastModifiedBy` (`identity.user.update.response.200.lastModifiedBy`; string, optional) — The user id of whoever last changed the account.
- `location` (`identity.user.update.response.200.location`; object, optional) — Where the person says they are.
  - `address` (`identity.user.update.response.200.location.address`; string, optional)
  - `city` (`identity.user.update.response.200.location.city`; string, optional)
  - `country` (`identity.user.update.response.200.location.country`; string, optional)
  - `countryCode` (`identity.user.update.response.200.location.countryCode`; string, optional)
  - `latitude` (`identity.user.update.response.200.location.latitude`; number, optional)
  - `longitude` (`identity.user.update.response.200.location.longitude`; number, optional)
  - `neighborhood` (`identity.user.update.response.200.location.neighborhood`; string, optional)
  - `region` (`identity.user.update.response.200.location.region`; string, optional)
  - `state` (`identity.user.update.response.200.location.state`; string, optional)
  - `zipCode` (`identity.user.update.response.200.location.zipCode`; string, optional)
- `phoneNumber` (`identity.user.update.response.200.phoneNumber`; any of, optional) — The phone number the person signs in with; absent, or null on some older accounts, for a person who signed up by email.
  - any of the following: `string`, `null`
- `registrationSource` (`identity.user.update.response.200.registrationSource`; string, optional) — How the account was opened, such as INVITATION_REGISTRATION.
- `searchKey` (`identity.user.update.response.200.searchKey`; string, optional) — fullName in lowercase, which searches match.
- `tenantOwner` (`identity.user.update.response.200.tenantOwner`; boolean, optional) — Set on some older accounts.
- `tourProgress` (`identity.user.update.response.200.tourProgress`; map of object, optional) — The in-app product tours the person completed, skipped or dismissed, by tour id.
- `username` (`identity.user.update.response.200.username`; string, optional) — The person's handle, made from their name, for referral links.
- `zoneinfo` (`identity.user.update.response.200.zoneinfo`; any of, optional) — The person's time zone, an IANA name such as America/Bogota.
  - any of the following: `string`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.user.update.response.400.errorCode`; string, required)
- `errorMessage` (`identity.user.update.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.user.update.response.401.errorCode`; string, required)
- `errorMessage` (`identity.user.update.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.user.update.response.403.errorCode`; string, required)
- `errorMessage` (`identity.user.update.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/identity/identity.user.update/index.md
