---
title: "Invite someone outside the org to a restricted library"
method: POST
path: "/workspace/libraries/{id}/external-invites"
tags: ["access-requests"]
---

# Invite someone outside the org to a restricted library

`POST /workspace/libraries/{id}/external-invites`

## Request

- Base URL: `https://api.onplana.com/api`
- URL: `https://api.onplana.com/api/workspace/libraries/{id}/external-invites`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

Manage-sharing gated. Creates an invitation carrying a pendingGrant that the accept path materializes; the invitee joins at orgRole (GUEST or MEMBER, the inviter's seat choice), becomes project VIEWER for project-scoped resources, and receives the grant. Restricted resources only (400 NOT_RESTRICTED); existing members are redirected to the grant picker (409 ALREADY_MEMBER); one live invite per email + resource (409 INVITE_PENDING); the member cap refuses at create (400 MEMBER_LIMIT). Same paths exist for /workspace/tables/{id} and /workspace/pages/{id}.

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string, required

## Request body

- object
  - `email` string, email, required
  - `accessLevel` 'VIEW' | 'CONTRIBUTE' | 'MANAGE', required
  - `orgRole` 'GUEST' | 'MEMBER'

## Response `201`

{ id, email, orgRole, accessLevel, expiresAt }

## Other responses

- `400`: Validation error
- `401`: Unauthorized - missing or invalid JWT
- `403`: Forbidden - insufficient role

---

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