---
title: "Update a user"
method: PATCH
path: "/{service}/{owner_username}/users/{user_username_or_ownerid}/"
tags: ["Users"]
---

# Update a user

`PATCH /{service}/{owner_username}/users/{user_username_or_ownerid}/`

Updates a user for the specified owner_username or ownerid

Allowed fields
  - activated: boolean value to activate or deactivate the user

## Path parameters

- `owner_username` string, required
- `service` 'bitbucket' | 'bitbucket_server' | 'github' | 'github_enterprise' | 'gitlab' | 'gitlab_enterprise', required
- `user_username_or_ownerid` string, required

## Request body

- PatchedUserUpdateActivation
  - `activated` boolean

## Response `200`

- User
  - `service` 'github' | 'gitlab' | 'bitbucket' | 'github_enterprise' | 'gitlab_enterprise' | 'bitbucket_server', required — * `github` - Github * `gitlab` - Gitlab * `bitbucket` - Bitbucket * `github_enterprise` - Github Enterprise * `gitlab_enterprise` - Gitlab Enterprise * `bitbucket_server` - Bitbucket Server
  - `username` string, nullable
  - `name` string, nullable
  - `activated` boolean, required
  - `is_admin` boolean, required
  - `email` string, nullable

---

[API](https://skmtc.dev/codecov/apis/codecov-api.md) · [All operations](https://skmtc.dev/codecov/apis/codecov-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/codecov/codecov-api/revisions/aedc46e83ec6/schema)
