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

# updateProjectUserCollaborator

***

# Function: updateProjectUserCollaborator()

```ts theme={null}
function updateProjectUserCollaborator(
  userId: string,
  update: object,
  projectId?: string,
): Promise<{
  createdAt: string;
  email: string;
  firstName: null | string;
  id: string;
  lastName: null | string;
  permissions?: object[];
  role: "owner" | "editor" | "annotator" | "viewer";
  userId: string;
}>;
```

Defined in: [src/utils/projects.ts](https://github.com/rungalileo/galileo-js/blob/main/src/utils/projects.ts)

Updates a user collaborator assignment.

## Parameters

### userId

`string`

ID of the collaborator to update.

### update

Update payload describing the collaborator changes.

#### role

`"owner"` | `"editor"` | `"annotator"` | `"viewer"`

(Optional) Updated role for the collaborator.

### projectId?

`string`

(Optional) Project ID override when client is not project-scoped.

## Returns

`Promise`\<\{
`createdAt`: `string`;
`email`: `string`;
`firstName`: `null` | `string`;
`id`: `string`;
`lastName`: `null` | `string`;
`permissions?`: `object`\[];
`role`: `"owner"` | `"editor"` | `"annotator"` | `"viewer"`;
`userId`: `string`;
}>

A promise that resolves to the updated collaborator.
