> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Subscription to Resource

Transfers an existing subscription to a different resource. This is the recommended replacement for the deprecated `transferSubscription` mutation.

## Mutation

<CodeGroup>
  ```graphql Mutation theme={null}
  mutation TransferSubscriptionToResource(
    $input: TransferSubscriptionToResourceInput!
  ) {
    transferSubscriptionToResource(input: $input) {
      subscriptionId
      status
      resource {
        resourceId
      }
      plan {
        refId
        displayName
      }
    }
  }
  ```

  ```json Variables theme={null}
  {
    "input": {
      "subscriptionId": "sub-789",
      "destinationResourceId": "resource-456"
    }
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "transferSubscriptionToResource": {
        "subscriptionId": "sub-789",
        "status": "ACTIVE",
        "resource": {
          "resourceId": "resource-456"
        },
        "plan": {
          "refId": "plan-pro",
          "displayName": "Pro Plan"
        }
      }
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="input" type="TransferSubscriptionToResourceInput" required>
  Input for transferring a subscription to a resource

  <Expandable title="properties">
    <ParamField body="subscriptionId" type="String" required>
      The ID of the subscription to transfer
    </ParamField>

    <ParamField body="destinationResourceId" type="String">
      The resource ID to transfer the subscription to. If omitted, the subscription is moved to the customer's default (no-resource) context.
    </ParamField>

    <ParamField body="environmentId" type="UUID">
      The environment ID of the subscription. Defaults to the environment associated with the API key.
    </ParamField>
  </Expandable>
</ParamField>

## Return Type

Returns the updated `CustomerSubscription` object reflecting the new resource assignment.

## Related Operations

* [Provision Subscription](/api-and-sdks/api-reference/mutations/provision-subscription) - Create a new subscription on a resource
* [Update Subscription](/api-and-sdks/api-reference/mutations/update-subscription) - Modify other subscription properties
* [Get Subscription](/api-and-sdks/api-reference/queries/get-subscription) - Fetch current subscription details
