# Unlink client account

Source: https://developer.avalara.com/products/returns/integration-guides/managed-returns/kkv4091833813332/

Guide: Avalara Managed Returns API (U.S. and Canada)

# Unlink client account

Learn how unlinking a client account affects firm-client associations in Avalara's Managed Returns system.

The unlink firm-client API removes the association between a firm account and a client account in Avalara’s Managed Returns system.

This API is used when a firm should no longer manage tax-related activities for a specific client.

## Use case

Firms manage tax returns and compliance obligations for multiple client accounts. When a business relationship ends, or a client transitions away from a firm, the firm-client linkage must be removed to prevent unauthorized actions.

## Effect of unlinking

When the firm-client linkage is deleted:

-   The client account is no longer associated with the firm account.

-   The firm will not be able to perform actions on behalf of the client, such as:

    -   Filing returns

    -   Managing tax obligations

-   The system prevents any future operations between the unlinked firm and client, ensuring compliance and data integrity.

Note

Run the following operations with Client credentials.

To unlink a client account, use the `deleteFirmClientLinkage` mutation.

## View request

```
mutation DeleteFirmClientLinkage {
  deleteFirmClientLinkage {
    clientAccountId
    clientAccountName
    firmAccountId
    firmAccountName
    firmContactEmail
    firmContactName
    id
    isDeleted
    status
  }
}
```

## View response

```
{
  "data": {
    "deleteFirmClientLinkage": {
      "value": {
        "id": 12345,
        "firmAccountId": 11111,
        "clientAccountId": 22222,
        "status": "Deleted",
        "isDeleted": true
      },
      "errors": null
    }
  }
}
```

A successful request returns the deleted linkage details with the status marked as `Deleted` and `isDeleted` set to `true`.