---
title: "Invite someone to the organization"
method: POST
path: "/v1/invitations"
tags: ["discovery"]
---

# Invite someone to the organization

`POST /v1/invitations`

## Request

- Base URL: `https://postbag.dev`
- URL: `https://postbag.dev/v1/invitations`
- Auth: HTTP bearer

Owner or admin. Sends an email via Resend when the server has RESEND_API_KEY configured; otherwise the invitation is still created and its accept link can be shared manually. Re-inviting an address with a pending invitation resends it (extends the 7-day expiry) instead of creating a duplicate.

## Request body

- object
  - `email` string, email, required
  - `role` 'admin' | 'member', required: Invite as admin or member. Promote to owner from Members after they join.

## Response `201`

created

- Invitation
  - `id` string, required
  - `email` string, required
  - `role` 'owner' | 'admin' | 'member', required
  - `expires_at` string, required
  - `invited_by` object, nullable, required: Null when the invitation was created by an API key rather than a signed-in session.
    - `id` string, required
    - `name` string, required
    - `email` string, required
  - `created_at` string, required

## Other responses

- `400`: Error
- `401`: Error
- `403`: Error
- `404`: Not found
- `409`: Error
- `422`: Error
- `502`: The invitation was created, but the email could not be sent

---

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