Powerful Social APIs that enable you to send social media posts and get analytics effortlessly. For developers and businesses of all sizes.
https://api.ayrshare.com/api
Bearer
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.
Authorization: Bearer API_KEY
replacing API_KEY with your Primary Profile API Key, which can be found in the Ayrshare Dashboard.
Authorization: Bearer 2MPXPKQ-S03M5LS-GR5RX5G-AZCK8EA
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:
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: "application/json"
unless the endpoint specifically specifies otherwise.
Accept-Encoding
header to deflate, gzip, br
.
content-encoding: br
if
Brotli was used.id
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.
postIds
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.
id
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.
commentId
field of the GET /comments endpoint.
This is often used if you want to get details on a particular comment published outside of Ayrshare.
YYYY-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: