---
title: "Invite a teammate to the workspace"
method: POST
path: "/api/v1/account/workspace-invites"
tags: ["Account"]
---

# Invite a teammate to the workspace

`POST /api/v1/account/workspace-invites`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/account/workspace-invites`
- Auth: HTTP bearer

Invites someone by email as an `admin` or a `member` of the active workspace. Inviting an address that already has a pending invite re-sends it and extends the expiry instead of creating a second one. Only a workspace Owner or Admin can invite. To share a single site instead, use `createSiteInvite`.

## Headers

- `X-Dotsy-Workspace` string

## Request body

- CreateWorkspaceInviteRequest
  - `email` string, email, required: Who to invite.
  - `role` 'admin' | 'member', required: `admin` or `member`. Never `owner`: promote someone to owner after they join.

## Response `201`

The invitation.

- CreateWorkspaceInviteResponse
  - `id` string, required
  - `email` string, required
  - `role` string, required: `admin` or `member`.
  - `status` string, required: `pending` until the person accepts, declines or the invite expires.
  - `expiresAt` string, date-time, required: When the invite stops working.
  - `createdAt` string, date-time, required: When the invite was created.
  - `organizationId` string, required: The workspace the invite is for.
  - `acceptPath` string, required: Dashboard path the invited person opens to accept.
  - `workspaceSiteCount` number, required: How many sites a new teammate will see. Use it in a confirmation like "Add teammate: sees all N sites".
  - `emailSent` boolean, required: True when an email was sent. False when email is not configured on this server, so share `acceptPath` yourself.

## Other responses

- `400`: `invalid_body`: send `{ email, role }` with role `admin` or `member`, or the invitation was refused with a specific code.
- `401`: Missing or invalid credentials.
- `403`: `workspace_admin_required`: only a workspace Owner or Admin can do this. `guest_only`: this account can't invite teammates. `guest_requires_account`: a guest token can't invite teammates.

---

[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)
