---
title: "Create a workspace invitation"
method: POST
path: "/workspaces/{id}/invitations"
tags: ["Workspaces"]
---

# Create a workspace invitation

`POST /workspaces/{id}/invitations`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/workspaces/{id}/invitations`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

## Path parameters

- `id` string, required: Workspace ID

## Request body

- CreateWorkspaceInvitationInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `email` string, email, required: Email address to invite
  - `role` 'admin' | 'editor' | 'client' | 'viewer', required: Workspace role to grant

## Response `200`

OK

- WorkspaceInvitationResponse
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `accept_url` string: Browser URL that accepts the invitation
  - `accepted_at` string: When the invitation was accepted
  - `accepted_by_user_id` string: Accepting user ID
  - `created_at` string, required: Invitation creation time
  - `email` string, required: Invited email
  - `email_delivery_status` 'created' | 'queued' | 'sent' | 'delivered' | 'failed' | 'unavailable', required: Truthful transport outcome for the latest Transactional invitation email. Sent means provider accepted; Delivered requires an authenticated callback.
  - `email_delivery_updated_at` string: Provider callback time for the latest terminal delivery outcome
  - `expires_at` string, required: Invitation expiry time
  - `id` string, required: Invitation ID
  - `invited_by_user_id` string, required: Inviting user ID
  - `last_sent_at` string, required: When the invitation was most recently sent
  - `revoked_at` string: When the invitation was revoked
  - `role` string, required: Workspace role to grant
  - `status` 'created' | 'queued' | 'sent' | 'delivered' | 'delivery_failed' | 'delivery_unavailable' | 'expired' | 'revoked' | 'accepted', required: Current invitation lifecycle, with terminal invitation state taking precedence over email delivery state
  - `workspace_id` string, required: Workspace ID

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/openpo/apis/openpost-api.md) · [All operations](https://skmtc.dev/openpo/apis/openpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openpo/apis/openpost-api/revisions/67d3964458a7?raw)
