> 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/update

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

Updates an existing tag (name, access scope, and optional description) in the MessengerMate Tag Management API.

**Method & URL**\
`POST https://business.me-mate.net/api/betav3/tagmanage/tag/update`

## Authentication

This endpoint expects an API key sent in the request body.

* `api_key` (string, **required**) — Use the Postman variable `{{api_key}}`.

If the API key is missing/invalid, the API will likely return **401 Unauthorized** or **403 Forbidden**.

## Required headers

* `X-Requested-With: XMLHttpRequest`

## Request body (JSON)

Send a JSON object with the following fields:

| Field            | Type    | Required | Description                            | Allowed / Validation                       |
| ---------------- | ------- | -------- | -------------------------------------- | ------------------------------------------ |
| `api_key`        | string  | Yes      | API key used to authorize the request. | Must be valid.                             |
| `tag_id`         | integer | Yes      | The ID of the tag to update.           | Must refer to an existing tag.             |
| `tag_name`       | string  | No       | Updated tag name.                      | If provided, should be a non-empty string. |
| `access_type`    | string  | No       | Visibility/scope of the tag.           | Enum: `private`                            |
| `TagDescription` | string  | No       | Short description for the tag.         | Max length **255** characters              |

### Notes / validation rules

* `TagDescription` must be **≤ 255** characters.

* `access_type` must be one of: `private`, `public`, `admin`.

* If validation fails, the API will likely return **422 Unprocessable Entity**.

## Example request

```json
{
  "api_key": "{{api_key}}",
  "tag_id": 275,
  "tag_name": "New Customer changed",
  "access_type": "private",
  "TagDescription": "Short description about the tag"
}

```

## Example success response (200)

```json
{
  "message": "Tag updated successfully",
  "data": {
    "tag_name": "New Customer changed",
    "tag_id": 275
  }
}

```

## Likely error responses

* **401 Unauthorized** — Missing/invalid `api_key`.

* **403 Forbidden** — API key does not have permission to update tags.

* **422 Unprocessable Entity** — Validation errors (e.g., invalid `access_type`, `TagDescription` > 255, missing required fields).

Reference: https://apidocs.me-mate.net/business-me-mate-net-ap-is-document-v-1-0/manage-contact/create-edit-tag/edit/https-business-me-mate-net-api-betav-3-tagmanage-tag-update

## Request

### Headers

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

### Body (application/json)

- `string`

## Response

### 200

OK

- `data` (object, required)
  - `tag_id` (integer, required)
  - `tag_name` (string, required)
- `message` (string, required)

## Examples

**Request**

```json
"{\r\n  \"api_key\": \"{{api_key}} \", // required\r\n  \"tag_id\": 275,                // required\r\n  \"tag_name\": \"New Customer changed\",          // optional, integer\r\n  \"access_type\": \"private\",    // optional: \"private\" | \"public\" | \"admin\"\r\n  \"TagDescription\": \"Short description about the tag\" // optional, max 255 chars\r\n}"
```

**Response**

```json
{
  "data": {
    "tag_id": 275,
    "tag_name": "New Customer changed"
  },
  "message": "Tag updated successfully"
}
```

**SDK Code**

```python
import requests

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

payload = "{
  \"api_key\": \"{{api_key}} \", // required
  \"tag_id\": 275,                // required
  \"tag_name\": \"New Customer changed\",          // optional, integer
  \"access_type\": \"private\",    // optional: \"private\" | \"public\" | \"admin\"
  \"TagDescription\": \"Short description about the tag\" // optional, max 255 chars
}"
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/update';
const options = {
  method: 'POST',
  headers: {'X-Requested-With': 'XMLHttpRequest', 'Content-Type': 'application/json'},
  body: '"{\r\n  \"api_key\": \"{{api_key}} \", // required\r\n  \"tag_id\": 275,                // required\r\n  \"tag_name\": \"New Customer changed\",          // optional, integer\r\n  \"access_type\": \"private\",    // optional: \"private\" | \"public\" | \"admin\"\r\n  \"TagDescription\": \"Short description about the tag\" // optional, max 255 chars\r\n}"'
};

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/update"

	payload := strings.NewReader("\"{\\r\\n  \\\"api_key\\\": \\\"{{api_key}} \\\", // required\\r\\n  \\\"tag_id\\\": 275,                // required\\r\\n  \\\"tag_name\\\": \\\"New Customer changed\\\",          // optional, integer\\r\\n  \\\"access_type\\\": \\\"private\\\",    // optional: \\\"private\\\" | \\\"public\\\" | \\\"admin\\\"\\r\\n  \\\"TagDescription\\\": \\\"Short description about the tag\\\" // optional, max 255 chars\\r\\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/update")

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 = "\"{\\r\\n  \\\"api_key\\\": \\\"{{api_key}} \\\", // required\\r\\n  \\\"tag_id\\\": 275,                // required\\r\\n  \\\"tag_name\\\": \\\"New Customer changed\\\",          // optional, integer\\r\\n  \\\"access_type\\\": \\\"private\\\",    // optional: \\\"private\\\" | \\\"public\\\" | \\\"admin\\\"\\r\\n  \\\"TagDescription\\\": \\\"Short description about the tag\\\" // optional, max 255 chars\\r\\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/update")
  .header("X-Requested-With", "XMLHttpRequest")
  .header("Content-Type", "application/json")
  .body("\"{\\r\\n  \\\"api_key\\\": \\\"{{api_key}} \\\", // required\\r\\n  \\\"tag_id\\\": 275,                // required\\r\\n  \\\"tag_name\\\": \\\"New Customer changed\\\",          // optional, integer\\r\\n  \\\"access_type\\\": \\\"private\\\",    // optional: \\\"private\\\" | \\\"public\\\" | \\\"admin\\\"\\r\\n  \\\"TagDescription\\\": \\\"Short description about the tag\\\" // optional, max 255 chars\\r\\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/update', [
  'body' => '"{\\r\\n  \\"api_key\\": \\"{{api_key}} \\", // required\\r\\n  \\"tag_id\\": 275,                // required\\r\\n  \\"tag_name\\": \\"New Customer changed\\",          // optional, integer\\r\\n  \\"access_type\\": \\"private\\",    // optional: \\"private\\" | \\"public\\" | \\"admin\\"\\r\\n  \\"TagDescription\\": \\"Short description about the tag\\" // optional, max 255 chars\\r\\n}"',
  '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/update");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Requested-With", "XMLHttpRequest");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\r\\n  \\\"api_key\\\": \\\"{{api_key}} \\\", // required\\r\\n  \\\"tag_id\\\": 275,                // required\\r\\n  \\\"tag_name\\\": \\\"New Customer changed\\\",          // optional, integer\\r\\n  \\\"access_type\\\": \\\"private\\\",    // optional: \\\"private\\\" | \\\"public\\\" | \\\"admin\\\"\\r\\n  \\\"TagDescription\\\": \\\"Short description about the tag\\\" // optional, max 255 chars\\r\\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\": \"{{api_key}} \", // required
  \"tag_id\": 275,                // required
  \"tag_name\": \"New Customer changed\",          // optional, integer
  \"access_type\": \"private\",    // optional: \"private\" | \"public\" | \"admin\"
  \"TagDescription\": \"Short description about the tag\" // optional, max 255 chars
}" 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/update")! 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()
```