curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/automations?platform=instagram"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/automations?platform=instagram", {
method: "GET",
headers: { "Authorization": `Bearer ${API_KEY}` },
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {"Authorization": "Bearer API_KEY"}
r = requests.get(
"https://api.ayrshare.com/api/automations",
params={"platform": "instagram"},
headers=headers,
)
print(r.json())
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ayrshare.com/api/automations?platform=instagram",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer API_KEY"],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"automations": [
{
"id": "auto_9xKp2Lm4nQ",
"platform": "instagram",
"accountId": "17841400000000000",
"name": "Spring promo",
"description": "",
"active": true,
"stats": {
"totalSent": 42,
"totalFailed": 1,
"lastTriggeredAt": "2026-05-12T09:14:22.000Z",
"lastSentAt": "2026-05-12T09:14:48.000Z"
},
"created": "2026-04-30T12:00:00.000Z",
"updated": "2026-05-12T09:14:48.000Z"
}
]
}
{
"action": "automation",
"status": "error",
"code": 468,
"message": "DM automations require a Business or Enterprise plan"
}
Automations
Liệt kê Automation
Trả về mọi automation đang hoạt động và không hoạt động của người gọi, không bao gồm các automation đã bị xóa mềm, với bộ lọc nền tảng tùy chọn cho instagram hoặc facebook.
GET
/
automations
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/automations?platform=instagram"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/automations?platform=instagram", {
method: "GET",
headers: { "Authorization": `Bearer ${API_KEY}` },
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {"Authorization": "Bearer API_KEY"}
r = requests.get(
"https://api.ayrshare.com/api/automations",
params={"platform": "instagram"},
headers=headers,
)
print(r.json())
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ayrshare.com/api/automations?platform=instagram",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer API_KEY"],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"automations": [
{
"id": "auto_9xKp2Lm4nQ",
"platform": "instagram",
"accountId": "17841400000000000",
"name": "Spring promo",
"description": "",
"active": true,
"stats": {
"totalSent": 42,
"totalFailed": 1,
"lastTriggeredAt": "2026-05-12T09:14:22.000Z",
"lastSentAt": "2026-05-12T09:14:48.000Z"
},
"created": "2026-04-30T12:00:00.000Z",
"updated": "2026-05-12T09:14:48.000Z"
}
]
}
{
"action": "automation",
"status": "error",
"code": 468,
"message": "DM automations require a Business or Enterprise plan"
}
Beta. Xem Tổng quan về Automations để biết mô tả đầy đủ về tính năng.
Tham số Header
Tham số Query
Tùy chọn. Lọc các automation nhắm đến nền tảng này. Giá trị được hỗ trợ:
instagram và facebook.curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/automations?platform=instagram"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/automations?platform=instagram", {
method: "GET",
headers: { "Authorization": `Bearer ${API_KEY}` },
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {"Authorization": "Bearer API_KEY"}
r = requests.get(
"https://api.ayrshare.com/api/automations",
params={"platform": "instagram"},
headers=headers,
)
print(r.json())
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ayrshare.com/api/automations?platform=instagram",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer API_KEY"],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"automations": [
{
"id": "auto_9xKp2Lm4nQ",
"platform": "instagram",
"accountId": "17841400000000000",
"name": "Spring promo",
"description": "",
"active": true,
"stats": {
"totalSent": 42,
"totalFailed": 1,
"lastTriggeredAt": "2026-05-12T09:14:22.000Z",
"lastSentAt": "2026-05-12T09:14:48.000Z"
},
"created": "2026-04-30T12:00:00.000Z",
"updated": "2026-05-12T09:14:48.000Z"
}
]
}
{
"action": "automation",
"status": "error",
"code": 468,
"message": "DM automations require a Business or Enterprise plan"
}