Skip to content

Create Invitation

POST /invitations

422 on role=operator: that role is unreachable by invitation, ever.

FieldTypeNotes
emailstring | nulloptionalmin length 3 max length 254
roleviewer | member | admin | owner | operatoroptionalDefault "member".
scopeworkspace | organization | platformoptionalDefault "workspace".
expires_in_sintegeroptionalDefault 604800. min 300 max 2592000
StatusDescriptionBody
201Successful ResponseInvitationWithLink
422Validation ErrorHTTPValidationError

The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.

Terminal window
curl -X POST https://your-deployment.example.com/invitations \
-H "Authorization: Bearer $COBRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "viewer",
"scope": "workspace",
"expires_in_s": 0
}'
FieldTypeNotes
tokenstringrequired—
invitationInvitationViewrequired—
deliveryqueued | unavailable | failedoptionalDefault "unavailable".