feed
Add and Delete RSS Feeds for Automated Posting
Click the β€Ί in the endpoint to view details.
post
https://app.ayrshare.com/api
/feed
Add an RSS Feed

Request Examples

cURL
Node.js
Python
1
curl \
2
-H "Authorization: Bearer API_KEY" \
3
-H 'Content-Type: application/json' \
4
-d '{"url": "https://www.nytimes.com"}' \
5
-X POST https://app.ayrshare.com/api/feed
Copied!
1
const fetch = require("node-fetch");
2
const API_KEY = "API_KEY";
3
const url = "https:///www.nytimes.com";
4
​
5
fetch("https://app.ayrshare.com/api/feed", {
6
method: "DELETE",
7
headers: {
8
"Content-Type": "application/json",
9
"Authorization": `Bearer ${API_KEY}`
10
},
11
body: JSON.stringify({ url }),
12
})
13
.then((res) => res.json())
14
.then((json) => console.log(json))
15
.catch(console.error);
Copied!
1
import requests
2
​
3
payload = {'url': 'https://www.nytimes.com'}
4
headers = {'Content-Type': 'application/json',
5
'Authorization': 'Bearer API_KEY'}
6
​
7
r = requests.delete('https://app.ayrshare.com/api/feed',
8
json=payload,
9
headers=headers)
10
11
print(r.json())
Copied!
​
delete
https://app.ayrshare.com/api
/feed
Delete RSS Feed

Request Examples

cURL
Node.js
Python
1
curl \
2
-H "Authorization: Bearer API_KEY" \
3
-H 'Content-Type: application/json' \
4
-d '{"id": "4HZhptaD5"}' \
5
-X DELETE https://app.ayrshare.com/api/feed
Copied!
1
const fetch = require("node-fetch");
2
const API_KEY = "API_KEY";
3
const id = "4HZhptaD5";
4
​
5
fetch("https://app.ayrshare.com/api/feed", {
6
method: "DELETE",
7
headers: {
8
"Content-Type": "application/json",
9
"Authorization": `Bearer ${API_KEY}`
10
},
11
body: JSON.stringify({ id }),
12
})
13
.then((res) => res.json())
14
.then((json) => console.log(json))
15
.catch(console.error);
Copied!
1
import requests
2
​
3
payload = {'id': '4HZhptaD5'}
4
headers = {'Content-Type': 'application/json',
5
'Authorization': 'Bearer API_KEY'}
6
​
7
r = requests.delete('https://app.ayrshare.com/api/feed',
8
json=payload,
9
headers=headers)
10
11
print(r.json())
Copied!

POST /feed/webhook

post
https://app.ayrshare/com/api
/feed/webhook
Subscribe a Webhook
Return of webhook data of the RSS article. refId references the ID in the /user endpoint:
1
{
2
"type": "feed",
3
"refId": "140b8700bd6ade089b242d845e268fb886130c53",
4
"title": "Title of profile if available",
5
"data": { ... }
6
}
Copied!
Last modified 12d ago