feed
Feed API Endpoint: Add and delete RSS feeds for automated posting.

Feed API Endpoint

❗Click the β€Ί in the endpoint to view details.
Premium or Business plan required.
post
https://app.ayrshare.com/api
/feed
Add an RSS Feed

Request Examples

cURL
Node.js
Python
PHP
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: "POST",
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.post('https://app.ayrshare.com/api/feed',
8
json=payload,
9
headers=headers)
10
11
print(r.json())
Copied!
1
<?php
2
​
3
$curl = curl_init();
4
​
5
$data = array (
6
'url' => 'https://www.nytimes.com'
7
);
8
​
9
curl_setopt_array($curl, array(
10
CURLOPT_URL => 'https://app.ayrshare.com/api/feed',
11
CURLOPT_RETURNTRANSFER => true,
12
CURLOPT_ENCODING => '',
13
CURLOPT_MAXREDIRS => 10,
14
CURLOPT_TIMEOUT => 0,
15
CURLOPT_FOLLOWLOCATION => true,
16
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
17
CURLOPT_CUSTOMREQUEST => 'POST',
18
CURLOPT_POSTFIELDS => http_build_query($data),
19
CURLOPT_HTTPHEADER => array(
20
'Authorization: Bearer API_KEY'
21
),
22
));
23
​
24
$response = curl_exec($curl);
25
​
26
curl_close($curl);
27
echo $response;
Copied!
​
delete
https://app.ayrshare.com/api
/feed
Delete RSS Feed

Request Examples

cURL
Node.js
Python
PHP
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!
1
<?php
2
​
3
$curl = curl_init();
4
​
5
$data = array (
6
'id' => '_3yhtyd88'
7
);
8
​
9
curl_setopt_array($curl, array(
10
CURLOPT_URL => 'https://app.ayrshare.com/api/feed',
11
CURLOPT_RETURNTRANSFER => true,
12
CURLOPT_ENCODING => '',
13
CURLOPT_MAXREDIRS => 10,
14
CURLOPT_TIMEOUT => 0,
15
CURLOPT_FOLLOWLOCATION => true,
16
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
17
CURLOPT_CUSTOMREQUEST => 'DELETE',
18
CURLOPT_POSTFIELDS => http_build_query($data),
19
CURLOPT_HTTPHEADER => array(
20
'Authorization: Bearer API_KEY'
21
),
22
));
23
​
24
$response = curl_exec($curl);
25
​
26
curl_close($curl);
27
echo $response;
Copied!
get
https://app.ayrshare.com/api
/feed
Get RSS Feeds

Request Examples

cURL
Node.js
Python
PHP
C#
1
curl \
2
-H "Authorization: Bearer API_KEY" \
3
-X GET https://app.ayrshare.com/api/feed
Copied!
1
const fetch = require("node-fetch");
2
const API_KEY = "API_KEY";
3
​
4
fetch("https://app.ayrshare.com/api/feed", {
5
method: "GET",
6
headers: {
7
"Authorization": `Bearer ${API_KEY}`
8
}
9
})
10
.then((res) => res.json())
11
.then((json) => console.log(json))
12
.catch(console.error);
Copied!
1
import requests
2
​
3
headers = {'Authorization': 'Bearer API_KEY'}
4
​
5
r = requests.get('https://app.ayrshare.com/api/feed', headers=headers)
6
7
print(r.json())
Copied!
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://app.ayrshare.com/api/feed',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer API_KEY'
16
),
17
));
18
​
19
$response = curl_exec($curl);
20
​
21
curl_close($curl);
22
echo $response;
Copied!
1
using System;
2
using System.Net;
3
using System.IO;
4
​
5
namespace UserGETRequest_charp
6
{
7
class User
8
{
9
static void Main(string[] args)
10
{
11
string API_KEY = "API_KEY";
12
string url = "https://app.ayrshare.com/api/feed";
13
​
14
var httpWebRequest = WebRequest.CreateHttp(url);
15
httpWebRequest.ContentType = "application/json";
16
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
17
​
18
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
19
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
20
{
21
var response = streamReader.ReadToEnd();
22
Console.WriteLine(response);
23
}
24
}
25
}
26
}
Copied!
put
https://app.ayrshare.com/apo
/feed
Update RSS Feed

Request Examples

cURL
Node.js
Python
PHP
1
curl \
2
-H "Authorization: Bearer API_KEY" \
3
-H 'Content-Type: application/json' \
4
-d '{"id": "4HZhptaD5", "useFirstImage": true, "autoHashtag": true}' \
5
-X PUT 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: "PUT",
7
headers: {
8
"Content-Type": "application/json",
9
"Authorization": `Bearer ${API_KEY}`
10
},
11
body: JSON.stringify({ id, "useFirstImage": true, "autoHashtag": true }),
12
})
13
.then((res) => res.json())
14
.then((json) => console.log(json))
15
.catch(console.err
Copied!
1
import requests
2
​
3
payload = {'id': '4HZhptaD5', 'useFirstImage': True, 'autoHashtag': True}
4
headers = {'Content-Type': 'application/json',
5
'Authorization': 'Bearer API_KEY'}
6
​
7
r = requests.put('https://app.ayrshare.com/api/feed',
8
json=payload,
9
headers=headers)
10
11
print(r.json())
Copied!
1
<?php
2
​
3
$curl = curl_init();
4
​
5
$data = array (
6
'id' => '_3yhtyd88',
7
'useFirstImage' => false,
8
'autoHashtag' => true
9
);
10
​
11
curl_setopt_array($curl, array(
12
CURLOPT_URL => 'https://app.ayrshare.com/api/feed',
13
CURLOPT_RETURNTRANSFER => true,
14
CURLOPT_ENCODING => '',
15
CURLOPT_MAXREDIRS => 10,
16
CURLOPT_TIMEOUT => 0,
17
CURLOPT_FOLLOWLOCATION => true,
18
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
19
CURLOPT_CUSTOMREQUEST => 'PUT',
20
CURLOPT_POSTFIELDS => http_build_query($data),
21
CURLOPT_HTTPHEADER => array(
22
'Authorization: Bearer API_KEY'
23
),
24
));
25
​
26
$response = curl_exec($curl);
27
​
28
curl_close($curl);
29
echo $response;
Copied!
post
https://app.ayrshare/com/api
/feed/webhook
Subscribe a Webhook
Return of the 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 2d ago