---
title: "Invite someone to a site by email"
method: POST
path: "/api/v1/sites/{slug}/members/invites"
tags: ["Members"]
---

# Invite someone to a site by email

`POST /api/v1/sites/{slug}/members/invites`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/sites/{slug}/members/invites`
- Auth: HTTP bearer

Gives one person access to this one site as an `editor` or `viewer`. They get an email with a link that is good for 7 days; accepting needs a signed-in account on the invited address (`acceptInvite`). Inviting an address that already has a pending invite re-sends it as a fresh one instead of adding a second.

Adding collaborators needs the site's team add-on (402 `upgrade_required` without it), and a site holds at most 20 collaborators and pending invites together. Needs the site Owner role.

## Path parameters

- `slug` string, required

## Request body

- CreateSiteInviteRequest
  - `email` string, email, required: Who to invite.
  - `role` 'editor' | 'viewer', required: `editor` can edit content and publish. `viewer` can only look.
  - `isInternal` boolean: Mark the person as inside your own organization rather than an outside guest. Default false.

## Response `201`

The invite.

- CreateSiteInviteResponse
  - `id` string, required
  - `email` string, required: Lowercased.
  - `role` 'editor' | 'viewer', required
  - `isInternal` boolean, required
  - `expiresAt` number, required: Invites last 7 days. Unix ms.
  - `token` string, required: The raw invite token. It is shown once and never stored.
  - `invitePath` string, required: Dashboard path the invited person opens to accept.
  - `emailSent` boolean, required: True when an email was sent. False when email is not configured on this server, so share `invitePath` yourself.

## Other responses

- `400`: `invalid_body`: send `{ email, role: 'editor' | 'viewer', isInternal? }`.
- `401`: Missing or invalid credentials.
- `402`: `upgrade_required`: this site's plan does not include collaborators.
- `403`: `forbidden_role`: managing a site's people needs the site Owner role. `guest_only`: this account can't invite people.
- `404`: `site_not_found`: no such site, or it is not visible to this account.
- `409`: `collaborator_cap_reached`: the site already has 20 collaborators and pending invites.
- `429`: `rate_limited`: too many invites sent recently. Wait and retry; `Retry-After` says how long.

---

[API](https://skmtc.dev/dotsy/apis/dotsy-api.md) · [All operations](https://skmtc.dev/dotsy/apis/dotsy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dotsy/apis/dotsy-api/revisions/4272ed3b85d7?raw)
