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.

Add an RSS Feed

POST https://app.ayrshare.com/api/feed

Add a new RSS feed for automated posting of new articles. Posts will be automatically sent to your linked social accounts: Facebook, Twitter, LinkedIn, and Telegram. Also Instagram and Pinterest if a valid image can be found in the article.

Headers

NameTypeDescription

Authentication*

string

Format: Authorization: Bearer API_KEY. See Overview for more information.

Profile-Key

string

Profile Key of a user profile.

Request Body

NameTypeDescription

url*

string

URL of the RSS feed to add.

useFirstImage

boolean

Attempt to get the first or top image in the article and add it to the post.

autoHashtag

boolean

Automatically add up to 3 hashtags to the post tex based on the most relevant keywords.

type

string

Value: "rss", "substack", or "youtube". If not present, default to "rss"

{
    "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 \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url": "https://www.nytimes.com"}' \
-X POST https://app.ayrshare.com/api/feed

Delete RSS Feed

DELETE https://app.ayrshare.com/api/feed

Delete an RSS Feed that was previously added

Headers

NameTypeDescription

Authorization*

string

Format: Authorization: Bearer API Key. See Overview for more information.

Profile-Key

string

Profile Key of a user profile.

Request Body

NameTypeDescription

id*

string

ID of the RSS Feed returned when adding

{
    "status": "success",
    "id": "RDFbD_fl5"
}

Request Examples

curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5"}' \
-X DELETE https://app.ayrshare.com/api/feed

Get RSS Feeds

GET https://app.ayrshare.com/api/feed

Get all registered RSS feeds.

Headers

NameTypeDescription

Authorization*

string

Format: Authorization: Bearer API_KEY. See Overview for more information.

Profile-Key

string

Profile Key of a user profile.

{
{
    "status": "success",
    "feeds": [
        {
            "autoHashtag": false,
            "created": "2022-05-16T23:20:03.405Z",
            "description": "Social Media APIs that enable you to send social media posts effortlessly",
            "id": "_3yhtyd88",
            "image": {
                "height": "32",
                "link": "https://www.ayrshare.com",
                "title": "Ayrshare",
                "width": "32",
                "url": "https://www.ayrshare.com/wp-content/uploads/2020/07/cropped-ayr-icon-2FKLDFB-32x32.png"
            },
            "link": "https://www.ayrshare.com",
            "title": "Ayrshare",
            "type": "rss",
            "updated": "2022-05-16T23:20:17.124Z",
            "url": "https://www.ayrshare.com/feed/",
            "useFirstImage": true
        }
    ]
}

Request Examples

curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/feed

Update RSS Feed

PUT https://app.ayrshare.com/api/feed

Update an RSS feed.

Headers

NameTypeDescription

Authorization*

string

Format: Authorization: Bearer API_KEY. See Overview for more information.

Profile-Key

string

Profile Key of a user profile.

Request Body

NameTypeDescription

id*

string

The RSS feed id returned from the RSS feed POST endpoint.

useFirstImage

boolean

Attempt to get the first or top image in the article and add it to the post.

autoHashtag

boolean

Automatically add up to 3 hashtags to the post tex based on the most relevant keywords.

{
    "status": "success",
    "id": "vVYX3cgJ7"
}

Request Examples

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

Subscribe a Webhook

POST 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.

Path Parameters

NameTypeDescription

Authorization*

string

Format: Authorization: Bearer API Key. See Overview for more information.

Profile-Key

string

Profile Key of a user profile.

Request Body

NameTypeDescription

url*

string

URL of your webhook to call when a new RSS items is available.

{
    "status": "success"
}

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 updated