# Invitations API

> Email invitations, invite codes and invite links.

Base URL: `https://api.socialit.com/v1`. Authenticate with `Authorization: Bearer <API key or OAuth token>`.

## Create an invite link

`POST /invite/tokens`

A shareable link that adds whoever opens it (after sign-in) to this workspace with the given role and profile access.

Access: `admin` · MCP tool: `create-invite-token` · Zernio: `POST /v1/invite/tokens`

### Headers

- `Idempotency-Key` (string; ≤ 255 characters): Unique key (for example a UUID) that makes retries safe: a repeated request with the same key and body returns the first response (Idempotent-Replayed: true) for 24 hours.

### Body

- `role` (string; one of admin, member, billing, viewer)
- `profile_ids` (array of string; ≤ 500 items)
- `scope` (string; one of all, profiles): Zernio compatibility: profiles requires profile_ids
- `expires_in` (integer; 300–2592000): Seconds until the link expires (default 7 days, max 30)

```bash
curl -X POST "https://api.socialit.com/v1/invite/tokens" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "member",
    "profile_ids": [
      "string"
    ],
    "scope": "all",
    "expires_in": 604800
  }'
```

Response 201:

```json
{
  "object": "invite_token",
  "token": "string",
  "url": "https://example.com",
  "role": "admin",
  "profile_ids": [
    "string"
  ],
  "expires_at": "2026-10-13T09:00:00.000Z"
}
```


---

Source: https://socialit.com/docs/api-reference/invitations/
