Skip to main content

Resend membership invitation notification

If an invited account member doesn't receive their invitation email, you can resend it using the sendAccountMembershipInviteNotification mutation.

This guide explains how to send partner-branded email notifications when inviting account members.

Guide​

Prerequisites​

  • You must authenticate with a user access token associated with an existing account member who has the canManageAccountMembership permission.
  • Only account members with the canManageAccountMembership permission can send invitation notifications.
  • The account membership status must be InvitationSent.
  • You can resend invitations up to five times per day per membership.

Step 1: Call the mutation​

Call the sendAccountMembershipInviteNotification mutation with the accountMembershipId of the membership for which you want to send the invitation.

You can optionally include a redirectUrl parameter. When the end user completes the OAuth flow, Swan redirects them to your redirect URL with an authorization code and state. If you include a redirectUrl, it must be registered in your Dashboard. If you don't include one, the user is redirected to Swan's Web Banking.

Open in API Explorer
mutation ResendInvitation {
sendAccountMembershipInviteNotification(
# redirectUrl is optional; if provided, it must be registered in your Dashboard
input: { accountMembershipId: "$YOUR_ACCOUNT_MEMBERSHIP_ID", redirectUrl: "$YOUR_REDIRECT_URL" }
) {
... on SendAccountMembershipInviteNotificationSuccessPayload {
__typename
notificationRequestId
}
... on AccountMembershipNotFoundRejection {
id
message
}
... on AccountMembershipStatusNotEligibleRejection {
message
}
... on MaximumDailyInvitationsReachedRejection {
message
}
... on UserNotAllowedToManageAccountMembershipRejection {
message
}
... on UserNotAllowedToSendAccountMembershipInvitationRejection {
message
}
... on AccountMembershipCustomInvitationCannotBeCreatedRejection {
projectId
message
}
... on ForbiddenRejection {
message
}
... on ValidationRejection {
fields {
code
message
path
}
message
}
}
}

Step 2: Receive the confirmation​

The API returns a notificationRequestId that you can use to track the email delivery if needed.

If a user reports problems with email delivery, provide this ID to Swan Support to help investigate the issue.

{
"data": {
"sendAccountMembershipInviteNotification": {
"__typename": "SendAccountMembershipInviteNotificationSuccessPayload",
"notificationRequestId": "3f5a787a-5709-43a2-90dd-7508b71cdf7b"
}
}
}
Delivery status

The API currently does not display the delivery status of notifications. Please contact Swan Support if you encounter any issues with email delivery.

Rejection reasons​

The mutation can return several rejection reasons if the request can't be completed:

RejectionReason
AccountMembershipNotFoundRejectionThe account membership ID doesn't exist.
AccountMembershipStatusNotEligibleRejectionThe account membership status must be InvitationSent to send an invitation notification.
AccountMembershipCustomInvitationCannotBeCreatedRejectionThe invitation link can't be created for this account membership.
MaximumDailyInvitationsReachedRejectionYou've reached the maximum of five invitation emails per day for this membership.
UserNotAllowedToManageAccountMembershipRejectionThe authenticated user doesn't have the canManageAccountMembership permission.
UserNotAllowedToSendAccountMembershipInvitationRejectionThe user's account membership status must be Enabled to send invitations.
ForbiddenRejectionThe operation is forbidden in the current context.
ValidationRejectionThe request contains validation errors.

Notification details​

The invitation notification email:

  • Is sent to the email address specified when creating the account membership.
  • Uses the account member's preferred language if set, otherwise the account's default language.
  • Includes your partner branding (logo and accent colors).
  • Contains a link for the invited member to accept the invitation and bind their Swan user account to the membership.
  • Can be translated into multiple languages automatically.

If you have feedback about notification translations, contact Swan Support and specify the notification and language.