Update Email Message Status
Immutable Catalog Entry
This descriptor comes from the active versioned Portal catalog.
- Contract tier:
agent_ready - Risk:
write - Catalog version:
2026-07-12.2 - Descriptor hash:
0f8f11461e29849b063937200c43b9790d5e16e03fee0b028c86b52be944a196
Update delivery events, per-recipient statuses, or the overall status for a GHL email sent through a custom conversation provider. GHL category: Conversations / Email. This does not work for LC Email or Mailgun messages and requires the app to own the original custom conversation provider. Requires explicit confirmation.
Request Body
{
"jsonrpc": "2.0",
"id": "ghl-update-email-message-status-example",
"method": "tools/call",
"params": {
"name": "ghl.update_email_message_status",
"arguments": {
"emailMessageId": "emailMessageId_123",
"confirmApply": "confirmApply_example",
"events": {},
"status": "pending",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"recipients": [],
"strictTenant": false
}
}
}
Arguments Schema
{
"type": "object",
"required": [
"emailMessageId",
"confirmApply"
],
"properties": {
"events": {
"type": "object",
"properties": {
"opened": {
"type": "number",
"minimum": 0,
"description": "Opened event counter."
},
"clicked": {
"type": "number",
"minimum": 0,
"description": "Clicked event counter."
},
"replied": {
"type": "number",
"minimum": 0,
"description": "Reply event counter."
},
"accepted": {
"type": "number",
"minimum": 0,
"description": "Accepted event counter."
},
"delivered": {
"type": "number",
"minimum": 0,
"description": "Delivered event counter."
},
"complained": {
"type": "number",
"minimum": 0,
"description": "Complaint event counter."
},
"unsubscribed": {
"type": "number",
"minimum": 0,
"description": "Unsubscribe event counter."
},
"permanent_fail": {
"type": "number",
"minimum": 0,
"description": "Permanent failure event counter."
},
"temporary_fail": {
"type": "number",
"minimum": 0,
"description": "Temporary failure event counter."
}
},
"description": "Optional aggregate delivery event counters. GHL merges counters into existing values. Zero is treated by GHL as a no-op, not a reset.",
"additionalProperties": {
"type": "number",
"minimum": 0
}
},
"status": {
"enum": [
"pending",
"scheduled",
"sent",
"delivered",
"read",
"undelivered",
"connected",
"failed",
"opened",
"clicked",
"opt_out",
"accepted",
"permanent_fail",
"temporary_fail",
"complained",
"unsubscribed",
"replied"
],
"type": "string",
"description": "Optional overall MessageStatus value for the email message."
},
"tenantId": {
"type": "string",
"description": "Tenant ID from list_tenants."
},
"locationId": {
"type": "string",
"description": "Optional GHL location ID. If provided, it must match the authenticated runtime location; it is not forwarded unless GHL documents it for this operation."
},
"recipients": {
"type": "array",
"items": {
"type": "object",
"required": [
"email",
"status"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "Recipient email address."
},
"status": {
"enum": [
"pending",
"scheduled",
"sent",
"delivered",
"read",
"undelivered",
"connected",
"failed",
"opened",
"clicked",
"opt_out",
"accepted",
"permanent_fail",
"temporary_fail",
"complained",
"unsubscribed",
"replied"
],
"type": "string",
"description": "Recipient MessageStatus value."
},
"failReason": {
"type": "string",
"description": "Bounce or rejection reason when status is failed."
}
},
"additionalProperties": false
},
"description": "Optional per-recipient delivery statuses. Use failReason when status is failed. Email addresses are forwarded to GHL and are omitted from default MCP output."
},
"confirmApply": {
"type": "string",
"description": "Required before updating provider delivery status. Set exactly to \"CONFIRM APPLY\" only after the user explicitly confirms the status event update."
},
"strictTenant": {
"type": "boolean",
"default": true,
"description": "Require tenantId to match locationId routing (default: true)."
},
"emailMessageId": {
"type": "string",
"description": "GHL email message ID in the official /conversations/messages/email/:emailMessageId/status path."
}
},
"additionalProperties": false
}
Output Schema
{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the GHL MCP operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Tool-specific GHL or local navigation result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe execution, routing, and timing metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe error details when ok is false; credential values are never returned."
}
},
"description": "Normalized GHL MCP response envelope.",
"additionalProperties": false
}
Code Examples
- cURL
- Node.js
- Python
curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "ghl-update-email-message-status-example",
"method": "tools/call",
"params": {
"name": "ghl.update_email_message_status",
"arguments": {
"emailMessageId": "emailMessageId_123",
"confirmApply": "confirmApply_example",
"events": {},
"status": "pending",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"recipients": [],
"strictTenant": false
}
}
}'
const response = await fetch('https://portal.madpanda3d.com/api/mcp', {
method: 'POST',
headers: {
Authorization: 'Bearer mad_live_***',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "ghl-update-email-message-status-example",
"method": "tools/call",
"params": {
"name": "ghl.update_email_message_status",
"arguments": {
"emailMessageId": "emailMessageId_123",
"confirmApply": "confirmApply_example",
"events": {},
"status": "pending",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"recipients": [],
"strictTenant": false
}
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = 'https://portal.madpanda3d.com/api/mcp'
headers = {
'Authorization': 'Bearer mad_live_***',
'Content-Type': 'application/json',
}
payload = {
"jsonrpc": "2.0",
"id": "ghl-update-email-message-status-example",
"method": "tools/call",
"params": {
"name": "ghl.update_email_message_status",
"arguments": {
"emailMessageId": "emailMessageId_123",
"confirmApply": "confirmApply_example",
"events": {},
"status": "pending",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"recipients": [],
"strictTenant": false
}
}
}
response = requests.post(url, headers=headers, json=payload, timeout=60)
print(response.json())
Example Responses
- 200 Success
- 502 Upstream Error
{
"ok": true,
"message": "Tool ghl.update_email_message_status executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}
{
"ok": false,
"classification": "upstream_http_error",
"message": "Upstream MCP returned a non-success status."
}