The REST API allows programmatic access to the functionality of Ayrshare, such as posting and deleting status updates to multiple social network simultaneously and managing your media images. Current social networks supported are Facebook, Twitter, LinkedIn, Instagram, Reddit, and Telegram.
Authorized access based on your secret API Key (obtained at ayrshare.com).
Publish posts immediately or scheduled future posts on linked social networks.
Delete posts on linked social networks.
Auto shorten links in posts or shorten specific links.
Add specific Unsplash images or randomly select an Unsplash image based on a search term.
Automatically add hashtags to your posts based on the most relevant key words.
Get history of posts and their status.
Add or delete an RSS feed for automated posted (all new feed items).
Upload media (photos and videos) to media gallery to be used in posts.
As a business member, you can manage multiple account profiles for your business or clients.
Post to multiple profile accounts with one API call.
Create and delete profiles via the API.
If you're building in Node.js, check out this video on how to connect and post to Twitter and Facebook.
​
Ayrshare authenticates API requests via an Authorization token passed in the HTTP header.
HTTP Header Format: Authorization: Bearer [API Key]
curl -H "Authorization: Bearer [API KEY]" https://app.ayrshare.com
headers: {"Authorization": "Bearer [API Key]"}
headers = {'Authorization': 'Bearer [API_KEY]'}
req.Header.Add("Authorization", "Bearer [API_KEY]")
Obtain your secret API key in the web interface.
Data should always be passed as Content-Type: "application/json"
curl -H "Content-Type: application/json" https://app.ayrshare.com
headers: {"Content-Type": "application/json"}
headers = {'Content-Type': 'application/json'}
req.Header.Add("Content-Type", "application/json; charset=UTF-8")
Errors will return with standard HTTP status codes.
For more information:
Detailed Errors are in the REST API response specific for each type of call.
For more information:
You can use Postman to test your REST API calls.
We have both Node.js, Python, and Bubble.io packages available to make the RESTful calls easier.