curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.ayrshare.com/api/ads/reddit/audiences \
-d '{"accountId": "a2_abcdefg", "name": "Site visitors 30d", "type": "website", "pixelId": "t2_pixel123", "retentionDays": 30, "event": "purchase"}'
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/reddit/audiences", {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"accountId": "a2_abcdefg",
"name": "Site visitors 30d",
"type": "website",
"pixelId": "t2_pixel123",
"retentionDays": 30,
"event": "purchase"
})
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY', 'Content-Type': 'application/json'}
payload = {
"accountId": "a2_abcdefg",
"name": "Site visitors 30d",
"type": "website",
"pixelId": "t2_pixel123",
"retentionDays": 30,
"event": "purchase"
}
r = requests.post('https://api.ayrshare.com/api/ads/reddit/audiences', json=payload, headers=headers)
print(r.json())
{
"status": "success",
"audience": {
"id": "ca.129482487242999",
"name": "Site visitors 30d",
"type": "website",
"size": null,
"status": { "ready": false, "code": null, "description": "PENDING" },
"created": "2026-12-02T10:05:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "retentionDays on reddit is at most 90."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Reddit's reason"
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to create the audience. Please try again.",
"details": "Reddit's reason"
}
Reddit Ads
Create Audience
Create a Reddit custom audience of your own customer list or your website visitors, to include or exclude when boosting a post.
POST
/
ads
/
reddit
/
audiences
curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.ayrshare.com/api/ads/reddit/audiences \
-d '{"accountId": "a2_abcdefg", "name": "Site visitors 30d", "type": "website", "pixelId": "t2_pixel123", "retentionDays": 30, "event": "purchase"}'
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/reddit/audiences", {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"accountId": "a2_abcdefg",
"name": "Site visitors 30d",
"type": "website",
"pixelId": "t2_pixel123",
"retentionDays": 30,
"event": "purchase"
})
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY', 'Content-Type': 'application/json'}
payload = {
"accountId": "a2_abcdefg",
"name": "Site visitors 30d",
"type": "website",
"pixelId": "t2_pixel123",
"retentionDays": 30,
"event": "purchase"
}
r = requests.post('https://api.ayrshare.com/api/ads/reddit/audiences', json=payload, headers=headers)
print(r.json())
{
"status": "success",
"audience": {
"id": "ca.129482487242999",
"name": "Site visitors 30d",
"type": "website",
"size": null,
"status": { "ready": false, "code": null, "description": "PENDING" },
"created": "2026-12-02T10:05:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "retentionDays on reddit is at most 90."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Reddit's reason"
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to create the audience. Please try again.",
"details": "Reddit's reason"
}
Create a custom audience on a Reddit ad account. Two kinds are supported, chosen by
type:
customerList: your own list of people, which you fill with hashed identifiers through Audience Members.website: people your Reddit pixel saw on your site.
audience in the same shape as Audiences, with status.ready: false. Reddit fills it over time. List it to see when status.ready turns true, then use its id in targeting.audiences or targeting.excludedAudiences when you boost a post.
- Reddit cannot create engagement or lookalike audiences here. Sending
type: engagementortype: lookalikereturns a400withcode: 101. - An audience needs at least 1,000 matched people before a boost can target it.
Header Parameters
Body Parameters
Both types take these:customerList or website. Each type takes only its own fields below. A field from another type returns a 400 with code: 101 naming it.A new unique value, such as a UUID, for each new audience. If you repeat a request with the same key, Ayrshare returns the first response, marked
idempotentReplayed: true, and creates no second audience. You can send the key as the Idempotency-Key header instead; if you send both, they must match. Reusing a key with a different request, or while the first request is still in progress, returns a 409. A 503 means the key could not be reserved and nothing was created: retry later with the same key.Customer-list audiences
A customer list takes no other required fields and starts empty. Add people with Audience Members. Hashed identifiers are still personal data: read that page before you upload a list.customerFileSource is not accepted on Reddit unless it is USER_PROVIDED_ONLY: Reddit takes your own lists only.
Website audiences
Keep only visitors who fired this event. Reddit’s standard events are
PAGE_VISIT, VIEW_CONTENT, SEARCH, ADD_TO_CART, ADD_TO_WISHLIST, PURCHASE, LEAD and SIGN_UP, in any letter case. Any other value is sent as a custom event name. Leave it out to count every visit.urlContains is not accepted on Reddit: Reddit has no URL filter on a website audience.
curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.ayrshare.com/api/ads/reddit/audiences \
-d '{"accountId": "a2_abcdefg", "name": "Site visitors 30d", "type": "website", "pixelId": "t2_pixel123", "retentionDays": 30, "event": "purchase"}'
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/reddit/audiences", {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"accountId": "a2_abcdefg",
"name": "Site visitors 30d",
"type": "website",
"pixelId": "t2_pixel123",
"retentionDays": 30,
"event": "purchase"
})
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY', 'Content-Type': 'application/json'}
payload = {
"accountId": "a2_abcdefg",
"name": "Site visitors 30d",
"type": "website",
"pixelId": "t2_pixel123",
"retentionDays": 30,
"event": "purchase"
}
r = requests.post('https://api.ayrshare.com/api/ads/reddit/audiences', json=payload, headers=headers)
print(r.json())
{
"status": "success",
"audience": {
"id": "ca.129482487242999",
"name": "Site visitors 30d",
"type": "website",
"size": null,
"status": { "ready": false, "code": null, "description": "PENDING" },
"created": "2026-12-02T10:05:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "retentionDays on reddit is at most 90."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Reddit's reason"
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to create the audience. Please try again.",
"details": "Reddit's reason"
}