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
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
const fetch = require("node-fetch");
const API_KEY = "API_KEY";
const url = "https:///www.nytimes.com";
​
fetch("https://app.ayrshare.com/api/feed", {
method: "POST",
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);
import requests
​
payload = {'url': 'https://www.nytimes.com'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
​
r = requests.post('https://app.ayrshare.com/api/feed',
json=payload,
headers=headers)
print(r.json())
<?php
​
$curl = curl_init();
​
$data = array (
'url' => 'https://www.nytimes.com'
);
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.ayrshare.com/api/feed',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY'
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;
​
delete
https://app.ayrshare.com/api
/feed
Delete RSS Feed

Request Examples

cURL
Node.js
Python
PHP
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5"}' \
-X DELETE https://app.ayrshare.com/api/feed
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);
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())
<?php
​
$curl = curl_init();
​
$data = array (
'id' => '_3yhtyd88'
);
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.ayrshare.com/api/feed',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY'
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;
get
https://app.ayrshare.com/api
/feed
Get RSS Feeds

Request Examples

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

Request Examples

cURL
Node.js
Python
PHP
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5", "useFirstImage": true, "autoHashtag": true}' \
-X PUT https://app.ayrshare.com/api/feed
const fetch = require("node-fetch");
const API_KEY = "API_KEY";
const id = "4HZhptaD5";
​
fetch("https://app.ayrshare.com/api/feed", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id, "useFirstImage": true, "autoHashtag": true }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.err
import requests
​
payload = {'id': '4HZhptaD5', 'useFirstImage': True, 'autoHashtag': True}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
​
r = requests.put('https://app.ayrshare.com/api/feed',
json=payload,
headers=headers)
print(r.json())
<?php
​
$curl = curl_init();
​
$data = array (
'id' => '_3yhtyd88',
'useFirstImage' => false,
'autoHashtag' => true
);
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.ayrshare.com/api/feed',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY'
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;
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:
{
"type": "feed",
"refId": "140b8700bd6ade089b242d845e268fb886130c53",
"title": "Title of profile if available",
"data": { ... }
}
Last modified 3mo ago
Copy link
On this page
Feed API Endpoint
post
Add an RSS Feed
Request Examples
delete
Delete RSS Feed
Request Examples
get
Get RSS Feeds
Request Examples
put
Update RSS Feed
Request Examples
post
Subscribe a Webhook