Accept
client.invitations.accept(stringtoken, InvitationAcceptParams { xClientRequestID } params?, RequestOptionsoptions?): InvitationAcceptResponse { organization_id, organization_name, success, user_id }
POST/invitations/{token}/accept
Accept and consume an invitation token to join the organization
Parameters
token: string
minLength1
maxLength500
Returns
Accept
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI();
const response = await client.invitations.accept('token');
console.log(response.organization_id);{
"organization_id": "ab3def8hij2klm9opq5rst7uvw",
"organization_name": "organization_name",
"success": true,
"user_id": "ab3def8hij2klm9opq5rst7uvw"
}Returns Examples
{
"organization_id": "ab3def8hij2klm9opq5rst7uvw",
"organization_name": "organization_name",
"success": true,
"user_id": "ab3def8hij2klm9opq5rst7uvw"
}