Clone a magic link
curl --request POST \
--url https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"linkId": "link_acme_m2m_a1b2c3d4e5f6",
"referenceId": "user-12345",
"status": "created",
"url": "https://flows.sandbox.raas-widgets.leapfinancial.com/link_acme_m2m_a1b2c3d4e5f6",
"token": "550e8400-e29b-41d4-a716-446655440000",
"expiresAt": "2026-02-11T12:00:00.000Z",
"createdAt": "2026-02-10T12:00:00.000Z",
"clonedFrom": "link_acme_m2m_a1b2c3d4e5f6",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt",
"requestId": "req_a1b2c3d4e5f6"
}
}Partner - Magic Links
Clone a magic link
Mints a twin of an existing link (any status, including expired or revoked): same flow, referenceId, config, theme, language and metadata, with a new linkId/token and the source link’s original TTL. Useful to reproduce a session while debugging. Fund-request twins get a new money request. Payout-claim links and cash-deposit operation-payment links cannot be cloned.
POST
/
partner
/
links
/
{linkId}
/
clone
Clone a magic link
curl --request POST \
--url https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links/{linkId}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"linkId": "link_acme_m2m_a1b2c3d4e5f6",
"referenceId": "user-12345",
"status": "created",
"url": "https://flows.sandbox.raas-widgets.leapfinancial.com/link_acme_m2m_a1b2c3d4e5f6",
"token": "550e8400-e29b-41d4-a716-446655440000",
"expiresAt": "2026-02-11T12:00:00.000Z",
"createdAt": "2026-02-10T12:00:00.000Z",
"clonedFrom": "link_acme_m2m_a1b2c3d4e5f6",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt",
"requestId": "req_a1b2c3d4e5f6"
}
}Authorizations
Your partner API key. Use raas_sandbox_* keys for the sandbox environment and raas_live_* keys for production.
Path Parameters
Link ID of the source link
Example:
"link_acme_a1b2c3d4e5f6"