> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Audience Members

> Reddit customer-list audience में लोगों को जोड़ें या हटाएँ, उनके email या mobile advertising ID के SHA-256 hashes भेजकर।

[Audience बनाएँ](https://www.ayrshare.com/docs/apis/ads/reddit/create-audience.md) से बनाई गई customer-list audience (`type: customerList`) में लोगों को जोड़ें, या उन्हें हटाएँ। आप हर व्यक्ति को उसके normalized identifiers के SHA-256 hashes के रूप में भेजते हैं; Reddit hashes का accounts से मिलान करता है; raw मान कभी आपके सिस्टम से बाहर नहीं जाते।

`DELETE /ads/reddit/audiences/{id}/users` वही body लेता है और इसके बजाय लोगों को हटाता है।

<ul>
  <li>Reddit के कम से कम 1,000 लोगों का मिलान करने पर सूची boost में उपयोग की जा सकती है। ऐसा होने पर [Audiences](https://www.ayrshare.com/docs/apis/ads/reddit/get-audiences.md) `status.ready` दिखाता है।</li>
  <li>हर request में अधिकतम 10,000 rows और अधिकतम 10 MiB की body होती है। बड़ी सूची कई requests में भेजें।</li>
  <li>अगर कोई request बीच में विफल हो जाता है, तो विफलता से पहले भेजी गई rows audience में बनी रहती हैं। पूरा request दोबारा भेजें: सूची में पहले से मौजूद व्यक्ति को जोड़ने से कुछ नहीं बदलता।</li>
  <li>Id, `accountId` से बताए गए ad account की customer-list audience होनी चाहिए। कोई भी अन्य id `code: 101` वाला `400` लौटाता है।</li>
</ul>

## Hashed identifiers personal data हैं

Hashed email या advertising ID फिर भी GDPR और इसी तरह के कानूनों के तहत personal data है। जब आप सूची upload करते हैं:

<ul>
  <li>**आप data controller हैं।** विज्ञापन के लिए लोगों का डेटा उपयोग करने के लिए आपको एक कानूनी आधार चाहिए, आमतौर पर सूची के लोगों की सहमति, जैसा आपकी privacy policy और Reddit की advertising policies माँगती हैं।</li>
  <li>**Ayrshare एक processor है।** हम hashes को Reddit तक पहुँचाते हैं और counts के अलावा कुछ नहीं रखते: body की कोई row log, cache या store नहीं की जाती, और response कभी कोई row नहीं दोहराता।</li>
  <li>**भेजने से पहले hash आप करते हैं।** Ayrshare कभी आपके लिए hash नहीं करता। जो मान hash नहीं है, उसे Reddit को कुछ भी भेजे जाने से पहले अस्वीकार कर दिया जाता है।</li>
</ul>

### Hash कैसे करें

हर मान को Reddit की [customer list guide](https://ads-api.reddit.com/docs/v3/manage-customer-lists) के अनुसार normalize करें, फिर उसे SHA-256 से hash करें और परिणाम को 64 lowercase hex characters के रूप में भेजें। संक्षेप में:

<ul>
  <li>`EMAIL`: spaces हटाएँ और lowercase करें, उदाहरण के लिए `jane@example.com`।</li>
  <li>`MADID`: डिवाइस की mobile advertising ID (Google की GAID या Apple की IDFA)।</li>
</ul>

## हैडर पैरामीटर

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## पाथ पैरामीटर

**id** `string` *required*

Customer-list audience id, [Audience बनाएँ](https://www.ayrshare.com/docs/apis/ads/reddit/create-audience.md) या [Audiences](https://www.ayrshare.com/docs/apis/ads/reddit/get-audiences.md) से।

## बॉडी पैरामीटर

**accountId** `string` *required*

वह Reddit ad account जिसकी यह audience है, उदाहरण के लिए `a2_abc123`।

**schema** `array` *required*

हर column में identifier, क्रम से: `EMAIL`, `MADID`, या दोनों। ये वही नाम हैं जो Facebook audiences उपयोग करती हैं। अन्य keys `code: 101` वाला `400` लौटाती हैं।

**data** `array` *required*

हर व्यक्ति के लिए एक row: एक array जिसमें हर `schema` column के लिए एक SHA-256 hash हो, 64 lowercase hex characters के रूप में। अधिकतम 10,000 rows।

ऐसा cell जो इस तरह का hash नहीं है, गलत width वाली row, या असमर्थित key, Reddit को कुछ भी भेजे जाने से पहले `code: 101` वाला `400` लौटाती है। Message में row और column बताए जाते हैं, मान कभी नहीं, उदाहरण के लिए `data[1][0] (EMAIL) is not a hash: expected 64 lowercase hex characters.`

## Response

सिर्फ़ counts:

<ul>
  <li>`received`: Reddit द्वारा ली गई rows।</li>
  <li>`invalid`: Reddit पर हमेशा `0`। Reddit उन rows की report नहीं करता जिनका वह मिलान नहीं कर सका। मिलान बाद में [Audiences](https://www.ayrshare.com/docs/apis/ads/reddit/get-audiences.md) में audience के `size` और `status` में दिखते हैं।</li>
  <li>`batches`: rows कितने uploads में भेजी गईं। Reddit हर upload में 2,500 rows लेता है।</li>
</ul>

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.ayrshare.com/api/ads/reddit/audiences/ca.129482487242828/users \
-d '{"accountId": "a2_abcdefg", "schema": ["EMAIL"], "data": [["5f4dcc3b5aa765d61d8327deb882cf99b8f0e2e1f6b0d3c0a9b3b2f1e0d9c8b7"]]}'
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";

fetch("https://api.ayrshare.com/api/ads/reddit/audiences/ca.129482487242828/users", {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${API_KEY}`,
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
    "accountId": "a2_abcdefg",
    "schema": [
      "EMAIL"
    ],
    "data": [
      [
        "5f4dcc3b5aa765d61d8327deb882cf99b8f0e2e1f6b0d3c0a9b3b2f1e0d9c8b7"
      ]
    ]
  })
    })
      .then((res) => res.json())
      .then((json) => console.log(json))
      .catch(console.error);
```

```python Python theme={"system"}
import requests

headers = {'Authorization': 'Bearer API_KEY', 'Content-Type': 'application/json'}
payload = {
  "accountId": "a2_abcdefg",
  "schema": [
    "EMAIL"
  ],
  "data": [
    [
      "5f4dcc3b5aa765d61d8327deb882cf99b8f0e2e1f6b0d3c0a9b3b2f1e0d9c8b7"
    ]
  ]
}

r = requests.post('https://api.ayrshare.com/api/ads/reddit/audiences/ca.129482487242828/users', json=payload, headers=headers)

print(r.json())
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "id": "ca.129482487242828",
  "received": 1,
  "invalid": 0,
  "batches": 1
}
```

```json 400: A raw value theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
  "details": "data[0][0] (EMAIL) is not a hash: expected 64 lowercase hex characters."
}
```

```json 400: Not a customer list theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
  "details": "id ca.129482487242999 is a website audience; members can be added to or removed from a customer-list audience only."
}
```

```json 413: Body over 10 MiB theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 525,
  "message": "The request body is too large. Please reduce the size of the request."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.