Source: https://atomicwork-preview.docs-staging.pageloop.ai/api-reference/agentgroups/postapi-v-1-workspaces-workspace-id-agent-groups-agent-group-id-members

# Add workspace agent group member

POST `https://{tenant}.atomicwork.com/api/v1/workspaces/{workspace_id}/agent-groups/{agent_group_id}/members`

## Authorization

#### X-Api-Key (header, string, required)

## Headers

#### X-Workspace-Id (header, string)

## Path Parameters

#### workspace\_id (path, integer, required)

Workspace ID (numeric). Find yours under Settings → Workspace.

#### agent\_group\_id (path, integer, required)

## Body

#### emails (body, array of string)

#### user\_ids (body, array of integer)

#### users (body, array of string)

#### org\_roles (body, array of integer)

#### type (body, enum (string))

#### send\_email (body, boolean)

#### workspaces (body, array of object)

#### properties

#### id (integer)

#### roles (array of integer)

## Response

#### 200

Successful response

#### Request

```bash cURL
curl -X POST 'https://{tenant}.atomicwork.com/api/v1/workspaces/{workspace_id}/agent-groups/{agent_group_id}/members' \
  -H 'X-Api-Key: <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{"emails": ["email"], "user_ids": [0], "users": ["string"], "org_roles": [0], "type": "EMPLOYEE", "send_email": true, "workspaces": [{"id": 0, "roles": ["\u2026"]}]}'
```

```javascript JavaScript
const res = await fetch('https://{tenant}.atomicwork.com/api/v1/workspaces/{workspace_id}/agent-groups/{agent_group_id}/members', {
  method: 'POST',
  headers: {
    'X-Api-Key': '<api-key>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"emails": ["email"], "user_ids": [0], "users": ["string"], "org_roles": [0], "type": "EMPLOYEE", "send_email": true, "workspaces": [{"id": 0, "roles": ["\u2026"]}]}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://{tenant}.atomicwork.com/api/v1/workspaces/{workspace_id}/agent-groups/{agent_group_id}/members',
    headers={'X-Api-Key': '<api-key>'},
    json={"emails": ["email"], "user_ids": [0], "users": ["string"], "org_roles": [0], "type": "EMPLOYEE", "send_email": true, "workspaces": [{"id": 0, "roles": ["\u2026"]}]}
)
data = res.json()
```
