API Overview

Powerful APIs that enable you to send social media posts effortlessly. For developers and businesses of all sizes.

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.

Key Functionality

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

Business Plan

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.

Watch How to Use the API

If you're building in Node.js, check out this video on how to connect and post to Twitter and Facebook.

‚Äč

Authentication

Ayrshare authenticates API requests via an Authorization token passed in the HTTP header.

HTTP Header Format: Authorization: Bearer [API Key]

cURL
Node.js
Python
Go
cURL
curl -H "Authorization: Bearer [API KEY]" https://app.ayrshare.com
Node.js
headers: {"Authorization": "Bearer [API Key]"}
Python
headers = {'Authorization': 'Bearer [API_KEY]'}
Go
req.Header.Add("Authorization", "Bearer [API_KEY]")

Obtain your secret API key in the web interface.

Content-Type

Data should always be passed as Content-Type: "application/json"

cURL
Node.js
Python
Go
cURL
curl -H "Content-Type: application/json" https://app.ayrshare.com
Node.js
headers: {"Content-Type": "application/json"}
Python
headers = {'Content-Type': 'application/json'}
Go
req.Header.Add("Content-Type", "application/json; charset=UTF-8")

Error Codes

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:

Postman

You can use Postman to test your REST API calls.

Packages

We have both Node.js, Python, and Bubble.io packages available to make the RESTful calls easier.