curl --location --request PUT 'https://api.weya.live/backend/api/whatsapp/update-integration/6891f1d0c45d123456789abc' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"token": "NEW_AISENSY_API_TOKEN"
}'
{
"status": true,
"code": 200,
"message": "Whatsapp integration updated successfully",
"errorMessage": null,
"data": []
}
WhatsApp
Update WhatsApp Integration
Change the number or AiSensy token of a connected WhatsApp integration.
PUT
/
api
/
whatsapp
/
update-integration
/
{phoneNumberId}
curl --location --request PUT 'https://api.weya.live/backend/api/whatsapp/update-integration/6891f1d0c45d123456789abc' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"token": "NEW_AISENSY_API_TOKEN"
}'
{
"status": true,
"code": 200,
"message": "Whatsapp integration updated successfully",
"errorMessage": null,
"data": []
}
Overview
Update the phone number or AiSensy token of one of your WhatsApp integrations. Send only the fields you want to change. The new values are saved as sent and aren’t checked with AiSensy, so check them first with Validate WhatsApp Number.Prerequisites
- An API key for your workspace
- The integration ID (
_idfrom Get WhatsApp Numbers), connected by the user who owns the API key
Request
curl --location --request PUT 'https://api.weya.live/backend/api/whatsapp/update-integration/6891f1d0c45d123456789abc' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"token": "NEW_AISENSY_API_TOKEN"
}'
Request Parameters
Response
{
"status": true,
"code": 200,
"message": "Whatsapp integration updated successfully",
"errorMessage": null,
"data": []
}
Whatsapp integration updated successfully. The updated integration isn’t returned; use Get WhatsApp Numbers to see it.Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Invalid Phone Number ID, an emptytokenorphoneNumber, orWhatsApp integration already exists for this phone number. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
WhatsApp integration not found: it doesn’t exist or wasn’t connected by the user who owns the API key. - 429 Too Many Requests – More than 1,000 WhatsApp requests in 15 minutes from your IP address.
- 500 Internal Server Error – Unexpected server error.
Was this page helpful?

