> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # transfer > Tail-call to a new SWML document fetched from a URL. Fetch and execute a new SWML document from a URL. This is a **tail call** — it replaces the current document and does not return. Steps after `transfer`, including steps in calling sections, are skipped. In the messaging context, `transfer.dest` must be a URL — it does not accept a section name or an inline document. ## **Properties** **`transfer`** `object` — required An object that accepts the following properties. --- **`transfer.dest`** `string` — required URL (`http` or `https`) to fetch the new SWML document from. Authentication can be set in the URL in the format `username:password@url`. --- **`transfer.method`** `string` — default: POST HTTP method for the fetch request. One of `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`. --- **`transfer.params`** `object` Parameters to include in the request body of the fetch. Available as `params.*` in the transferred document. --- ## **Webhook payload sent to `dest`** When `transfer` fetches an external document, SignalWire `POST`s the [inbound message webhook payload](/docs/apis/rest/webhooks/inbound-message-webhook) to `dest`: * `message` — the original inbound message that triggered this SWML document. * `params` — the values supplied to this `transfer` step. * `vars` — runtime variables propagated from the current document (`request_result`, `reply_result`, `request_response`, `request_response_code`, `request_response_body`, `reply_message_id`). Present on transfer-driven fetches; absent on the initial inbound fetch. See the [SWML inbound message webhook reference](/docs/apis/rest/webhooks/inbound-message-webhook) for the complete request schema. ## **Examples** ### Transfer to an external SWML handler #### YAML ```yaml version: 1.0.0 sections: main: - transfer: dest: "https://example.com/messaging-handler" params: reason: "escalation" ``` #### JSON ```json { "version": "1.0.0", "sections": { "main": [ { "transfer": { "dest": "https://example.com/messaging-handler", "params": { "reason": "escalation" } } } ] } } ``` ### Route to different handlers based on keyword #### YAML ```yaml version: 1.0.0 sections: main: - switch: variable: message.body transform: lowercase_trim case: sales: - transfer: dest: "https://example.com/sales-handler" params: source: "sms" support: - transfer: dest: "https://example.com/support-handler" params: source: "sms" default: - reply: body: "Reply SALES or SUPPORT to be routed to the right team." ``` #### JSON ```json { "version": "1.0.0", "sections": { "main": [ { "switch": { "variable": "message.body", "transform": "lowercase_trim", "case": { "sales": [ { "transfer": { "dest": "https://example.com/sales-handler", "params": { "source": "sms" } } } ], "support": [ { "transfer": { "dest": "https://example.com/support-handler", "params": { "source": "sms" } } } ] }, "default": [ { "reply": { "body": "Reply SALES or SUPPORT to be routed to the right team." } } ] } } ] } } ``` > Tail-call to a new SWML document fetched from a URL.