curl -X POST https://api.coresender.com/v1/send_email \
-u 'account_id:api_key' \
-d $'[
{
"from": {
"email": "jean.luc@example.com",
"name": "Jean-Luc Picard"
},
"to": [{
"email": "geordi@example.com",
"name": Geordi La Forge"
}],
"subject": "I need engines",
"body": {
"text": "Geordi, I need engines, now!"
}
}
]' ⏎
{
"data": [{
"message_id": "679a453d-7412-49c2-b017-40d2cc16cdf0",
"status": "accepted",
"errors": []
}],
"meta": {
"rq_time":"0.0229s"
}
}
curl 'https://api.coresender.com/v1/messages/679a453d-7412-49c2-b017-40d2cc16cdf0/events' \
-H 'authorization: Bearer oauth_access_token' ⏎
{
"data": [{
"received_at": "2020-09-07T04:49:50.268699+00:00",
"type": "open",
"details": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/42.0.2311.135 Safari\/537.36 Edge\/12.246 Mozilla\/5.0",
"user_ip": "66.249.90.138"
}
}, {
"received_at": "2020-09-07T04:49:40.509911+00:00",
"type": "delivery",
"details": {
"smtp_response": "250 2.0.0 Ok: queued as 4413621863B1"
}
}, {
"received_at": "2020-09-07T04:49:32.508000+00:00",
"type": "new",
"details": {}
}],
"meta": {
"limit": 30,
"offset": 0,
"total": 3,
"rq_time": "0.0013s"
}
}
{
"received_at": "2020-09-07T04:40:11.065+00:00",
"message_id": "b7ef43f0-3f66-2c29-a1cd-27a7d170a2e6",
"custom_id": "abcd-1234",
"recipient_email": "tasha@example.com",
"from_email": "jean.luc@example.com",
"account_id": "7b0ac968-b3e4-7d2d-8095-aa4cdd118287",
"event": "message.hard_bounce",
"smtp_response": "550 5.1.1 <tasha@example.com>: User unknown"</tasha@example.com>
}
curl -X DELETE 'https://api.coresender.com/v1/suppressions/8b3fc946-4964-11db-9138-c2f0f5b54b68' \
-H 'authorization: Bearer oauth_access_token' ⏎
{
"data": [{
"suppression_id": "8b3fc946-4964-11db-9138-c2f0f5b54b68",
"account_id": "7b0ac968-b3e4-7d2d-8095-aa4cdd118287",
"account_name": "My transactional emails",
"created_at": "2020-09-07T04:40:11.074719+00:00",
"recipient_email": "tasha@example.com",
"message_id": "b7ef43f0-3f66-2c29-a1cd-27a7d170a2e6",
"type": "hard_bounce",
"reason": ""
},
"meta": {
"rq_time": "0.0036s"
}
}