Change Phone Number
Change client phone number. Old number becomes unavailable, all future messages are sent to the new number.
POST
/api/v1/change_phoneRequest Headers
| Header | Value | Required |
|---|---|---|
| X-API-Key | string | Yes |
| Content-Type | application/json | Yes |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| old_phone | string | Yes | Current client phone number |
| new_phone | string | Yes | New phone number in international format |
Response Body
json
{"status":"accepted","event_id":"550e8400-e29b-41d4-a716-446655440000"}Examples
bash
curl -X POST /api/v1/change_phone \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"old_phone": "12345678901",
"new_phone": "12345678902"
}'| Code | Message | Description |
|---|---|---|
| 202 | Accepted | Message accepted into processing queue |
| 401 | Unauthorized | Invalid or missing X-API-Key |
| 429 | Rate Limit | Too many requests |
| 500 | Internal Error | Server-side error |