---
title: "Change one person's role and access"
description: "Other routes API"
---

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

# Change one person's role and access

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="put">PUT</span>
<code class="cvo-op-path-code">/v1/team/members/&#123;userId&#125;/access</code>
</div>
</div>

Sets one person's role, their access (every company, or the selected ones) and the companies of a selected person. Send the `revision` you read from `GET /v1/team`; if someone changed the access since, the answer is 409 `version_conflict`.

Only an owner or an admin may change access. Only an owner gives owner or changes an owner. An admin with selected access gives only selected access, only to their own companies, and never admin. Nobody widens their own access. The last owner stays an owner (409 `last_owner`).

A selected person with no company reaches no company at all. Only a signed-in person can change access. An API key is refused with 401 `session_required`.

## Path parameters

## Request body

`application/json`, required

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | The person, as `GET /v1/team` lists them now. |
| `400` | The body is not a role, an access and a revision (`invalid_invitation`), or a company is not one of this workspace (`unknown_company`). |
| `401` | No usable credential was sent (`invalid_credentials`), or an API key was used (`session_required`). |
| `403` | This person may not make this change (`role_required`). |
| `404` | The person is not in this workspace (`not_found`). |
| `409` | The access changed since it was read (`version_conflict`), or this is the last owner (`last_owner`). |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/other/change-one-person-s-role-and-access/index.mdx
