> ## Documentation Index
> Fetch the complete documentation index at: https://developer.meetergo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update User

> Update a platform user's basic profile fields

Update a user's first name, last name, or booking slug — useful when correcting a typo or rebranding a user's public booking URL.

## Endpoint

```
PATCH /v4/user/{id}
```

## Request Headers

| Header          | Required | Description             |
| --------------- | -------- | ----------------------- |
| `Authorization` | Yes      | `Bearer <your-api-key>` |
| `Content-Type`  | Yes      | `application/json`      |

## Request Body

All fields are optional. Provide only the fields you want to change — omitted fields stay unchanged.

| Field        | Type   | Description                                                                                                                                                    |
| ------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `givenName`  | string | First name                                                                                                                                                     |
| `familyName` | string | Last name                                                                                                                                                      |
| `slug`       | string | Public booking slug. Min 5 characters; must be unique across the platform. Invalid characters are normalized automatically (e.g. `"John Doe"` → `"john-doe"`). |

<Info>
  **Email is not editable here.** Email changes affect the user's login identity and require a separate flow. Contact support if you need to change a user's email.
</Info>

## Examples

### Fix a Typo in the Name

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.meetergo.com/v4/user/550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "givenName": "Jonathan",
      "familyName": "Smith"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    `https://api.meetergo.com/v4/user/${userId}`,
    {
      method: 'PATCH',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        givenName: 'Jonathan',
        familyName: 'Smith'
      })
    }
  );

  const user = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.patch(
      f'https://api.meetergo.com/v4/user/{user_id}',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'givenName': 'Jonathan',
          'familyName': 'Smith'
      }
  )

  user = response.json()
  ```
</CodeGroup>

### Change the Booking Slug

```bash theme={null}
curl -X PATCH "https://api.meetergo.com/v4/user/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "slug": "jonathan-smith" }'
```

The user's public booking URL updates immediately to use the new slug.

<Warning>
  Old booking URLs using the previous slug will return 404. If you've shared the old URL externally, update those references too.
</Warning>

## Response

### Success (200 OK)

Returns the full updated user object.

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "john.smith@example.com",
  "givenName": "Jonathan",
  "familyName": "Smith",
  "fullName": "Jonathan Smith",
  "slug": "jonathan-smith",
  "timezone": "Europe/Berlin",
  "companyId": "880e8400-e29b-41d4-a716-446655440003",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-16T09:12:00.000Z"
}
```

### Error Responses

#### 400 Bad Request — Empty Body

```json theme={null}
{
  "statusCode": 400,
  "message": "No fields to update",
  "error": "Bad Request"
}
```

#### 400 Bad Request — Slug Too Short

```json theme={null}
{
  "statusCode": 400,
  "message": "TOO_SHORT",
  "error": "Bad Request"
}
```

#### 400 Bad Request — Slug Already Taken

```json theme={null}
{
  "statusCode": 400,
  "message": "NOT_AVAILABLE",
  "error": "Bad Request"
}
```

#### 403 Forbidden — Non-Admin Updating Someone Else

```json theme={null}
{
  "statusCode": 403,
  "message": "Only company admins can update other users",
  "error": "Forbidden"
}
```

#### 404 Not Found — User Outside Your Company

```json theme={null}
{
  "statusCode": 404,
  "message": "User not found or does not belong to your company",
  "error": "Not Found"
}
```

## Notes

* **Database-only update.** This endpoint does not modify the user's authentication identity (Cognito); it only updates the meetergo profile.
* **Authorization.** Any authenticated user can update their own profile. Only company admins can update other users in their company.
* **Scoped to your company.** You can only update users that belong to the same company as the caller.
