feed

Add and Delete RSS Feeds for Automated Posting

post
Add an RSS Feed

https://app.ayrshare.com/api/feed
Add a new RSS feed for automated posting of new articles.
Request
Response
Request
Headers
Authentication
required
string
Format: Authorization: Bearer API_KEY. See Overview for more information.
Body Parameters
type
optional
string
Value: "rss" or "substack". If not present, default to "rss"
url
required
string
URL of RSS feed
Response
200: OK
Successfull addition of RSS feed.
{
"status": "success",
"id": "4HZhptaD5",
"title": "Pulte's Money and Life Thoughts",
"websiteLink": "https://pulte.substack.com",
"rssURL": "https://pulte.substack.com/feed"
}

Request Examples

cURL
Node.js
Python
cURL
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url": "https://www.nytimes.com"}' \
-X POST https://app.ayrshare.com/api/feed
Node.js
const fetch = require("node-fetch");
const API_KEY = "API_KEY";
const url = "https:///www.nytimes.com";
fetch("https://app.ayrshare.com/api/feed", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ url }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
Python
import requests
payload = {'url': 'https://www.nytimes.com'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://app.ayrshare.com/api/feed',
json=payload,
headers=headers)
print(r.json())

delete
Delete RSS Feed

https://app.ayrshare.com/api/feed
Delete an RSS Feed that was previously added
Request
Response
Request
Headers
Authorization
optional
string
Format: Authorization: Bearer API Key. See Overview for more information.
Body Parameters
id
optional
string
ID of the RSS Feed returned when adding
Response
200: OK
Successful deletion of RSS Feed
{
"status": "success"
}

Request Examples

cURL
Node.js
Python
cURL
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5"}' \
-X DELETE https://app.ayrshare.com/api/feed
Node.js
const fetch = require("node-fetch");
const API_KEY = "API_KEY";
const id = "4HZhptaD5";
fetch("https://app.ayrshare.com/api/feed", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
Python
import requests
payload = {'id': '4HZhptaD5'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://app.ayrshare.com/api/feed',
json=payload,
headers=headers)
print(r.json())

post
Subscribe a Webhook

https://app.ayrshare/com/api/feed/webhook
Subscribe a webhook url that will be called whenever a new RSS items is available. Note: if the webhook is active, new RSS items will not be automatically posted. Deactivate the webhook by posting empty string "" in the url parameter.
Request
Response
Request
Path Parameters
Authorization
required
string
Format: Authorization: Bearer API Key. See Overview for more information.
Body Parameters
url
required
string
URL of your webhook to call when a new RSS items is available.
Response
200: OK
{
"status": "success"
}

Return of webhook data of the RSS article. refId references the ID in the /user endpoint:

{
"refId": "140b8700bd6ade089b242d845e268fb886130c53",
"title": "Title of profile if available",
"data": { ... }
}