{ "history": [ { "errors": [], "post": "This is the post I sent", "platforms": [ "twitter", "facebook" ], "postIds": [ { "status": "success", "id": "1288968500063775749", // Twitter Social Post ID "platform": "twitter" }, { "id": "104923907983682_108683297607743", // Facebook Social Post ID "status": "success", "platform": "facebook" } ], "urls": [], "type": "now", "notes": "Approved by John Smith", // Reference notes set via /post "created": "2022-05-20T17:25:06Z", "status": "deleted", "scheduleDate": { // In a future release changed to "scheduleDate": "2020-11-05T12:21:29Z" "_seconds": 1604578889, "_nanoseconds": 211000000, "utc": "2020-11-05T12:21:29Z" }, "id": "rhn6u7wwz2WxGv6MZGK9" // Ayrshare Top-Level Post ID }, { "status": "success", "platforms": [ "twitter", "facebook" ], "created": "2022-05-20T17:25:06Z", "post": "Sometimes we need to take a break for lunch.", "scheduleDate": { // In a future release changed to "scheduleDate": "2020-11-05T12:21:29Z" "_seconds": 1604578889, "_nanoseconds": 211000000, "utc": "2020-11-05T12:21:29Z" }, "type": "now", "postIds": [ { "platform": "twitter", "id": "1288890036000983105", // Twitter Social Post ID "status": "success" }, { "id": "104923907983682_108329970009742", // Facebook Social Post ID "status": "success", "platform": "facebook", "isVideo": true // Video post } ], "errors": [], "urls": [], "id": "wWIY0OEirdNeYSJYm1Xa" // Ayrshare Post ID }, { // Awaiting approval post - Approved by user "approved": true, "approvedBy": "9abf1426d6ce9122ef11c7222e1", "approvedDate": "2025-06-06T12:28:12Z", "created": "2025-06-06T12:27:56Z", "errors": [], "id": "sujQsrXtroJU0NEOlY38", "mediaUrls": [], "platforms": [ "twitter" ], "post": "I failed my way to success. - Thomas Edison", "postIds": [ { "status": "success", "id": "193096515330813", "postUrl": "https://twitter.com/RetiretyHQ/status/19309651533081", "platform": "twitter" } ], "profileTitle": "Primary Profile", "refId": "9abf1426d6ce9122ef11c7222e1", "requiresApproval": true, "scheduleDate": "2025-06-06T12:27:56Z", "shortenLinks": false, "status": "success", "type": "now" }, { // Awaiting approval post - Rejected by user "approved": false, "created": "2025-06-06T12:23:48Z", "id": "XL5xHeNK8HGTg07qxzmd", "mediaUrls": [], "platforms": [ "twitter" ], "post": " Honesty is the first chapter in the book of wisdom. - Thomas Jefferson", "profileTitle": "Primary Profile", "refId": "9abf1426d6ce9122ef11c72bd62eddw2", "rejectedBy": "9abf1426d6ce9122ef11c7222e1", "rejectedDate": "2025-06-06T12:23:58Z", "requiresApproval": true, "scheduleDate": "2025-06-06T12:23:48Z", "shortenLinks": false, "status": "awaiting approval", "type": "now" } ], "refId": "9abf1426d6ce9122ef11c72bd62e59807c5cc083", "count": 100, "lastUpdated": "2025-04-05T22:44:14.209Z", "nextUpdate": "2025-04-05T22:45:14.209Z"}
{ "action": "history", "status": "error", "code": 221, "message": "History not found for the past 30 days. Please see the docs on how to retrieve additional history. .../ayrshare.com/rest-api/endpoints/history#list-history-of-sent-and-scheduled-posts"}
History
Posts History
Ayrshare 経由で送信された投稿の履歴を新しい順に取得します。日付範囲、ステータス、ソーシャルネットワーク、直近 n 日間で絞り込めます。
GET
/
history
curl \-H "Authorization: Bearer API_KEY" \-X GET https://api.ayrshare.com/api/history?startDate=2025-01-01T12:30:00Z&endDate=2025-03-01T12:30:00&limit=100
{ "history": [ { "errors": [], "post": "This is the post I sent", "platforms": [ "twitter", "facebook" ], "postIds": [ { "status": "success", "id": "1288968500063775749", // Twitter Social Post ID "platform": "twitter" }, { "id": "104923907983682_108683297607743", // Facebook Social Post ID "status": "success", "platform": "facebook" } ], "urls": [], "type": "now", "notes": "Approved by John Smith", // Reference notes set via /post "created": "2022-05-20T17:25:06Z", "status": "deleted", "scheduleDate": { // In a future release changed to "scheduleDate": "2020-11-05T12:21:29Z" "_seconds": 1604578889, "_nanoseconds": 211000000, "utc": "2020-11-05T12:21:29Z" }, "id": "rhn6u7wwz2WxGv6MZGK9" // Ayrshare Top-Level Post ID }, { "status": "success", "platforms": [ "twitter", "facebook" ], "created": "2022-05-20T17:25:06Z", "post": "Sometimes we need to take a break for lunch.", "scheduleDate": { // In a future release changed to "scheduleDate": "2020-11-05T12:21:29Z" "_seconds": 1604578889, "_nanoseconds": 211000000, "utc": "2020-11-05T12:21:29Z" }, "type": "now", "postIds": [ { "platform": "twitter", "id": "1288890036000983105", // Twitter Social Post ID "status": "success" }, { "id": "104923907983682_108329970009742", // Facebook Social Post ID "status": "success", "platform": "facebook", "isVideo": true // Video post } ], "errors": [], "urls": [], "id": "wWIY0OEirdNeYSJYm1Xa" // Ayrshare Post ID }, { // Awaiting approval post - Approved by user "approved": true, "approvedBy": "9abf1426d6ce9122ef11c7222e1", "approvedDate": "2025-06-06T12:28:12Z", "created": "2025-06-06T12:27:56Z", "errors": [], "id": "sujQsrXtroJU0NEOlY38", "mediaUrls": [], "platforms": [ "twitter" ], "post": "I failed my way to success. - Thomas Edison", "postIds": [ { "status": "success", "id": "193096515330813", "postUrl": "https://twitter.com/RetiretyHQ/status/19309651533081", "platform": "twitter" } ], "profileTitle": "Primary Profile", "refId": "9abf1426d6ce9122ef11c7222e1", "requiresApproval": true, "scheduleDate": "2025-06-06T12:27:56Z", "shortenLinks": false, "status": "success", "type": "now" }, { // Awaiting approval post - Rejected by user "approved": false, "created": "2025-06-06T12:23:48Z", "id": "XL5xHeNK8HGTg07qxzmd", "mediaUrls": [], "platforms": [ "twitter" ], "post": " Honesty is the first chapter in the book of wisdom. - Thomas Jefferson", "profileTitle": "Primary Profile", "refId": "9abf1426d6ce9122ef11c72bd62eddw2", "rejectedBy": "9abf1426d6ce9122ef11c7222e1", "rejectedDate": "2025-06-06T12:23:58Z", "requiresApproval": true, "scheduleDate": "2025-06-06T12:23:48Z", "shortenLinks": false, "status": "awaiting approval", "type": "now" } ], "refId": "9abf1426d6ce9122ef11c72bd62e59807c5cc083", "count": 100, "lastUpdated": "2025-04-05T22:44:14.209Z", "nextUpdate": "2025-04-05T22:45:14.209Z"}
{ "action": "history", "status": "error", "code": 221, "message": "History not found for the past 30 days. Please see the docs on how to retrieve additional history. .../ayrshare.com/rest-api/endpoints/history#list-history-of-sent-and-scheduled-posts"}
Targeting X/Twitter? Starting March 31, 2026, all X operations require your own API credentials. After linking X via OAuth, include these 2 headers in your request:
X-Twitter-OAuth1-Api-Key — Your API Key (Consumer Key) X-Twitter-OAuth1-Api-Secret — Your API Key Secret (Consumer Secret)
One-time setup per Ayrshare account. You create one X Developer App and reuse the same API Key and Secret across every sub-profile / end-user you link. You do not create a new app per customer.
Not linked yet? See the full setup guide to connect your X account.
Your keys are never logged or stored by Ayrshare.
Ayrshare 経由で送信された投稿の履歴を、降順(最新から古い順)で取得します。このエンドポイントを使用すると、特定の日付範囲、ステータス、ソーシャルネットワーク、または直近 n 日間の投稿を取得できます。履歴の status フィールドの値:
{ "history": [ { "errors": [], "post": "This is the post I sent", "platforms": [ "twitter", "facebook" ], "postIds": [ { "status": "success", "id": "1288968500063775749", // Twitter Social Post ID "platform": "twitter" }, { "id": "104923907983682_108683297607743", // Facebook Social Post ID "status": "success", "platform": "facebook" } ], "urls": [], "type": "now", "notes": "Approved by John Smith", // Reference notes set via /post "created": "2022-05-20T17:25:06Z", "status": "deleted", "scheduleDate": { // In a future release changed to "scheduleDate": "2020-11-05T12:21:29Z" "_seconds": 1604578889, "_nanoseconds": 211000000, "utc": "2020-11-05T12:21:29Z" }, "id": "rhn6u7wwz2WxGv6MZGK9" // Ayrshare Top-Level Post ID }, { "status": "success", "platforms": [ "twitter", "facebook" ], "created": "2022-05-20T17:25:06Z", "post": "Sometimes we need to take a break for lunch.", "scheduleDate": { // In a future release changed to "scheduleDate": "2020-11-05T12:21:29Z" "_seconds": 1604578889, "_nanoseconds": 211000000, "utc": "2020-11-05T12:21:29Z" }, "type": "now", "postIds": [ { "platform": "twitter", "id": "1288890036000983105", // Twitter Social Post ID "status": "success" }, { "id": "104923907983682_108329970009742", // Facebook Social Post ID "status": "success", "platform": "facebook", "isVideo": true // Video post } ], "errors": [], "urls": [], "id": "wWIY0OEirdNeYSJYm1Xa" // Ayrshare Post ID }, { // Awaiting approval post - Approved by user "approved": true, "approvedBy": "9abf1426d6ce9122ef11c7222e1", "approvedDate": "2025-06-06T12:28:12Z", "created": "2025-06-06T12:27:56Z", "errors": [], "id": "sujQsrXtroJU0NEOlY38", "mediaUrls": [], "platforms": [ "twitter" ], "post": "I failed my way to success. - Thomas Edison", "postIds": [ { "status": "success", "id": "193096515330813", "postUrl": "https://twitter.com/RetiretyHQ/status/19309651533081", "platform": "twitter" } ], "profileTitle": "Primary Profile", "refId": "9abf1426d6ce9122ef11c7222e1", "requiresApproval": true, "scheduleDate": "2025-06-06T12:27:56Z", "shortenLinks": false, "status": "success", "type": "now" }, { // Awaiting approval post - Rejected by user "approved": false, "created": "2025-06-06T12:23:48Z", "id": "XL5xHeNK8HGTg07qxzmd", "mediaUrls": [], "platforms": [ "twitter" ], "post": " Honesty is the first chapter in the book of wisdom. - Thomas Jefferson", "profileTitle": "Primary Profile", "refId": "9abf1426d6ce9122ef11c72bd62eddw2", "rejectedBy": "9abf1426d6ce9122ef11c7222e1", "rejectedDate": "2025-06-06T12:23:58Z", "requiresApproval": true, "scheduleDate": "2025-06-06T12:23:48Z", "shortenLinks": false, "status": "awaiting approval", "type": "now" } ], "refId": "9abf1426d6ce9122ef11c72bd62e59807c5cc083", "count": 100, "lastUpdated": "2025-04-05T22:44:14.209Z", "nextUpdate": "2025-04-05T22:45:14.209Z"}
{ "action": "history", "status": "error", "code": 221, "message": "History not found for the past 30 days. Please see the docs on how to retrieve additional history. .../ayrshare.com/rest-api/endpoints/history#list-history-of-sent-and-scheduled-posts"}