GET
/
history
Available on Basic, Premium, Business, Enterprise plans.

Get a history of all posts sent via Ayrshare, in descending order (most recent to oldest). Only the past 30 days of history is returned unless the lastDays parameter is set.

History status fields values:

  • awaiting approval: Posts are awaiting to be approved via the approval workflow.

  • deleted: Post has been deleted. Note: deleted posts are only returned with the status query filter. Please see below.

  • error: An error occurred with one or more social networks.
  • paused: A scheduled post that has been paused.
  • pending: The post has not yet been processed. Typically a scheduled post.
  • success: The post was successfully sent to all social networks.

The Ayrshare Post ID is returned in the response id field. If you need to retrieve posts that originated outside of Ayrshare, use the history platform endpoint.

Header Parameters

Authorization
string
required
API Key of the Primary Profile.

Format: Authorization: Bearer API_KEY
Profile-Key
string
Profile Key of a User Profile.

Format: Profile-Key: PROFILE_KEY

Query Parameters

status
string

Filter by current status of post. Valid values: success, error, processing, pending, paused, deleted, and awaiting approval. Processing indicates the post is currently being sent. Pending indicates the post is scheduled to be posted at a future date.

Deleted posts are not returned by default. They are only returned with the status query filter set to status=deleted.

lastDays
number

Returns the last n days of posts by the publish date (scheduleDate if a scheduled posts). Default 30 days.

If the value is zero 0 will return the entire history of posts. E.g. lastDays=5 returns the last 5 days of posts and lastDays=0 returns all posts determined by the limit.

limit
number
default: 25

Returns the last n number of posts. For example, if you only want the most recent post, set limit=1. If not present will return all records contained within lastDays.

Default: 25 posts. Max value: 1000.

type
string

Type values: immediate or scheduled.

platform
array

Filter by social network platforms. Platform values: facebook, twitter, linkedin, instagram, youtube, reddit, telegram, gmb, pinterest, or tiktok. Note, uses OR logic: ["facebook", "instagram"] returns posts from either.

objResponse
boolean
default: true

Response as Object. Default: true.