Call it
curl https://api.peume.com/v1/call/connect-whatsapp-via-credentials \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accessToken": "your accessToken",
"wabaId": "your wabaId",
"phoneNumberId": "your phoneNumberId"
}
}'const res = await fetch("https://api.peume.com/v1/call/connect-whatsapp-via-credentials", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accessToken": "your accessToken",
"wabaId": "your wabaId",
"phoneNumberId": "your phoneNumberId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/connect-whatsapp-via-credentials",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accessToken": "your accessToken",
"wabaId": "your wabaId",
"phoneNumberId": "your phoneNumberId"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: connect-whatsapp-via-credentials.
Parameters
accessTokenRequiredstringPermanent System User access token from Meta Business Suite
wabaIdRequiredstringWhatsApp Business Account ID from Meta
phoneNumberIdRequiredstringPhone Number ID from Meta WhatsApp Manager
pinstringThe 6-digit two-step verification PIN set on the number. Required if you enabled two-step verification for it, otherwise Meta rejects the Cloud API registration with error 133005 and the number cannot send messages.
oauthAppIdstringYour own WhatsApp OAuth app (see /v1/connect/oauth-apps) holding the Meta app the access token belongs to. The WABA's webhooks then go to that app's own callback URL and every delivery is checked against its app secret. Without it, deliveries come to 's shared Meta webhook.
