> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.me-mate.net/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.me-mate.net/_mcp/server.

# https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts

POST https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts
Content-Type: application/json

## Purpose

Add one or more tags to one or more contacts (phone numbers) within a specific contact list. The API queues a background job to apply the requested tags.

## Endpoint

`POST https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts`

## Auth / Variables

This endpoint uses an API key passed in the request body.

* `{{api_key}}` (string): Your API key.

## Headers

| Header             | Value            | Notes                                      |
| ------------------ | ---------------- | ------------------------------------------ |
| `X-Requested-With` | `XMLHttpRequest` | Required by the backend for this endpoint. |

## Request Body

**Content-Type:** `application/json` (raw JSON body)

### Schema

```json
{
  "api_key": "string",
  "contacts": [
    {
      "contactListId": "string",
      "numbers": ["string"],
      "tagAdd": [0]
    }
  ]
}

```

### Field notes

* `api_key` *(string, required)*: Use `{{api_key}}`.

* `contacts` *(array, required)*: List of contact-tag operations.

  * `contactListId` *(string, required)*: Target contact list ID.

  * `numbers` *(string\[], required)*: One or more phone numbers to tag.

  * `tagAdd` *(number\[], required)*: One or more tag IDs to add.

### Example

```json
{
  "api_key": "{{api_key}}",
  "contacts": [
    {
      "contactListId": "113056",
      "numbers": [
        "91913632xxxx",
        "91888877xxxx"
      ],
      "tagAdd": [
        274,
        275
      ]
    }
  ]
}

```

## Example Success Response (200)

```json
{
  "status": true,
  "msg": "Tag add jobs queued",
  "queued_jobs": 1,
  "skipped_items": 0
}

```

## Notes

* A successful response indicates the tagging job(s) were queued; the tag application may complete asynchronously.

Reference: https://apidocs.me-mate.net/business-me-mate-net-ap-is-document-v-1-0/manage-contact/add-remove-tags-to-contact-number/add/https-business-me-mate-net-api-betav-3-tagmanage-tag-add-tag-to-contacts

## Request

### Headers

- `X-Requested-With` (string, optional)

### Body (application/json)

- `api_key` (string, required)
- `contacts` (list of object, required)
  - `tagAdd` (list of integer, required)
  - `numbers` (list of string, required)
  - `contactListId` (string, required)

## Response

### 200

OK

- `msg` (string, required)
- `status` (boolean, required)
- `queued_jobs` (integer, required)
- `skipped_items` (integer, required)

## Examples

**Request**

```json
{
  "api_key": "a1b2c3d4e5f67890abcdef1234567890",
  "contacts": [
    {
      "tagAdd": [
        274,
        275
      ],
      "numbers": [
        "919136321234",
        "918888771234"
      ],
      "contactListId": "113056"
    }
  ]
}
```

**Response**

```json
{
  "msg": "Tag add jobs queued",
  "status": true,
  "queued_jobs": 1,
  "skipped_items": 0
}
```

**SDK Code**

```python
import requests

url = "https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts"

payload = {
    "api_key": "a1b2c3d4e5f67890abcdef1234567890",
    "contacts": [
        {
            "tagAdd": [274, 275],
            "numbers": ["919136321234", "918888771234"],
            "contactListId": "113056"
        }
    ]
}
headers = {
    "X-Requested-With": "XMLHttpRequest",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts';
const options = {
  method: 'POST',
  headers: {'X-Requested-With': 'XMLHttpRequest', 'Content-Type': 'application/json'},
  body: '{"api_key":"a1b2c3d4e5f67890abcdef1234567890","contacts":[{"tagAdd":[274,275],"numbers":["919136321234","918888771234"],"contactListId":"113056"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts"

	payload := strings.NewReader("{\n  \"api_key\": \"a1b2c3d4e5f67890abcdef1234567890\",\n  \"contacts\": [\n    {\n      \"tagAdd\": [\n        274,\n        275\n      ],\n      \"numbers\": [\n        \"919136321234\",\n        \"918888771234\"\n      ],\n      \"contactListId\": \"113056\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Requested-With", "XMLHttpRequest")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Requested-With"] = 'XMLHttpRequest'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"api_key\": \"a1b2c3d4e5f67890abcdef1234567890\",\n  \"contacts\": [\n    {\n      \"tagAdd\": [\n        274,\n        275\n      ],\n      \"numbers\": [\n        \"919136321234\",\n        \"918888771234\"\n      ],\n      \"contactListId\": \"113056\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts")
  .header("X-Requested-With", "XMLHttpRequest")
  .header("Content-Type", "application/json")
  .body("{\n  \"api_key\": \"a1b2c3d4e5f67890abcdef1234567890\",\n  \"contacts\": [\n    {\n      \"tagAdd\": [\n        274,\n        275\n      ],\n      \"numbers\": [\n        \"919136321234\",\n        \"918888771234\"\n      ],\n      \"contactListId\": \"113056\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts', [
  'body' => '{
  "api_key": "a1b2c3d4e5f67890abcdef1234567890",
  "contacts": [
    {
      "tagAdd": [
        274,
        275
      ],
      "numbers": [
        "919136321234",
        "918888771234"
      ],
      "contactListId": "113056"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Requested-With' => 'XMLHttpRequest',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Requested-With", "XMLHttpRequest");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"api_key\": \"a1b2c3d4e5f67890abcdef1234567890\",\n  \"contacts\": [\n    {\n      \"tagAdd\": [\n        274,\n        275\n      ],\n      \"numbers\": [\n        \"919136321234\",\n        \"918888771234\"\n      ],\n      \"contactListId\": \"113056\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Requested-With": "XMLHttpRequest",
  "Content-Type": "application/json"
]
let parameters = [
  "api_key": "a1b2c3d4e5f67890abcdef1234567890",
  "contacts": [
    [
      "tagAdd": [274, 275],
      "numbers": ["919136321234", "918888771234"],
      "contactListId": "113056"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://business.me-mate.net/api/betav3/tagmanage/tag/addTagToContacts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```