View as Markdown
### Purpose Uploads multiple contacts into one or more contact lists in a single request. This endpoint processes each contact number entry and either **adds a new contact** or **updates the existing contact’s name** if the number already exists in the specified list. **Endpoint**: `POST https://business.me-mate.net/partners/broadcast/uploadMultiContact` --- ### Authentication This endpoint requires an authentication token. Use the existing global variable: ``` http Authorization: Bearer {{auth token}} ``` > If your API uses a different auth scheme, keep using `{{auth token}}` in the appropriate header/value format required by your backend. --- ### Required Headers ``` http X-Requested-With: XMLHttpRequest Content-Type: application/json Authorization: Bearer {{auth token}} ``` --- ### Request Body Schema (JSON) The body is a JSON object with the following structure: - `contacts` _(array, required)_: List of contact batches to upload. - Each item in `contacts`: - `contactListId` _(string, required)_: Target contact list ID. - `numbers` _(array, required)_: List of contacts (numbers) to add/update. - Each item in `numbers`: - `number` _(string, required)_: Contact phone number. - `name` _(string, required)_: Contact name. **Behavior for duplicates** - If the same `number` already exists in the given `contactListId`, the system **updates the contact name** and returns an entry under `updated`. - If it does not exist, it is created and returned under `added`. --- ### Example Request Payload ``` json { "contacts": [ { "contactListId": "112998", "numbers": [ { "number": "79747583534", "name": "Aman WABA Number" }, { "number": "79747583534", "name": "Support Team sd" } ] }, { "contactListId": "112998", "numbers": [ { "number": "8899776655", "name": "Sales Department" }, { "number": "9988776655", "name": "Marketing Team" } ] } ] } ``` --- ### Example Success Response (200) ``` json { "status": true, "msg": "Contacts processed!", "summary": { "requested": 3, "added": 2, "updated": 1, "failed": 0, "ignored_due_to_plan_limit": 0, "plan_remaining_before": 99940 }, "added": [ { "tag": "112998", "number": "8899776655", "name": "Sales Department", "unsubscribed": 0 }, { "tag": "112998", "number": "9988776655", "name": "Marketing Team", "unsubscribed": 0 } ], "updated": [ { "tag": "112998", "number": "79747583534", "old_name": "aman waba number", "new_name": "Aman WABA Number", "message": "Contact existed, name updated" } ], "failed": [], "ignored_due_to_plan_limit": [] } ``` --- ### Notes on `summary` - `requested`: Total unique contact numbers requested for processing (as counted by the backend). - `added`: Count of contacts created. - `updated`: Count of existing contacts whose name was updated. - `failed`: Count of contacts that failed to process. - `ignored_due_to_plan_limit`: Count ignored due to plan limits. - `plan_remaining_before`: Remaining plan quota before this operation ran.

Headers

X-Requested-WithstringOptional

Request

This endpoint expects a string.

Response

OK
msgstring
addedlist of objects
failedlist of any
statusboolean
summaryobject
updatedlist of objects
ignored_due_to_plan_limitlist of any