Skip to main content
POST
/
v1
/
regions
/
global
/
organizations
/
{orgId}
/
invitations
Create invitation
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({email: 'jsmith@example.com', role: 'admin'})
};

fetch('https://api.example.com/v1/regions/global/organizations/{orgId}/invitations', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "id": "<string>",
    "token": "<string>",
    "email": "jsmith@example.com",
    "projectId": "<string>",
    "organizationId": "<string>",
    "role": "admin",
    "status": "pending",
    "invitedBy": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "acceptedAt": "2023-11-07T05:31:56Z"
  }
}

Path Parameters

orgId
string
required

Organization identifier

Body

application/json
email
string<email>
required

Invitee email

role
enum<string>
required

Role to assign

Available options:
admin,
operator,
member,
viewer

Response

201 - application/json

Invitation created

success
enum<boolean>
Available options:
true
data
object

Project invitation entity