# Update the username for a user

From **GitHub v3 REST API**.

`PATCH /admin/users/{username}`

Update the username for a user

## Parameters

### `username`

- Location: path
- Required: true
- Type: `string`

## Request body

- Required: true
### `application/json`

- Type: `object`

```json
{
  "login": "thenewmonalisa"
}
```

```json
{"properties":{"login":{"description":"The user's new username.","type":"string"}},"required":["login"],"type":"object"}
```

## Responses

### `202`

Response

### `application/json`

- Type: `object`

```json
{
  "message": "Job queued to rename user. It may take a few minutes to complete.",
  "url": "https://api.github.com/user/1"
}
```

```json
{"properties":{"message":{"type":"string"},"url":{"type":"string"}},"type":"object"}
```

## Request examples

### cURL

```shell
curl --request PATCH \
  --url {protocol}://{hostname}/api/v3/admin/users/{username} \
  --header 'content-type: application/json' \
  --data '{
  "login": "thenewmonalisa"
}'
```
