# createTeamInvite

Create a team-member invitation. userType: ADMIN or MEMBER (default MEMBER). Either emails (each address is EMAILED its own single-use invite: say so) or isPermanent: true, the reusable link, which emails nobody and invites as MEMBER (a live older link is returned with its own role). No email-less one-time link exists. Never paste an acceptUrl in chat (it goes by email); show the permanent link only on request.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "createTeamInvite", "variables": {...} }`
- Scope: `ADMIN`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `userType`: `OrganizationToUserMappingType` (one of `ADMIN`, `MEMBER`)
- `emails`: `[String!]`
- `isPermanent`: `Boolean`
- `phoneRequired`: `Boolean`

## Response (data, an example)

```json
{
  "organizationMutation": {
    "createInvitationLink": {
      "id": "<ID>",
      "acceptUrl": "…",
      "isAlive": true,
      "isPermanent": true,
      "phoneRequired": true,
      "userType": "ADMIN",
      "email": "…",
      "createdAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "createTeamInvite",
    "variables": {}
  }'
```
