Invite someone
POST
/api/v1/invitations
const url = 'http://localhost:3000/api/v1/invitations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","resource":"organization","resourceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","scope":"read"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/invitations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "resource": "organization", "resourceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope": "read" }'A grant waiting for whoever holds the link: they make an account or sign in, and have it. The url is in this response only. It works once, for seven days. Same rules as giving a grant.
Any caller; the scope needed is checked on what it acts on.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
resource
required
What the grant is on; it reaches everything inside it
string
resourceId
required
The organization’s, project’s, collection’s or asset’s id
string format: uuid
scope
required
string
Responses
Section titled “Responses”The invitation, with its link
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
email
required
string
resource
required
string
resourceId
required
string format: uuid
label
required
string | null
scope
required
string
invitedBy
required
string
expiresAt
required
string format: date-time
createdAt
required
string format: date-time
url
required
Emailed to them when the organization can send email; send it yourself otherwise
string format: uri
emailed
required
boolean
Example
{ "data": { "resource": "organization", "scope": "read" }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}