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 中找到该 ID。
- 关联 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;如果没有,请直接省略该字段,而不要发送空列表。空列表或不是 Reddit 受众 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."
}