Skip to content

Custom Headers

Pass custom headers as a key-value object in the headers parameter when sending a message.

{
"to": ["[email protected]"],
"from": "[email protected]",
"subject": "Order confirmation",
"html_body": "<p>Your order has been confirmed.</p>",
"headers": {
"X-Order-ID": "ord_12345",
"X-Customer-ID": "cust_67890",
"List-Unsubscribe": "<mailto:[email protected]>"
}
}

These headers are automatically added by Venmail during processing:

HeaderDescription
X-Venmail-MsgIDUnique message token for tracking
X-Venmail-Spamyes or no — spam classification result
X-Venmail-Spam-ScoreNumeric spam score
X-Venmail-Spam-ThresholdThreshold used for classification
X-Venmail-Threatyes or no — threat detection result
DKIM-SignatureDKIM signature (auto-generated)

When VVS-1 signing is enabled, these headers are added automatically:

HeaderDescription
X-Venmail-AgentAgent identity (name@domain)
X-Venmail-SignatureEd25519 signature (base64url)
X-Venmail-AlgorithmAlways ed25519
X-Venmail-TimestampUnix timestamp of signing
X-Venmail-NonceRandom 16-byte hex string
X-Venmail-Content-Hashsha256= body hash (base64url)
X-Venmail-Verify-MethodOrdered verification methods

See the VVS-1 Header Reference for full details.