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

# Update project owner

> Transfers project ownership from the calling owner to another existing member and demotes the previous owner to admin.

`updateProjectOwner(projectReference: ID!, input: UpdateProjectOwnerInput!): ProjectMember!`

Requires project.members.manage.

## Arguments

| Argument | Type | Required | Description |
| - | - | - | - |
| `projectReference` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) | Yes | Project UUID, slug or domain. The caller must be the current owner. |
| `input` | [`UpdateProjectOwnerInput!`](https://veryfront.com/docs/cloud/graphql/types/updateprojectownerinput) | Yes | |

## Input fields

### input

[`UpdateProjectOwnerInput`](https://veryfront.com/docs/cloud/graphql/types/updateprojectownerinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `userId` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) | Yes | Existing member who becomes owner; must differ from the current owner. The previous owner becomes admin. |

## Response

Returns [`ProjectMember!`](https://veryfront.com/docs/cloud/graphql/types/projectmember). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `userId` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) | |
| `email` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `name` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Display name; null when the member has none. |
| `avatarSrc` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Avatar URL; null when the member has none. |
| `role` | [`ProjectRole!`](https://veryfront.com/docs/cloud/graphql/types/projectrole) | |
| `capabilities` | [`[String!]!`](https://veryfront.com/docs/cloud/graphql/types/string) | Project capabilities the role grants. |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
mutation UpdateProjectOwner($projectReference: ID!, $input: UpdateProjectOwnerInput!) {
  updateProjectOwner(projectReference: $projectReference, input: $input) {
    name
    avatarSrc
    capabilities
    email
    role
  }
}
```

```json title="variables.json" theme={null}
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "input": {
    "userId": "00000000-0000-4000-8000-000000000001"
  }
}
```

<details>
  <summary>Try this mutation</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Mutation

  Variables (JSON)
</details>


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