Run AI Analysis
Run optional AI analysis and save the result.
Run optional AI analysis and save the result.
Scope: email_testing.messages.write
Path Parameters
idstringrequiredThe ID of the captured message, for example d5949378-3069-4d8f-a8f3-6e5edf5d6060. You get it from List Messages or the message.received webhook. It isn't the email's Message-ID header.
Query Parameters
verbosebooleanoptionalAlso return all_symbols: every AI symbol with its probability, including ones that didn't fire.
Sample Request
Request
curl -X POST "https://api.maileroo.com/v1/email-testing/messages/d5949378-3069-4d8f-a8f3-6e5edf5d6060/analysis/ai" \
-H "Authorization: Bearer roo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json"Sample Response
The response is wrapped in a data object.
Response
{
"data": {
"id": "an_0f5e8e3d-7b6a-4d59-8c21-439bf450a1d2",
"account_id": "12345",
"message_id": "d5949378-3069-4d8f-a8f3-6e5edf5d6060",
"status": "complete",
"ai_analysis": {
"analyzer": "ai_analysis",
"status": "ok",
"ruleset_version": "2026-09-29.1",
"score": 2.8,
"max": 10,
"verdict": "low_risk",
"base": 1.5,
"adjustments": 1.26,
"critical_floor_applied": false,
"confidence": 0.81,
"low_confidence": false,
"category": {
"value": "marketing",
"confidence": 0.87,
"probabilities": {
"transactional": 0.01,
"notification": 0.02,
"newsletter": 0.09,
"marketing": 0.87,
"cold_outreach": 0.01,
"personal": 0
}
},
"rubric": [
{
"id": "r_filter_risk",
"score": 1,
"normalized": 0.25,
"level": "Inbox or promotions tab: legitimate bulk or marketing mail with nothing suspicious",
"confidence": 0.86
},
{
"id": "r_sender_clarity",
"score": 0,
"normalized": 0,
"level": "Crystal clear: sender name, brand, domains, and reason for sending all line up",
"confidence": 0.92
},
{
"id": "r_promotional_intensity",
"score": 1,
"normalized": 0.33,
"level": "Light promotion: a product mention or a single calm call to action",
"confidence": 0.81
},
{
"id": "r_content_quality",
"score": 1,
"normalized": 0.33,
"level": "Minor issues: a few typos, awkward wording, or small layout quirks",
"confidence": 0.77
},
{
"id": "r_recipient_expectation",
"score": 1,
"normalized": 0.33,
"level": "Existing relationship: communication to a known subscriber, user, or customer",
"confidence": 0.69
}
],
"symbols": [
{
"name": "AI_URGENCY",
"group": "practice",
"probability": 0.62,
"weight": 1.5,
"contribution": 0.93,
"description": "Artificial urgency to act immediately"
},
{
"name": "AI_HARD_SELL",
"group": "practice",
"probability": 0.58,
"weight": 1,
"contribution": 0.58,
"description": "Hard sell with repeated buy-now calls to action"
},
{
"name": "AI_WEAK_PREHEADER",
"group": "subject",
"probability": 0.9,
"weight": 0.5,
"contribution": 0.45,
"description": "Inbox preview text is missing or boilerplate"
},
{
"name": "AI_NO_POSTAL_ADDRESS",
"group": "compliance",
"probability": 0.84,
"weight": 0.5,
"contribution": 0.42,
"description": "Marketing email without a physical postal address"
},
{
"name": "AI_VAGUE_LINK_TEXT",
"group": "quality",
"probability": 0.74,
"weight": 0.3,
"contribution": 0.22,
"description": "Main links use vague text such as 'click here'"
},
{
"name": "AI_CLEAR_OPT_OUT",
"group": "ham",
"probability": 0.92,
"weight": -0.5,
"contribution": -0.46,
"description": "Clear unsubscribe option and sender identified in the footer"
},
{
"name": "AI_CONSISTENT_SENDER",
"group": "ham",
"probability": 0.88,
"weight": -1,
"contribution": -0.88,
"description": "Sender name, domains, and content represent one organisation"
}
],
"input": {
"state_bytes": 18432,
"limit_bytes": 30720,
"truncated": [],
"fields": {
"headers": { "original": 3184, "sent": 2210 },
"links": { "original": 1406, "sent": 1406 },
"attachments": { "original": 2, "sent": 2 },
"text": { "original": 4120, "sent": 4120 },
"html": { "original": 48211, "sent": 9876 }
}
},
"usage": {
"input_tokens": 6120,
"cost_usd": 0.000918
},
"cached": false
},
"updated_at": "2025-01-01T12:00:00Z"
}
}Errors
404 Not Found— the resource does not exist or is not owned by the account.