headless lms

Invite a person with an org role

POST /api/organizations/invites. Invite a person with an org role. Headless LMS People API reference.

POST
/api/organizations/invites

Requires people:write. The person is created by this call and returned as orgUserId, so access and item roles can be given before they accept. Needs every permission the role holds; never owner (409). host is the app the invite link opens and must be one of the organization's hosts (409).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/organizations/invites" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com"  }'
{  "id": "string",  "orgUserId": "string",  "email": "string",  "roleKey": "string",  "status": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z"}
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}