View as Markdown
## Purpose Update a single contact’s phone number (and optionally display name) within a specific contact list/tag. **Endpoint:** `POST /partners/broadcast/editSingleContact` --- ## Authentication This endpoint typically requires an access token. Use the existing variable: ```text {{access token}} ``` Add it in your request auth/header as used by your API (commonly as a Bearer token): ```http Authorization: Bearer {{access token}} ``` > If your backend expects the token in a different header/cookie, keep using the same convention used across this collection. --- ## Required Headers | Header | Value | Notes | |---|---|---| | `X-Requested-With` | `XMLHttpRequest` | Required for this endpoint. | --- ## Request Body (JSON) Send a JSON payload with the following fields: | Field | Type | Required | Notes | |---|---|---:|---| | `tag` | string | Yes | Contact list/tag identifier (e.g. contact list id). Example: `"113050"`. | `old_number` | string | Yes | Existing/old contact phone number currently stored. Must match the record to be updated. | `number` | string | Yes | New contact phone number to set. | `name` | string | No* | Contact display name. If provided, updates the name along with the number. \*If your API enforces name, treat as required. ### Notes / Tips - Use consistent phone number format (country code, leading zeros, etc.) per your system rules. - If `old_number` doesn’t match an existing contact within the given `tag`, the API may return an error or a “not found” style response. --- ## Example Request ```json { "tag": "113050", "old_number": "987654xxxx", "number": "7974758xxxx", "name": "Updated number" } ``` --- ## Example Responses > Actual response shape can vary by deployment/version. Use the saved examples on this request as the source of truth. ### Success (200) Common patterns include a success flag/message and/or updated contact info. ```json { "success": true, "message": "Contact updated successfully" } ``` ### Validation Error (400) Returned when required fields are missing/invalid. ```json { "success": false, "message": "Validation error", "errors": { "tag": "Required", "number": "Invalid number format" } } ``` ### Unauthorized (401) Returned when token is missing/invalid/expired. ```json { "success": false, "message": "Unauthorized" } ``` ### Not Found / Mismatch (404) Returned when the contact or tag cannot be found, or `old_number` does not match any contact in the list. ```json { "success": false, "message": "Contact not found" } ``` ### Conflict / Duplicate (409) Returned when the new `number` already exists in the same tag/list (depending on backend rules). ```json { "success": false, "message": "Number already exists" } ```

Headers

X-Requested-WithstringOptional

Request

This endpoint expects a string.

Response

OK
errorstring
statusboolean