Source: https://atomicwork-preview.docs-staging.pageloop.ai/api-reference/users/postapi-v-1-users-workspaces-invite

# User workspace invite

POST `https://{tenant}.atomicwork.com/api/v1/users/workspaces/invite`

## Authorization

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

## Headers

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

## 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/users/workspaces/invite' \
  -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/users/workspaces/invite', {
  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/users/workspaces/invite',
    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()
```
