curl -X POST https://api.ayrshare.com/api/ads/reddit/boost \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "a2_abc123",
"socialPostId": "1abc27",
"goal": "website_visits",
"budget": { "amount": 50, "type": "daily" },
"targeting": { "locations": { "countries": ["US"] } },
"platformOptions": { "reddit": { "pixelId": "YOUR_PIXEL_ID" } }
}'
{
"status": "success",
"id": "2707300000000000001",
"platform": "reddit",
"adStatus": "ACTIVE",
"budget": { "amount": 50, "type": "daily", "level": "adSet", "currency": "USD" },
"schedule": { "start": 1791892800000 },
"platformIds": {
"campaignId": "2707100000000000001",
"adGroupId": "2707200000000000001",
"adId": "2707300000000000001"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "platformOptions.reddit.pixelId is required on reddit: Reddit runs no ad without a conversion pixel. Find it in Reddit Ads Events Manager."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Post 1abc27 is on a Reddit profile (r/u_example). reddit boosts posts in communities only."
}
{
"action": "rate limit",
"status": "error",
"code": 364,
"message": "You are making too many requests. Please reduce the number of requests.",
"details": "Too many requests Retry in 30 seconds."
}
Reddit Ads
推廣貼文
將 Reddit 社群貼文作為推廣貼文推廣。Ayrshare 建立廣告活動、廣告群組和廣告,並設定廣告目標、預算和自訂受眾鎖定。
POST
/
ads
/
reddit
/
boost
curl -X POST https://api.ayrshare.com/api/ads/reddit/boost \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "a2_abc123",
"socialPostId": "1abc27",
"goal": "website_visits",
"budget": { "amount": 50, "type": "daily" },
"targeting": { "locations": { "countries": ["US"] } },
"platformOptions": { "reddit": { "pixelId": "YOUR_PIXEL_ID" } }
}'
{
"status": "success",
"id": "2707300000000000001",
"platform": "reddit",
"adStatus": "ACTIVE",
"budget": { "amount": 50, "type": "daily", "level": "adSet", "currency": "USD" },
"schedule": { "start": 1791892800000 },
"platformIds": {
"campaignId": "2707100000000000001",
"adGroupId": "2707200000000000001",
"adId": "2707300000000000001"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "platformOptions.reddit.pixelId is required on reddit: Reddit runs no ad without a conversion pixel. Find it in Reddit Ads Events Manager."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Post 1abc27 is on a Reddit profile (r/u_example). reddit boosts posts in communities only."
}
{
"action": "rate limit",
"status": "error",
"code": 364,
"message": "You are making too many requests. Please reduce the number of requests.",
"details": "Too many requests Retry in 30 seconds."
}
推廣一則現有的 Reddit 貼文。Ayrshare 會在您的 Reddit 廣告帳戶中建立一個活動、一個廣告群組以及一個推廣您貼文的廣告。
限制
- Reddit 廣告需按帳戶個別開通。請聯絡我們以啟用此功能。
- 僅限社群貼文。 您可以推廣社群(subreddit)中的貼文。您個人檔案(
r/u_<username>)上的貼文無法推廣,並會返回code: 101。 - 必須提供轉換像素。 無論目標為何,Reddit 都不會在沒有轉換像素的情況下投放任何廣告。請在
platformOptions.reddit.pixelId中發送您的像素 ID,否則推廣會返回code: 101。您可以在 Reddit Ads Events Manager 中找到它。
- 請連結 Reddit 並授予廣告權限(
adsread、adsedit、adsconversions)。如果尚未連結 Reddit,將返回code: 156。如果缺少廣告權限,或 Reddit 不再接受該連結,將返回code: 420:請重新連結 Reddit 並授予這些權限。 - 預算使用您廣告帳戶的幣別。請勿發送
budget.currency:發送它會返回code: 101。 - 預算設定在廣告群組層級。
budget.level: "campaign"會返回code: 101。 - 您的廣告帳戶需要一個付款工具。如果沒有,推廣會返回
code: 101:請在 Reddit Ads 中新增付款方式。如果有多個,請在platformOptions.reddit.fundingInstrumentId中指定。 - Reddit 不接受
callToAction、attachTo、targeting.excludedLocations、年齡目標設定、targeting.locations.regions和targeting.locations.cities。發送這些參數會返回code: 101。 - Reddit 會審核每則新廣告。在獲得核准之前,廣告會顯示為
review.status: "PENDING_APPROVAL"。 - 如果 Reddit 未能啟用新廣告,推廣仍會被建立,且回應中會包含
warning。廣告通常處於暫停狀態(adStatus: "PAUSED"),請透過狀態更新來恢復投放。如果 Reddit 無法確認廣告已暫停,回應會顯示adStatus: "ACTIVE",並警告廣告可能正在投放並產生花費。請檢查廣告,必要時透過狀態更新將其暫停。 - 如果將狀態更新為
active失敗,且 Reddit 無法確認廣告已重新停止,錯誤中會包含warning,提示廣告可能正在投放並產生花費,廣告會顯示adStatus: "ACTIVE"。請檢查廣告,必要時透過狀態更新將其暫停。 - 如果您發送請求的速度超過 Reddit 允許的上限,將返回
code: 364及 HTTP 429。details中會附上 Reddit 的訊息,若 Reddit 有提供,也會註明需等待幾秒後才能重試。 - 洞察數據以您廣告帳戶的幣別顯示花費。僅當該幣別為 USD 時才會設定
spendUsd,否則為null。
廣告目標
brand_awareness:將貼文展示給盡可能多的人。website_visits:獲取前往您網站的點擊。leads:獲取由您的像素追蹤的註冊或潛在客戶。sales:獲取由您的像素追蹤的購買。
鎖定自訂受眾
若要觸及或排除您 Reddit 自訂受眾中的人,請傳送targeting.audiences 和 targeting.excludedAudiences。兩者都是來自受眾的受眾 ID 清單:您的顧客名單、網站訪客,以及廣告帳戶上的任何其他受眾。您可以透過建立受眾或在 Reddit Ads Manager 中建立受眾。
{
"accountId": "a2_abc123",
"socialPostId": "1abc27",
"goal": "website_visits",
"budget": { "amount": 20, "type": "daily" },
"targeting": {
"locations": { "countries": ["US"] },
"audiences": ["ca.129482487242828"],
"excludedAudiences": ["ca.129482487242999"]
},
"platformOptions": { "reddit": { "pixelId": "t2_pixel123" } }
}
targeting.audiences:廣告會在您設定的其他目標設定範圍內,觸及屬於這些受眾中任一受眾的人。targeting.excludedAudiences:屬於這些受眾中任一受眾的人永遠不會看到該廣告。- 仍在填充中的受眾(
status.ready: false)在 Reddit 比對到至少 1,000 人之前可能無法投放。 targeting.locations仍為必填。- 每個清單至少需要一個 ID;若沒有 ID,請省略該欄位,而不要傳送空清單。空清單或不是 Reddit 受眾 ID 的 ID,會在建立任何內容之前返回帶有
code: 101的400。
請求頭參數
請求體參數
此推廣請求的唯一非空鍵。使用相同的鍵重試相同的負載,可避免建立重複的廣告。以不同的負載重用該鍵會返回 HTTP 409。該鍵僅適用於此平台:在其他平台上使用相同的鍵會建立一個獨立的推廣。仍在處理中的請求同樣會返回 409;預留不可用時會返回 503,且不會建立廣告。
要推廣的 Ayrshare 貼文 ID。請發送
postId 或 socialPostId。如果同時傳送兩者,postId 必須是您自己的貼文之一,否則推廣會失敗並回傳 code: 369。廣告目標 之一。
curl -X POST https://api.ayrshare.com/api/ads/reddit/boost \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "a2_abc123",
"socialPostId": "1abc27",
"goal": "website_visits",
"budget": { "amount": 50, "type": "daily" },
"targeting": { "locations": { "countries": ["US"] } },
"platformOptions": { "reddit": { "pixelId": "YOUR_PIXEL_ID" } }
}'
{
"status": "success",
"id": "2707300000000000001",
"platform": "reddit",
"adStatus": "ACTIVE",
"budget": { "amount": 50, "type": "daily", "level": "adSet", "currency": "USD" },
"schedule": { "start": 1791892800000 },
"platformIds": {
"campaignId": "2707100000000000001",
"adGroupId": "2707200000000000001",
"adId": "2707300000000000001"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "platformOptions.reddit.pixelId is required on reddit: Reddit runs no ad without a conversion pixel. Find it in Reddit Ads Events Manager."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Post 1abc27 is on a Reddit profile (r/u_example). reddit boosts posts in communities only."
}
{
"action": "rate limit",
"status": "error",
"code": 364,
"message": "You are making too many requests. Please reduce the number of requests.",
"details": "Too many requests Retry in 30 seconds."
}