Create a key to copy examples filled with your team.
Send emails with HTTP
Queue a message with curl and a Bearer token.
Queue a message with POST /api/v1/teams/:team_id/clusters/:cluster_id/sends. Send Authorization: Bearer and a JSON send object. A successful response includes queued and message_id.
HTTP inject is the other HTTP path. POST {http_endpoint}/api/inject/v1 with HTTP Basic using the SMTP username and password.
send.sh
1
curl -sS -X POST \
2
-H 'Authorization: Bearer YOUR_API_KEY' \
3
-H 'Content-Type: application/json' \
4
-d '{
5
"send": {
6
"from": "hello@mail.example.com",
7
"to": ["you@example.com"],
8
"subject": "PostShiba test",
9
"text": "hello from PostShiba",
10
"html": "<p>hello from PostShiba</p>",
11
"unique_args": {"campaign_id": "cmp_123", "site": "docs"}
12
}
13
}' \
14
https://postshiba.com/api/v1/teams/1/clusters/4/sends