Skip to main content
PUT

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 (_id from Get WhatsApp Numbers), connected by the user who owns the API key

Request

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
required
Integration ID (the _id from Get WhatsApp Numbers), not the phone number itself.

Request Parameters

string
New AiSensy API token.
string
New WhatsApp number. Must not already be connected in another integration.

Response

string
Whatsapp integration updated successfully. The updated integration isn’t returned; use Get WhatsApp Numbers to see it.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request – Invalid Phone Number ID, an empty token or phoneNumber, or WhatsApp 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.