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

# List Members

> Retrieve all team members in your organization.

Returns all team members belonging to your business, including their current availability status and role.

**Method**: `GET`  **URL**: `/api/v1/team/members`

### Headers

| Header        | Value          |
| ------------- | -------------- |
| Authorization | Bearer {token} |

### Response

The endpoint returns an array of team member objects.

<ResponseField name="id" type="string" required>
  UUID of the team membership record.
</ResponseField>

<ResponseField name="user_id" type="string" required>
  UUID of the user account associated with this team member.
</ResponseField>

<ResponseField name="email" type="string" required>
  Email address of the team member.
</ResponseField>

<ResponseField name="name" type="string" required>
  Full name of the team member.
</ResponseField>

<ResponseField name="role" type="string" required>
  The member's role. One of: `owner`, `admin`, `agent`.
</ResponseField>

<ResponseField name="status" type="string" required>
  Current availability status. One of: `live`, `away`, `offline`.
</ResponseField>

<ResponseField name="is_active" type="boolean" required>
  Whether the team member account is currently active.
</ResponseField>

<ResponseField name="invited_at" type="string" required>
  ISO 8601 timestamp of when the member was invited.
</ResponseField>

### Example

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url https://api.pingback.live/api/v1/team/members \
    --header 'Authorization: Bearer {token}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.pingback.live/api/v1/team/members', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer {token}'
    }
  });

  const members = await response.json();
  ```
</CodeGroup>

### Response example

```json theme={null}
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "user_id": "f0e1d2c3-b4a5-9687-fedc-ba9876543210",
    "email": "sarah@acme.com",
    "name": "Sarah Chen",
    "role": "admin",
    "status": "live",
    "is_active": true,
    "invited_at": "2024-01-10T09:00:00Z"
  },
  {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "user_id": "01234567-89ab-cdef-0123-456789abcdef",
    "email": "james@acme.com",
    "name": "James Rivera",
    "role": "agent",
    "status": "away",
    "is_active": true,
    "invited_at": "2024-01-15T11:30:00Z"
  }
]
```

***

## Remove a member

**Method**: `DELETE`  **URL**: `/api/v1/team/members/{member_id}`

Permanently removes a team member from your organization. Only the org owner can perform this action. You cannot remove the owner.

<Warning>
  This action is irreversible. The removed member will immediately lose access to the PingBack dashboard for your organization.
</Warning>

### Path parameters

<ParamField path="member_id" type="string" required>
  The UUID of the team membership record to remove. Use the `id` field from the [List Members](#example) response, not the `user_id`.
</ParamField>

### Example

<CodeGroup>
  ```bash curl theme={null}
  curl --request DELETE \
    --url https://api.pingback.live/api/v1/team/members/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    --header 'Authorization: Bearer {token}'
  ```

  ```javascript JavaScript theme={null}
  await fetch(
    'https://api.pingback.live/api/v1/team/members/a1b2c3d4-e5f6-7890-abcd-ef1234567890',
    {
      method: 'DELETE',
      headers: { 'Authorization': 'Bearer {token}' }
    }
  );
  ```
</CodeGroup>

### Response example

```json theme={null}
{ "message": "Team member removed" }
```

### Errors

| Status | Meaning                                           |
| ------ | ------------------------------------------------- |
| 400    | Cannot remove the org owner                       |
| 401    | Unauthorized — missing or invalid token           |
| 403    | Forbidden — only the org owner can remove members |
| 404    | Team member not found                             |
