> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getedulead.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getedulead.com/_mcp/server.

# UpdateMember

PATCH https://api.getedulead.com/v4/members/{id}
Content-Type: application/json

UpdateMember changes another member's role (update_mask role). The member's sign-in carries
 the old role until it next refreshes, up to an hour. Nobody changes their own role.

Reference: https://docs.getedulead.com/api-reference/members/update

## Authentication

- `Authorization` header (bearer token, required) — A team API key, sent as `Authorization: Bearer <key>`.
- `Authorization` header (bearer token, required) — The Cognito access token of a signed-in Edulead user (`edulead auth login`), sent as `Authorization: Bearer <token>`.

## Request

### Path parameters

- `id` (string, required) — Identifier of the resource, assigned by Edulead and opaque to callers.

### Query parameters

- `update_mask` (string, optional) — Which fields of the resource to change. Fields not listed keep their values.

### Body (application/json)

This endpoint expects an edulead.v4.Member.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `email` (string, optional)
- `given_name` (string, optional) — Empty when the user gave none.
- `family_name` (string, optional) — Empty when the user gave none.
- `role` (enum, optional) — MEMBER when the user has none recorded; MEMBER or OWNER on update. enum.defined_only = true
  - Allowed values: `MEMBER_ROLE_UNSPECIFIED`, `MEMBER_ROLE_MEMBER`, `MEMBER_ROLE_OWNER`
- `grants` (list of string, optional) — Permissions granted to this user beyond the role, in the order ListPermissions lists them; usually empty. Read only.
- `enabled` (boolean, optional) — False once the user is disabled and can no longer sign in.
- `create_time` (datetime, optional) — When Edulead created the resource.
- `update_time` (datetime, optional) — When any field last changed.

## Response

### 200

Success

- `member` (edulead.v4.Member, optional) — Member is one user of the team.

## Types

### edulead.v4.Member

Member is one user of the team.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `email` (string, optional)
- `given_name` (string, optional) — Empty when the user gave none.
- `family_name` (string, optional) — Empty when the user gave none.
- `role` (enum, optional) — MEMBER when the user has none recorded; MEMBER or OWNER on update. enum.defined_only = true
  - Allowed values: `MEMBER_ROLE_UNSPECIFIED`, `MEMBER_ROLE_MEMBER`, `MEMBER_ROLE_OWNER`
- `grants` (list of string, optional) — Permissions granted to this user beyond the role, in the order ListPermissions lists them; usually empty. Read only.
- `enabled` (boolean, optional) — False once the user is disabled and can no longer sign in.
- `create_time` (datetime, optional) — When Edulead created the resource.
- `update_time` (datetime, optional) — When any field last changed.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "member": {
    "id": "string",
    "email": "string",
    "given_name": "string",
    "family_name": "string",
    "role": "MEMBER_ROLE_UNSPECIFIED",
    "grants": [
      "string"
    ],
    "enabled": true,
    "create_time": "2023-01-15T01:30:15.01Z",
    "update_time": "2023-01-15T01:30:15.01Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.getedulead.com/v4/members/id"

payload = {}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.getedulead.com/v4/members/id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getedulead.com/v4/members/id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getedulead.com/v4/members/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.getedulead.com/v4/members/id")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.getedulead.com/v4/members/id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getedulead.com/v4/members/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getedulead.com/v4/members/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```