WhatsApp Migrations
Create a partner solution migration
Register a Meta intent to move a WhatsApp number from another Multi-partner Solution. Kapso selects the active destination solution from your project. Resubmit the same Meta intent with the same inputs to recover the operation ID.
POST
/
whatsapp
/
accounts
/
{waba_id}
/
partner_solution_migrations
Create a partner solution migration
curl --request POST \
--url https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "migrate_between_solutions",
"migration_intent_id": "123456789012345",
"business_portfolio_id": "234567890123456",
"phone_number": "+56912345678",
"source_business_token": "<source Meta business token>"
}
'import requests
url = "https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations"
payload = {
"type": "migrate_between_solutions",
"migration_intent_id": "123456789012345",
"business_portfolio_id": "234567890123456",
"phone_number": "+56912345678",
"source_business_token": "<source Meta business token>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'migrate_between_solutions',
migration_intent_id: '123456789012345',
business_portfolio_id: '234567890123456',
phone_number: '+56912345678',
source_business_token: '<source Meta business token>'
})
};
fetch('https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations', 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.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'migrate_between_solutions',
'migration_intent_id' => '123456789012345',
'business_portfolio_id' => '234567890123456',
'phone_number' => '+56912345678',
'source_business_token' => '<source Meta business token>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations"
payload := strings.NewReader("{\n \"type\": \"migrate_between_solutions\",\n \"migration_intent_id\": \"123456789012345\",\n \"business_portfolio_id\": \"234567890123456\",\n \"phone_number\": \"+56912345678\",\n \"source_business_token\": \"<source Meta business token>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"migrate_between_solutions\",\n \"migration_intent_id\": \"123456789012345\",\n \"business_portfolio_id\": \"234567890123456\",\n \"phone_number\": \"+56912345678\",\n \"source_business_token\": \"<source Meta business token>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"migrate_between_solutions\",\n \"migration_intent_id\": \"123456789012345\",\n \"business_portfolio_id\": \"234567890123456\",\n \"phone_number\": \"+56912345678\",\n \"source_business_token\": \"<source Meta business token>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"migration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "migrate_between_solutions",
"source_waba_id": "<string>",
"business_portfolio_id": "<string>",
"status": "awaiting_customer_approval",
"destination_waba_id": "<string>",
"migration_intent_id": "<string>",
"phone_number_id": "<string>",
"funding_status": "funded",
"error_kind": "<string>",
"next_action": "approve_in_meta_business_suite"
}
}{
"error": "<string>"
}Body
application/json
Was this page helpful?
⌘I
Create a partner solution migration
curl --request POST \
--url https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "migrate_between_solutions",
"migration_intent_id": "123456789012345",
"business_portfolio_id": "234567890123456",
"phone_number": "+56912345678",
"source_business_token": "<source Meta business token>"
}
'import requests
url = "https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations"
payload = {
"type": "migrate_between_solutions",
"migration_intent_id": "123456789012345",
"business_portfolio_id": "234567890123456",
"phone_number": "+56912345678",
"source_business_token": "<source Meta business token>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'migrate_between_solutions',
migration_intent_id: '123456789012345',
business_portfolio_id: '234567890123456',
phone_number: '+56912345678',
source_business_token: '<source Meta business token>'
})
};
fetch('https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations', 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.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'migrate_between_solutions',
'migration_intent_id' => '123456789012345',
'business_portfolio_id' => '234567890123456',
'phone_number' => '+56912345678',
'source_business_token' => '<source Meta business token>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations"
payload := strings.NewReader("{\n \"type\": \"migrate_between_solutions\",\n \"migration_intent_id\": \"123456789012345\",\n \"business_portfolio_id\": \"234567890123456\",\n \"phone_number\": \"+56912345678\",\n \"source_business_token\": \"<source Meta business token>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"migrate_between_solutions\",\n \"migration_intent_id\": \"123456789012345\",\n \"business_portfolio_id\": \"234567890123456\",\n \"phone_number\": \"+56912345678\",\n \"source_business_token\": \"<source Meta business token>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapso.ai/platform/v1/whatsapp/accounts/{waba_id}/partner_solution_migrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"migrate_between_solutions\",\n \"migration_intent_id\": \"123456789012345\",\n \"business_portfolio_id\": \"234567890123456\",\n \"phone_number\": \"+56912345678\",\n \"source_business_token\": \"<source Meta business token>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"migration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "migrate_between_solutions",
"source_waba_id": "<string>",
"business_portfolio_id": "<string>",
"status": "awaiting_customer_approval",
"destination_waba_id": "<string>",
"migration_intent_id": "<string>",
"phone_number_id": "<string>",
"funding_status": "funded",
"error_kind": "<string>",
"next_action": "approve_in_meta_business_suite"
}
}{
"error": "<string>"
}
