Skip to main content

Suspend or resume a membership

You might need to block an account member from accessing the account temporarily, referred to as suspend in the API. You can also resume, or restore, access for an account member who was temporarily blocked. Note that resuming a membership requires consent, while suspending one does not.

If you use Swan's Web Banking interface, your users can also block and resume account memberships from their Web Banking accounts.

To block account members permanently, follow the guide to disable an account membership.

Prerequisites
  • You have the canManageAccountMembership permission.
  • You're not suspending yourself or the legal representative's membership.

Suspend a membership​

  1. Call the suspendAccountMembership mutation.
  2. Add the account membership ID.
  3. Add the success payload with the status.
  4. Add any rejections you'd like.

🔎 Open the mutation in API Explorer

mutation SuspendMembership {
suspendAccountMembership(
input: { accountMembershipId: "$ACCOUNT_MEMBERSHIP_ID" }
) {
... on SuspendAccountMembershipSuccessPayload {
__typename
accountMembership {
statusInfo {
status
... on AccountMembershipSuspendedStatusInfo {
__typename
reason
status
}
}
}
}
... on InternalErrorRejection {
__typename
message
}
... on LegalRepresentativeAccountMembershipCannotBeSuspendedRejection {
id
message
}
... on UserNotAllowedToManageAccountMembershipRejection {
__typename
message
}
... on UserNotAllowedToSuspendItsOwnAccountMembershipRejection {
__typename
accountMembershipId
message
}
... on ValidationRejection {
__typename
message
fields {
code
message
path
}
}
}
}
Suspend payload
{
"data": {
"suspendAccountMembership": {
"__typename": "SuspendAccountMembershipSuccessPayload",
"accountMembership": {
"id": "$YOUR_MEMBERSHIP_ID"
}
}
}
}

Resume a membership​

Suspended only

You can only resume a membership if the account membership's status was Suspended, or temporarily blocked. You can't resume Disabled, or permanently blocked, memberships.

Only account members with the canManageAccountMembership permission can resume an account membership, which requires consent.

  1. Call the resumeAccountMembership mutation.
  2. Add the account membership ID.
  3. Add the success payload with the consentUrl.
  4. Add any rejections you'd like.

🔎 Open the mutation in API Explorer

mutation ResumeMembership {
resumeAccountMembership(
input: {
accountMembershipId: "$ACCOUNT_MEMBERSHIP_ID"
consentRedirectUrl: "$YOUR_CONSENT_REDIRECT_URL"
}
) {
... on ResumeAccountMembershipSuccessPayload {
__typename
consent {
consentUrl
}
}
... on ForbiddenRejection {
__typename
message
}
... on UserNotAllowedToManageAccountMembershipRejection {
__typename
message
}
... on ValidationRejection {
__typename
message
fields {
code
message
path
}
}
}
}

The account holder, legal representative of the account, or account member with canManageAccountMembership permissions must consents to resuming the membership.

Resume payload
{
"data": {
"resumeAccountMembership": {
"__typename": "ResumeAccountMembershipSuccessPayload",
"consent": {
"status": "Created",
"consentUrl": "https://identity.swan.io/consent?consentId=$CONSENT_ID&env=Sandbox"
"user": {
"id": "$YOUR_USER_ID",
"identificationLevels": {
"PVID": false,
"QES": false,
"expert": false
}
}
}
}
}
}