curl --request GET \
--url https://api.royalti.io/user/invites \
--header 'Authorization: Bearer <token>'{
"totalItems": 1,
"filteredItems": 1,
"totalPages": 1,
"currentPage": 1,
"invites": [
{
"id": "e2d9b1ff-1db1-4c6f-86de-65c13716fd4d",
"TenantUserId": "32dc2f99-934d-4e1d-8c51-46f573dbf9a2",
"TenantId": 101,
"status": "invited",
"meta": {
"message": "Welcome to the Royalti workspace.",
"date": "2024-06-10T12:00:00.000Z"
},
"JoinedAt": null,
"createdAt": "2024-06-10T12:00:00.000Z",
"updatedAt": "2024-06-10T12:00:00.000Z",
"TenantUser": {
"id": "32dc2f99-934d-4e1d-8c51-46f573dbf9a2",
"firstName": "Jane",
"lastName": "Doe",
"role": "admin",
"User": {
"email": "[email protected]"
}
}
}
]
}Returns recent invitations for the active workspace. Results include pending, joined, and cancelled invitations. When an invitation is cancelled the associated activation link is immediately revoked, so cancelled records are informational only.
curl --request GET \
--url https://api.royalti.io/user/invites \
--header 'Authorization: Bearer <token>'{
"totalItems": 1,
"filteredItems": 1,
"totalPages": 1,
"currentPage": 1,
"invites": [
{
"id": "e2d9b1ff-1db1-4c6f-86de-65c13716fd4d",
"TenantUserId": "32dc2f99-934d-4e1d-8c51-46f573dbf9a2",
"TenantId": 101,
"status": "invited",
"meta": {
"message": "Welcome to the Royalti workspace.",
"date": "2024-06-10T12:00:00.000Z"
},
"JoinedAt": null,
"createdAt": "2024-06-10T12:00:00.000Z",
"updatedAt": "2024-06-10T12:00:00.000Z",
"TenantUser": {
"id": "32dc2f99-934d-4e1d-8c51-46f573dbf9a2",
"firstName": "Jane",
"lastName": "Doe",
"role": "admin",
"User": {
"email": "[email protected]"
}
}
}
]
}const response = await fetch('https://api.royalti.io/user/invites', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Filter invitations by status
invited, joined, cancelled Page number (used when size is provided)
x >= 1Number of invitations to return per page
1 <= x <= 100