Schedule posts, auto hashtag, auto-post schedule, and more
requiresApproval
field to true
.
This is equivalent to pausing the post until the approved
parameter is set to true
.
approved
parameter is set to true
via the /post PATCH endpoint.
Publish with parameters
requiresApproval
field
as true
. You may also including standard parameters such as scheduleDate
.Status is awaiting approval
Approve the post
approved
field as true
. The post will now be sent at the scheduled time.Use notes
notes
on the post for reference, such as who needs to approve the post.scheduleDate
is included and the date is in the past, the post will be published
immediately upon approval.autoHashtag
is an object, or Boolean - see below, with the following parameters:
max
: (optional) Integer of hashtags to add, range 1-10. Default 2.position
: (optional) String “auto” or “end”. Auto adds the hashtags within the post or to the
end. “end” adds hashtags just to the end.true
instead of an object.
repeat
: (required) The number of times to repost the content. Must be between 1 and 10.days
: (required) The number of days between each repost. Must be at least 2 days.startDate
: (optional) When to start the repost schedule, in ISO-8601 UTC format. If not specified, the first post will be published immediately. You should use the startDate
parameter in lieu of the top-level scheduleDate
parameter.autoRepostId
for each repost.
autoRepostId
is assigned to track that series of posts.
You may get all of the auto reposts for a post with the History call with the autoRepostId
.
If you need to delete a repost, you can use the DELETE call with the post ID.
autoRepost
feature cannot be used together with scheduleDate
. If you include both parameters, the scheduleDate
will take precedence and autoRepost
will be ignored. Please use the startDate
parameter instead.visibility
parameter must be set to public
.
idempotencyKey
parameter in the request body to uniquely identify the operation. This allows you to safely retry the post request without the risk of creating duplicate posts.
To use idempotency, add the idempotencyKey
parameter to the JSON body of the /post
POST request:
idempotencyKey
should be a unique string per User Profile. If a request is made with the same idempotencyKey
for a given User Profile, regardless of the post’s state (success, error, pending, or deleted), an error will be returned, indicating that a duplicate key was found.
idempotencyKey
are sent
simultaneously or scheduled for the same posting time, the API may not detect the duplicate keys.
This is because the API processes these concurrent or simultaneously scheduled requests in
parallel, before it has a chance to register the idempotency key from any single request. As a
result, there’s no guarantee that duplicate idempotent keys will be caught in these scenarios of
simultaneous submission or execution of scheduled posts.mediaUrls
parameter when publishing a post or comment. Ayrshare will
automatically convert the share URL to a download link.HEAD
request.
Please be sure the hosting provider is not blocking the HEAD
request or the post will fail with a 403 error.
For example, here is a HEAD
request to the media URL:
test .webp
. We also don’t recommend using URL encoded spaces, such as %20
in the URL - this can also cause issues with some social networks.
And this Unsplash image:
/[^a-z0-9\/\.]/gi
.
mp4
, you can use the isVideo: true
field in the post to specify the mediaUrl
is a video . Ayrshare will try to determine the file type, such as MOV
. However, we recommend explicitly ending your video file with a known extension, such as mp4
, since this has a higher success rate with the social networks.
post: ""
The following social networks support no post/blank text: Facebook, Instagram, LinkedIn, Threads, TikTok, and X/Twitter.
\u2063\n.
For example, This is a new\u2063\nline.
We also recommend trying in Postman to see how the new line break is translated in your language of choice. For example, PHP often only uses a \n
Some social networks do not currently support line breaks in the post text.post
and mediaUrls
fields.
post
and/or mediaUrls
fields.default
key for content to be used on platforms not explicitly specified.HTML | Example |
---|---|
<b>Nice One!</b> | Nice One! |
<strong>Hello, world!</strong> | Hello, world! |
<em>World</em> | World |
normal <i>italics <b>bold italics</b></i> | normal italics bold italics |
`<b>Hello</b>, world!` | Hello, world! |
`<b>Hello</b>, world!` | Hello , world! |
<samp>123</samp> | 𝟷𝟸𝟹 |
<var>Hello</var> | 𝓗𝓮𝓵𝓵𝓸 |
x<sub>2</sub> | x₂ |
x<sup>2</sup> | x² |
Code | Example | Result |
---|---|---|
\u00B0 | It’s 25\u00B0C today! | It’s 25°C today! |
\u2063\n | This is a new\u2063\nline. | This is a new line. |
scheduleDate
parameter with the datetime in Zulu/UTC. Zulu Time, also known as Coordinated Universal Time (UTC), is the world standard for time.
For example, use format YYYY-MM-DDThh:mm:ssZ
and send as 2026-07-08T12:30:00Z
.
Please see utctime for more examples.
mediaUrl
is included with a scheduled post, the media must be available at the scheduled
publication time. For example, if the post is scheduled to be published on March 5, 2026, the
media must be available on March 5, 2026.scheduleDate
is in the past the post will immediately be published. Consider updating the scheduleDate
before unpausing.
shortenLinks
parameter when sending a post. Max Pack required.
unsplash
body parameter:
random
returns a random Unsplash image.money
will select a random image based on
money.mediaUrls
, please be sure to copy the image address and
not just the URL. Please see this
example for more information.