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

fetch('http://localhost:8000/v1/auth/organizations/{id}/invitations', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "id": "<string>",
    "email": "jsmith@example.com",
    "role": "owner",
    "organizationId": "<string>",
    "status": "pending",
    "expiresAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z"
  },
  "meta": {
    "requestId": "<string>",
    "timestamp": "<string>"
  }
}

Path Parameters

id
string
required
Minimum string length: 1

Body

application/json
email
string<email>
required
role
enum<string>
required
Available options:
owner,
admin,
member
resend
boolean

Response

Invitation created

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required