Key Functionality
- 13 social networks supported.
- Secure API access using your unique API Key.
- Scheduled posting to connected social media platforms.
- Automated posting based on predefined schedules.
- Support for image and video content, including Reels, Stories, and Spotlight.
- Delete posts on linked social networks.
- Comprehensive post engagement analytics (likes, shares, etc.).
- Social account metrics, including follower count and demographic data.
- Comment management: view, add, and delete post comments.
- Optional link shortening for all or specific URLs in posts.
- Unsplash integration: add specific images or randomly select based on keywords.
- Automatic hashtag generation option using relevant keywords.
- Post history tracking, including non-Ayrshare posts.
- Review management: retrieve, reply to, and delete review responses.
- RSS feed integration for automated content posting.
- Media library: upload and store photos and videos for use in posts.
- Social Post Verification System to keep your social accounts safe.
Business Plan
Business Plan features for managing multiple users and clients:- Enable users to link their own social media accounts to your platform.
- Secure single sign-on using OAuth for quick account linking.
- Create and remove user profiles programmatically through the API.
- Access advanced user analytics.
- Webhook support for real-time updates.
- Direct message management across supported platforms.
- Create Facebook ads from existing posts.
Ads API
The Ads API allows you to create Facebook ads from existing posts.- Boost posts to reach more people.
- Manage ads and track performance.
- Analyze ad spend and optimize campaigns.
Ads API
Explore the Ads API
Messages API
A unified Messaging API to engage users in conversations across the major social media channels: Facebook, Instagram, and X.- Sending text, image, and video messages.
- Retrieving complete conversation histories.
- Setting up automated message responses.
- Receiving real-time updates via webhooks for messages received, message reactions, read receipts.
Messages API
Explore the unified messaging API
Max Pack
Get even more capabilities with the Max Pack add-on:Max Pack
Unlock advanced features like AI-powered content generation, enhanced analytics, and expanded
platform support with our Max Pack add-on.
Watch How to Use the Social API
If you’re building in Node.js, check out this video on how to connect and publish posts to X and Facebook.Social API Demo
If you use Node.js see the social API demo code to get started building your own social API integration.Social API Demo
Explore our Node.js demo code to jumpstart your social API integration
Base URL
The base URL for the Ayrshare API is the same for all endpoints.https://api.ayrshare.com/api
Authorization
Ayrshare authenticates API requests via an Authorization token passed in the HTTP header. Please be sure to sendBearer
with the API Key. The API Key can be found in the Ayrshare Dashboard by switching to your Primary Profile.
If you are a Business or Enterprise user, you can create User Profiles with Profile Keys to manage multiple clients. The Profile Key is used in the header of your requests.
The API Key must also be used in the header of your requests for User Profiles.
Premium plans should only use the API Key in the header of their requests. Business and Enterprise
plans should use the Profile Key in the header of their requests when interacting on behalf of a
User Profile.
API Key Format
Authorization: Bearer API_KEY
replacing API_KEY with your Primary Profile API Key, which can be found in the Ayrshare Dashboard.
Obtain your secret API Key in the Ayrshare dashboard under the API Key page found in the left navigation panel.For example, if your API Key is 2MPXPKQ-S03M5LS-GR5RX5G-AZCK8EAYour header should include:
Authorization: Bearer 2MPXPKQ-S03M5LS-GR5RX5G-AZCK8EA
Profile Key Format
A Profile Key is used to interact on behalf of a User Profile. This is only available for Business or Enterprise plans.Profile-Key: PROFILE_KEY
replacing PROFILE_KEY with a user’s Profile Key.
Including a Profile Key in the header is required to interact on behalf of a User Profile.
A missing Primary Profile API Key or using the Profile Key in place of the API Key in the header will result in an error.
Here’s how to structure the headers for API requests:
Find the Profile Key in the Ayrshare Dashboard under the Profile Key page found in the left navigation panel.
Switch to the Profile you want to use in the User Profile page.
Additionally, the Profile Key is returned in the response of the Create a User Profile endpoint.You can then use the Profile Key in the header of your requests:For example, if your Profile Key is
AX1XGG-9jK3M5LS-GR5RX5G-LLCK8EA
Your header should include both the API and Profile Key:Authorization: Bearer 2MPXPKQ-S03M5LS-GR5RX5G-AZCK8EA
Profile-Key: AX1XGG-9jK3M5LS-GR5RX5G-LLCK8EA
Content Type
The Content Type should always be set asContent-Type: "application/json"
unless the endpoint specifically specifies otherwise.
Compression
Ayrshare supports compression for all API requests. To enable compression, set theAccept-Encoding
header to deflate, gzip, br
.
- Only responses over 1024 bytes (1KB) are compressed.
- The order of compress used: Brotli (br) first, then gzip, then deflate. Brotli is the most efficient compression algorithm.
- The response header contains the content encoding used. For example:
content-encoding: br
if Brotli was used. - Learn more about compression and the benefits of using compression in the Ayrshare Blog.
Don’t forget to properly uncompress the response using the content encoding.
ID Types
There are several types of IDs returned, which can be used in various endpoints:Ayrshare Post ID
This ID is generated by Ayrshare and returned from the /post endpoint in theid
field. This ID makes it easy
to get analytics on the post across social networks, add comments to the
post, delete the post, etc. This is the ID you will use most often.
Social Post ID
Each social network assigns their own unique ID to posts and comments. These IDs are returned in thepostIds
field of the /post or /comments endpoints.
You can use these IDs, or ones you get directly from the social networks, to retrieve data, such as with the analytics social post ID.
Ayrshare Comment ID
This ID is generated by Ayrshare and returned from the /comments endpoint in theid
field. This ID makes it easy
to get analytics on the comment across social networks, add replies to the
comment, delete the comment, etc. This is the ID you will use most often.
This is often used if you want to get details on a particular comment published via Ayrshare.
Social Comment ID
Each social network assigns their own unique ID to comments. These IDs are returned in thecommentId
field of the GET /comments endpoint.
This is often used if you want to get details on a particular comment published outside of Ayrshare.
Error Codes
Errors will return with standard HTTP status codes. For more information:HTTP Status Codes
Learn more about HTTP status codes
Ayrshare Error Codes
Learn more about Ayrshare-specific error codes
Timestamp Format
Ayrshare uses Zulu Time, also known as UTC (Coordinated Universal Time) or an ISO 8601 formatted date string, for a precise and unambiguous time references across different time zones. For example, use formatYYYY-MM-DDThh:mm:ssZ
and send as 2026-07-08T12:30:00Z
.
Please see utctime for more examples.
You can convert the UTC format to your local time in the programming language of your choice. For example in JavaScript:
Postman
You can use Postman to test your REST API calls.Postman
Learn how to use Postman with our API
Random Posts, Images, and Videos
Check out the quick start guide on how to send random posts, images, or videos when testing.Packages
We have both Node.js & Python packages, Bubble.io, Airtable, and Make guides available to make the RESTful calls easier.Node NPM Package
Integrate using our NodeJS package
Python PyPI Package
Integrate using our Python package
Airtable Guide
Learn how to use Ayrshare with Airtable
Bubble Plugin & Guide
Learn how to use Ayrshare with Bubble.io
Make Guide
Learn how to use Ayrshare with Make
Notion Guide
Learn how to use Ayrshare with Notion
FlutterFlow Guide
Learn how to use Ayrshare with FlutterFlow
Retool Guide
Learn how to use Ayrshare with Retool