RSS Feeds
Connect RSS feeds to automatically send emails to your audience when new content is published. Veil Mail polls your feeds on a configurable schedule and sends digest or individual emails for each new item.
Create a Feed
Register an RSS or Atom feed URL and link it to an audience. New feeds start in active status and begin polling immediately.
POST /v1/feedsconst feed = await client.feeds.create({
name: 'Company Blog',
url: 'https://blog.example.com/feed.xml',
audienceId: 'audience_xxxxx',
pollInterval: 'daily',
mode: 'single',
});
console.log(feed.id); // feed_xxxxx
console.log(feed.status); // activeParameters
| Field | Type | Description |
|---|---|---|
| name | string | Display name for the feed |
| url | string | RSS or Atom feed URL |
| audienceId | string | Target audience for emails |
| pollInterval | string | hourly, daily, or weekly |
| mode | string | single (one email per item) or digest (all new items in one email) |
List Feeds
GET /v1/feedsconst { data } = await client.feeds.list();
for (const feed of data) {
console.log(`${feed.name} (${feed.status}) — polls ${feed.pollInterval}`);
}Get a Feed
Retrieve a single feed by ID. The response includes the most recent items discovered by the poller.
GET /v1/feeds/:idconst feed = await client.feeds.get('feed_xxxxx');
console.log(feed.name);
console.log(feed.lastPolledAt);
console.log(`${feed.recentItems.length} recent items`);Update and Delete
Update a Feed
PUT /v1/feeds/:idconst feed = await client.feeds.update('feed_xxxxx', {
pollInterval: 'hourly',
mode: 'digest',
});Delete a Feed
Deleting a feed removes it and all its stored items permanently.
DELETE /v1/feeds/:idconst { deleted } = await client.feeds.delete('feed_xxxxx');
console.log(deleted); // trueFeed Actions
Control feed polling and lifecycle with these actions.
Manual Poll
Trigger an immediate poll regardless of the configured schedule.
POST /v1/feeds/:id/pollconst result = await client.feeds.poll('feed_xxxxx');
console.log(`Found ${result.newItems} new items`);Pause and Resume
POST /v1/feeds/:id/pausePOST /v1/feeds/:id/resume// Pause polling
const paused = await client.feeds.pause('feed_xxxxx');
console.log(paused.status); // paused
// Resume polling (also works for feeds in error state)
const resumed = await client.feeds.resume('feed_xxxxx');
console.log(resumed.status); // activeFeed Items
Each time the poller discovers new content, it creates feed items. You can list items with pagination and filter by processing status.
GET /v1/feeds/:id/items// List all items
const { data, hasMore } = await client.feeds.listItems('feed_xxxxx', {
limit: 20,
});
// List only unprocessed items
const pending = await client.feeds.listItems('feed_xxxxx', {
processed: false,
});
for (const item of data) {
console.log(`${item.title} — published ${item.publishedAt}`);
}Feed Status
| Status | Description |
|---|---|
active | Polling on schedule and sending emails |
paused | Polling suspended; can be resumed |
error | Feed URL unreachable or invalid; use resume to retry |
Requires the feed:read scope for read operations and feed:write scope for mutations.