---
title: "Create organization invitation"
method: POST
path: "/v1/invitations"
tags: ["Invitations"]
---

# Create organization invitation

`POST /v1/invitations`

Creates or refreshes a pending organization invitation for an email address and sends the invite email. Returns 502 when the invitation row is persisted but the configured email provider failed to send; the client should surface the error and give the user a retry affordance.

## Request body

- object
  - `email` string, email, required
  - `role` string, required

## Response `200`

Existing invitation refreshed successfully.

- InvitationResponse
  - `invitationId` string, typeid, required — Den TypeID with 'inv_' prefix and a 26-character base32 suffix.
  - `email` string, email, required
  - `role` string, required
  - `expiresAt` string, date-time, required
  - `inviteToken` string, required

## Other responses

- `201` — Invitation created successfully.
- `400` — The invitation request body or path parameters were invalid.
- `401` — The caller must be signed in to invite organization members.
- `402` — A seat subscription is required before inviting more members.
- `403` — Only workspace owners and admins can create invitations. Admins can only invite members.
- `404` — The organization could not be found.
- `409` — The email address is outside this workspace's allowed domains.
- `502` — The invitation was saved but the email provider rejected or failed to deliver it. Retry by submitting the same email again.

---

[API](https://skmtc.net/openworklabs/apis/den-api.md) · [All operations](https://skmtc.net/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openworklabs/den-api/versions/55ba7d5c7a7b/schema)
