Get Invitation Details
GET
/users/invitations/{id}Fetch details about a specific invitation.
Returns the invitation status (pending, accepted, expired), the email it was
sent to, and when it expires. Use this to show invitation status in your UI
or to check if you need to resend.
When to use this
- Showing invitation status on a user management page
- Checking if an invitation has expired
- Displaying details before resending
Parameters
idpathrequiredResponse
Invitation retrieved successfully
Notes
ℹ️Invitations expire after a set period-check the expiresAt field.
💡If an invitation has expired, you can resend it to generate a new code.
Code Samples
Get User Invitation using the TypeScript SDK:
import { BackstageClient } from '@ticketlayer/backstage';
const client = new BackstageClient({
organisationSlug: 'your-org',
});
client.setAccessToken('YOUR_ACCESS_TOKEN');
// Get userinvitation details
const userinvitation = await client.userinvitation.get('{{USERINVITATION_ID}}');
console.log(`UserInvitation: ${userinvitation.name || userinvitation.id}`);