TypeScript
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>" } }
Create an invitation to join the organization. Sends an email to the invitee with a link to accept.
1
owner
admin
member
Invitation created
true
Show child attributes
Was this page helpful?