-
Notifications
You must be signed in to change notification settings - Fork 33
Bounces
Igor Balos edited this page Nov 12, 2019
·
4 revisions
In order to manage bounces, there are many different options within Postmark API client. Check out the code examples on how to use the bounces API feature.
For these API requests you will need to use a server API token. Once you obtain it, you will need to use server API client.
let postmark = require("postmark")
const serverToken = "xxxx-xxxxx-xxxx-xxxxx-xxxxxx"
let client = new postmark.ServerClient(serverToken);
client.getDeliveryStatistics().then(result => {
console.log(result.Bounces[0].Name);
});
client.getBounces({count:1, offset:0}).then(result => {
console.log("Get Bounces");
console.log(result.Bounces[0].RecordType);
console.log(result.Bounces[0].ID);
console.log(result.Bounces.length);
});
client.getBounce(134567).then(result => {
console.log("Get Bounces by ID");
console.log(result.BouncedAt);
});
client.getBounceDump(1234567).then(result => {
console.log("Get Bounces Dump");
console.log(result.Body);
});
You can activate a bounce some of the bounced messages.
client.activateBounce(1234567).then(result => {
console.log(result.Message);
console.log(result.Bounce.ID)
});
For additional information about the capabilities of the Postmark API, see Postmark Developers Documentation.
- Overview
- Migration from older version
- Getting started
- Email sending
- Bounces
- Templates
- Templates Push
- Server
- Servers
- Message Streams
- Webhooks
- Messages
- Domains
- Sender Signatures
- Stats
- Trigger Inbound Rules
- Suppressions
- Data Removal
- Embedding images in emails
- Error Handling
- Handling Web Hooks
- Mocking requests
- Troubleshooting
- Known issues and how to resolve them