Appearance
Create Bundle
FreshPOST /v1/bundles
Creates a new bundle. You can create an empty bundle and add feeds later, or include feed IDs at creation time.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the bundle |
feeds | array | No | Array of feed ID strings to include at creation |
Code Examples
Create an empty bundle:
js
const axios = require('axios');
const apiClient = axios.create({
baseURL: 'https://api.rss.app/v1',
headers: {
Authorization: 'Bearer YOUR_API_KEY:YOUR_API_SECRET',
'Content-Type': 'application/json',
},
});
const response = await apiClient.post('/bundles', {
name: 'Technology News',
});
const bundle = response.data;
console.log('Bundle ID:', bundle.id);
console.log('RSS URL:', bundle.rss_feed_url);
console.log('Feed count:', bundle.feeds.length); // 0Create a bundle with existing feeds:
js
const response = await apiClient.post('/bundles', {
name: 'Technology News',
feeds: ['feed_abc123', 'feed_def456', 'feed_ghi789'],
});
const bundle = response.data;
console.log('Bundle ID:', bundle.id);
console.log('RSS URL:', bundle.rss_feed_url);
console.log('Feed count:', bundle.feeds.length); // 3Create feeds and bundle them together:
js
async function createBundleWithFeeds(bundleName, websiteUrls) {
// Create all feeds in parallel
const feedPromises = websiteUrls.map((url) =>
apiClient.post('/feeds', { url }).then((r) => r.data.id)
);
const feedIds = await Promise.all(feedPromises);
console.log(`Created ${feedIds.length} feeds`);
// Create bundle with all feed IDs
const bundleResponse = await apiClient.post('/bundles', {
name: bundleName,
feeds: feedIds,
});
return bundleResponse.data;
}
const bundle = await createBundleWithFeeds('Client News', [
'https://clientsite.com/news',
'https://industry-blog.com',
'https://trade-publication.com',
]);
console.log('Bundle ready:', bundle.rss_feed_url);Response
HTTP 200 with the full bundle object.
json
{
"id": "bundle_xyz789",
"name": "Technology News",
"description": null,
"icon": null,
"rss_feed_url": "https://rss.app/feeds/bundle-id.xml",
"feeds": ["feed_abc123", "feed_def456"],
"items": [ ... ]
}Error Responses
| Status | Meaning |
|---|---|
| 400 | Missing name field or invalid feed ID in feeds array |
| 401 | Authentication failed |
| 402 | Bundle creation limit reached for your plan |