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

# List members

GET /members

Lists the members of the active workspace's account along with their roles.

Reference: https://docs.pivolio.com/api-reference/pivolio/workspaces/list-members

## Authentication

- `X-Workspace-Id` header (required) — API Key authentication via header

## Response

### 200

Successful Response

- `list of MemberResponse`

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (string, required)
- `code` (string, required)
- `errors` (list of FieldError, optional, nullable)

## Types

### MemberResponse

- `user_id` (string, required)
- `email` (string, required)
- `name` (string, required, nullable)
- `role` (enum, required) — A member's role on an Account (the tenant above workspaces). Grants access to ALL of the account's workspaces; the role varies the permission level, not which workspaces (see agency design §4). Phase 0 assigns only OWNER; the rest exist for the later agency phase.
  - Allowed values: `owner`, `admin`, `billing`, `member`
- `created_at` (datetime, required)

### FieldError

- `field` (string, required)
- `message` (string, required)

## Examples

**Response**

```json
[
  {
    "user_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "email": "alice.jones@example.com",
    "name": "Alice Jones",
    "role": "owner",
    "created_at": "2024-01-15T09:30:00Z"
  },
  {
    "user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "email": "bob.smith@example.com",
    "name": "Bob Smith",
    "role": "admin",
    "created_at": "2024-02-10T14:45:00Z"
  },
  {
    "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "email": "carol.white@example.com",
    "name": "Carol White",
    "role": "viewer",
    "created_at": "2024-03-05T08:20:00Z"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.example.com/members"

headers = {"X-Workspace-Id": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/members';
const options = {method: 'GET', headers: {'X-Workspace-Id': '<apiKey>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/members"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Workspace-Id", "<apiKey>")

	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.example.com/members")

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

request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<apiKey>'

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.get("https://api.example.com/members")
  .header("X-Workspace-Id", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/members', [
  'headers' => [
    'X-Workspace-Id' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/members");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Workspace-Id", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-Workspace-Id": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```