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

# message_edit

POST https://api.360messenger.com/#post5
Content-Type: application/json

`whatsappId` = original message id; `editWhatsappId` = edit stanza id.

This is **not** an API you call — it is what 360Messenger **POSTs to your webhook URL**.

Reference: https://docs.360messenger.com/360-messenger-ap-is/whats-app-api-v-20/webhook/payload-samples/message-edit

## Authentication

- `Authorization` header (bearer token, required)

## Servers

- `https://api.360messenger.com` (https://api.360messenger.com, default)
- `https://webhook_url` (https://webhook_url)

## Request

### Body (application/json)

- `data` (object, required)
  - `body` (string, required)
  - `from` (string, required)
  - `type` (string, required)
  - `fromMe` (boolean, required)
  - `isGroup` (boolean, required)
  - `timestamp` (string, required)
  - `whatsappId` (string, required)
  - `editWhatsappId` (string, required)
- `event` (string, required)
- `createdAt` (string, required)
- `serviceId` (integer, required)

## Response

### 200

OK

- `data` (object, required)
  - `body` (string, required)
  - `from` (string, required)
  - `type` (string, required)
  - `fromMe` (boolean, required)
  - `isGroup` (boolean, required)
  - `timestamp` (string, required)
  - `whatsappId` (string, required)
  - `editWhatsappId` (string, required)
- `event` (string, required)
- `createdAt` (string, required)
- `serviceId` (integer, required)

## Examples

**Request**

```json
{
  "data": {
    "body": "Hello — edited text",
    "from": "447700900001",
    "type": "chat",
    "fromMe": false,
    "isGroup": false,
    "timestamp": "2026-01-15 12:37:00",
    "whatsappId": "ABCDEF0123456789AABBCCDDEEFF0011",
    "editWhatsappId": "ABCDEF0123456789AABBCCDDEEFF0031"
  },
  "event": "message_edit",
  "createdAt": "2026-01-15 12:34:56",
  "serviceId": 1001
}
```

**Response**

```json
{
  "data": {
    "body": "Hello — edited text",
    "from": "447700900001",
    "type": "chat",
    "fromMe": false,
    "isGroup": false,
    "timestamp": "2026-01-15 12:37:00",
    "whatsappId": "ABCDEF0123456789AABBCCDDEEFF0011",
    "editWhatsappId": "ABCDEF0123456789AABBCCDDEEFF0031"
  },
  "event": "message_edit",
  "createdAt": "2026-01-15 12:34:56",
  "serviceId": 1001
}
```

**SDK Code**

```python WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
import requests

url = "https://api.360messenger.com/#post5"

payload = {
    "data": {
        "body": "Hello — edited text",
        "from": "447700900001",
        "type": "chat",
        "fromMe": False,
        "isGroup": False,
        "timestamp": "2026-01-15 12:37:00",
        "whatsappId": "ABCDEF0123456789AABBCCDDEEFF0011",
        "editWhatsappId": "ABCDEF0123456789AABBCCDDEEFF0031"
    },
    "event": "message_edit",
    "createdAt": "2026-01-15 12:34:56",
    "serviceId": 1001
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
const url = 'https://api.360messenger.com/#post5';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":{"body":"Hello — edited text","from":"447700900001","type":"chat","fromMe":false,"isGroup":false,"timestamp":"2026-01-15 12:37:00","whatsappId":"ABCDEF0123456789AABBCCDDEEFF0011","editWhatsappId":"ABCDEF0123456789AABBCCDDEEFF0031"},"event":"message_edit","createdAt":"2026-01-15 12:34:56","serviceId":1001}'
};

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

```go WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
package main

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

func main() {

	url := "https://api.360messenger.com/#post5"

	payload := strings.NewReader("{\n  \"data\": {\n    \"body\": \"Hello — edited text\",\n    \"from\": \"447700900001\",\n    \"type\": \"chat\",\n    \"fromMe\": false,\n    \"isGroup\": false,\n    \"timestamp\": \"2026-01-15 12:37:00\",\n    \"whatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0011\",\n    \"editWhatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0031\"\n  },\n  \"event\": \"message_edit\",\n  \"createdAt\": \"2026-01-15 12:34:56\",\n  \"serviceId\": 1001\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
require 'uri'
require 'net/http'

url = URI("https://api.360messenger.com/#post5")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"body\": \"Hello — edited text\",\n    \"from\": \"447700900001\",\n    \"type\": \"chat\",\n    \"fromMe\": false,\n    \"isGroup\": false,\n    \"timestamp\": \"2026-01-15 12:37:00\",\n    \"whatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0011\",\n    \"editWhatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0031\"\n  },\n  \"event\": \"message_edit\",\n  \"createdAt\": \"2026-01-15 12:34:56\",\n  \"serviceId\": 1001\n}"

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

```java WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.360messenger.com/#post5")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"body\": \"Hello — edited text\",\n    \"from\": \"447700900001\",\n    \"type\": \"chat\",\n    \"fromMe\": false,\n    \"isGroup\": false,\n    \"timestamp\": \"2026-01-15 12:37:00\",\n    \"whatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0011\",\n    \"editWhatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0031\"\n  },\n  \"event\": \"message_edit\",\n  \"createdAt\": \"2026-01-15 12:34:56\",\n  \"serviceId\": 1001\n}")
  .asString();
```

```php WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.360messenger.com/#post5', [
  'body' => '{
  "data": {
    "body": "Hello — edited text",
    "from": "447700900001",
    "type": "chat",
    "fromMe": false,
    "isGroup": false,
    "timestamp": "2026-01-15 12:37:00",
    "whatsappId": "ABCDEF0123456789AABBCCDDEEFF0011",
    "editWhatsappId": "ABCDEF0123456789AABBCCDDEEFF0031"
  },
  "event": "message_edit",
  "createdAt": "2026-01-15 12:34:56",
  "serviceId": 1001
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
using RestSharp;

var client = new RestClient("https://api.360messenger.com/#post5");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"body\": \"Hello — edited text\",\n    \"from\": \"447700900001\",\n    \"type\": \"chat\",\n    \"fromMe\": false,\n    \"isGroup\": false,\n    \"timestamp\": \"2026-01-15 12:37:00\",\n    \"whatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0011\",\n    \"editWhatsappId\": \"ABCDEF0123456789AABBCCDDEEFF0031\"\n  },\n  \"event\": \"message_edit\",\n  \"createdAt\": \"2026-01-15 12:34:56\",\n  \"serviceId\": 1001\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift WhatsApp API v2.0_Webhook_Payload Samples_message_edit_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "data": [
    "body": "Hello — edited text",
    "from": "447700900001",
    "type": "chat",
    "fromMe": false,
    "isGroup": false,
    "timestamp": "2026-01-15 12:37:00",
    "whatsappId": "ABCDEF0123456789AABBCCDDEEFF0011",
    "editWhatsappId": "ABCDEF0123456789AABBCCDDEEFF0031"
  ],
  "event": "message_edit",
  "createdAt": "2026-01-15 12:34:56",
  "serviceId": 1001
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.360messenger.com/#post5")! 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()
```