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

# updateUserProfile

> Changes a user's first and last name, in every tenant they belong to. Returns the new profile. You can change your own name; changing someone else's needs the `write:users` permission, or the call fails with `UnauthorizedError`. The user must be in the current tenant.



**mutation** `updateUserProfile(input: UpdateUserProfileInput!): UpdateUserProfilePayload!`

## Arguments

**`input`**: `UpdateUserProfileInput!` (required)

## Returns

`UpdateUserProfilePayload!`

**`errors`**: `[UpdateUserProfileError!]`

---

**`profile`**: `Profile`

## Examples

```graphql Mutation
mutation UpdateUserProfile($input: UpdateUserProfileInput!) {
  updateUserProfile(input: $input) {
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
    profile {
      email
      firstName
      lastName
    }
  }
}
```

```json Variables
{
  "input": {
    "firstName": "string",
    "id": "id",
    "lastName": "string"
  }
}
```

```json Response
{
  "data": {
    "updateUserProfile": {
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ],
      "profile": {
        "email": "string",
        "firstName": "string",
        "lastName": "string"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.