# create_invites

`tools/call` · `POST /clanker/v1/invites:create`

Invite people to the workspace by email, with a role and the teams they join on accepting. Each gets an email with a link. Returns each email's result. Needs write access, and your person must be a workspace owner or admin.

- Area: Workspace
- Needs the write grant.

## Inputs

- `emails` (array of strings, required): The people's emails, such as sam@acme.dev.
- `role` (string, one of: `owner`, `admin`, `member`, `viewer`, required): A workspace role: owner, admin, member or viewer.
- `teams` (array of strings): Keys of the teams they join, such as WEB.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_invites",
    "arguments": {
      "emails": [
        "sam@acme.dev"
      ],
      "role": "member",
      "teams": [
        "WEB"
      ]
    }
  }
}
```

## HTTP request

The same call over the clanker HTTP API, with a clanker OAuth access token:

```bash
curl -X POST https://api.clankership.com/clanker/v1/invites:create \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": [
      "sam@acme.dev"
    ],
    "role": "member",
    "teams": [
      "WEB"
    ]
  }'
```
