Mail API
Send email from your system through Pcampus.
Base URL: https://mail-api.pcampus.co
How to connect
POST https://mail-api.pcampus.co/v1/mail/send
Authorization: Bearer pip_YOUR_API_KEY
x-tenant-id: your-tenant-id
Content-Type: application/jsonSample request
{
"to": "alex@example.com",
"templateId": "order_confirm",
"variables": {
"customerName": "Alex",
"orderId": "ORD-1001"
}
}Sample response
{
"messageId": "msg_001",
"status": "queued"
}| Status | When |
|---|---|
202 / 200 | Queued |
401 | Invalid token |
400 | Missing recipient or template |
Create the template in Console first, then pass templateId in the request.