Register a phone number with WhatsApp Business
curl --request POST \
--url https://api.social-api.ai/v1/platforms/whatsapp/phone-numbers/{id}/register \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pin": "123456"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pin: '123456'})
};
fetch('https://api.social-api.ai/v1/platforms/whatsapp/phone-numbers/{id}/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/whatsapp/phone-numbers/{id}/register"
payload = { "pin": "123456" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}WhatsApp
Register a phone number with WhatsApp Business
Registers a previously verified phone number with WhatsApp Business and sets the 6-digit two-step verification PIN. The phone number must be verified via verify-code first. The PIN must be retained by the caller: losing it triggers a mandatory 7-day wait before it can be reset. A number that stays on the WhatsApp Business app is already registered and is refused with 409 whatsapp.business_app_number.
POST
/
platforms
/
whatsapp
/
phone-numbers
/
{id}
/
register
Register a phone number with WhatsApp Business
curl --request POST \
--url https://api.social-api.ai/v1/platforms/whatsapp/phone-numbers/{id}/register \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pin": "123456"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pin: '123456'})
};
fetch('https://api.social-api.ai/v1/platforms/whatsapp/phone-numbers/{id}/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/whatsapp/phone-numbers/{id}/register"
payload = { "pin": "123456" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
Connected account ID (sapi_acc_...)
Body
application/json
6-digit two-step verification PIN
PIN is the 6-digit two-step verification PIN to set on the phone number. This PIN is required for future re-registration and must be stored securely.
Example:
"123456"
Response
Phone number registered