> ## 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.

# النشر المجمّع

> جدولة المنشورات بشكل مجمّع باستخدام ملف CSV

export const XByoNotice = () => <Info>
  <strong>Targeting X/Twitter?</strong> Starting March 31, 2026, all X operations require your own API credentials. After linking X via OAuth, include these 2 headers in your request:
  <br /><br />
  <code>X-Twitter-OAuth1-Api-Key</code> — Your API Key (Consumer Key)<br />
  <code>X-Twitter-OAuth1-Api-Secret</code> — Your API Key Secret (Consumer Secret)
  <br /><br />
  <strong>One-time setup per Ayrshare account.</strong> You create one X Developer App and reuse the same API Key and Secret across every sub-profile / end-user you link. You do <em>not</em> create a new app per customer.
  <br /><br />
  Not linked yet? See the <a href="/dashboard/connect-social-accounts/x-twitter-byo-keys">full setup guide</a> to connect your X account.
  <br /><br />
  Your keys are never logged or stored by Ayrshare.
</Info>;

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

<PlansAvailable plans={["premium"]} maxPackRequired={false} />

<XByoNotice />

جدولة المنشورات بشكل مجمّع باستخدام ملف CSV (قيم مفصولة بفواصل) يحتوي على بيانات المنشورات.
يجب أن يكون Content-Type هو `multipart/form-data`.

<Warning>
  نوصي باستخدام [نقطة نهاية Post](/apis/post/post) المباشرة بدلاً من هذه الطريقة المجمّعة
  لجدولة المنشورات. توفر نقطة النهاية المباشرة مجموعة ميزات أكثر شمولاً وإمكانيات
  تصحيح أخطاء أسهل.
</Warning>

## معلمات الترويسة

<ParamField header="Authorization" type="string" required>
  التنسيق: `Authorization: Bearer API_KEY`. راجع [نظرة عامة على واجهة برمجة التطبيقات](/apis/overview#authorization) لمزيد من
  المعلومات.
</ParamField>

<ParamField header="Profile-Key" type="string">
  مفتاح ملف تعريف مستخدم.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `Content-Type: multipart/form-data`
</ParamField>

## معلمات الجسم

<ParamField path="file" type="object">
  ملف CSV multipart form-data للمنشورات المجدولة. راجع أدناه [قالب CSV](#csv-template).
</ParamField>

## أمثلة على الطلبات

سيقوم multipart form-data يحتوي على ملف CSV من المنشورات بجدولتها لتاريخ مستقبلي.

يحتوي ملف CSV على الحقول التالية (القالب أدناه) وهي مطلوبة:

<ul class="custom-bullets">
  <li>`post`: نص المنشور.</li>
  <li>`platforms`: قائمة منصات مفصولة بفواصل، مثل "twitter, facebook, instagram".</li>
  <li>`mediaUrls`: عنوان URL للوسائط، مثل صورة أو فيديو لتضمينها في المنشور.</li>

  <li>
    `scheduleDate`: التاريخ والوقت لجدولة المنشور بتنسيق UTC. على سبيل المثال، استخدم التنسيق
    `YYYY-MM-DDThh:mm:ssZ` وأرسله كـ `2026-07-08T12:30:00Z`. يرجى الاطلاع على
    [utctime](https://www.utctime.net/) لمزيد من الأمثلة.
  </li>
</ul>

<Warning>
  لا ترسل منشورات مكررة بفارق أقل من يومين.

  إذا كان scheduleDate لمنشورين يحتويان على نفس النص تمامًا بفارق أقل من ثلاثة أيام، فسيتم رفض المنشور الثاني عند حلول scheduleDate.
  هذا لحماية حسابك على الشبكات؛ يمكنهم تعليق الحسابات أو حظرها ضمنيًا (shadow-ban) بسبب المنشورات المكررة المتكررة.
</Warning>

## قالب CSV

قم بتنزيل القالب وحفظه كملف .csv.

[قالب CSV من Ayrshare](https://img.ayrshare.com/012/Ayrshare_CSV_Template.csv)

<RequestExample>
  ```bash cURL theme={"system"}
  curl \
  -H "Authorization: Bearer API_KEY" \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@"./Ayrshare CSV Template.csv"' \
  -X POST https://api.ayrshare.com/api/post/bulk
  ```

  ```javascript JavaScript theme={"system"}
  const API_KEY = "API_KEY";
  const FormData = require("form-data");
  const fs = require("fs");

  const formData = new FormData();
  formData.append("file", fs.createReadStream("./Ayrshare CSV Template.csv"));

  fetch("https://api.ayrshare.com/api/post/bulk", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      ...formData.getHeaders()
    },
    body: formData
  })
    .then((res) => res.json())
    .then((data) => {
      console.log(JSON.stringify(data));
    })
    .catch((error) => {
      console.log(error);
    });
  ```

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

  API_KEY = "API_KEY"

  # Open the CSV file in binary read mode
  with open('./Ayrshare CSV Template.csv', 'rb') as file:
      # Prepare the files dictionary for the multipart/form-data request
      files = {'file': file}

      # Set up the authorization header
      headers = {'Authorization': f'Bearer {API_KEY}'}

      try:
          # Make the POST request to the API
          response = requests.post(
              'https://api.ayrshare.com/api/post/bulk',
              headers=headers,
              files=files
          )

          # Parse and print the JSON response
          data = response.json()
          print(data)

      except Exception as e:
          print(f"Error: {e}")
  ```
</RequestExample>

<ResponseExample>
  ```javascript 200: OK مثال مع منشورين مجدولين. theme={"system"}
  {
      "status": "success",
      "posts": [
          {
              "status": "scheduled",
              "scheduleDate": "4/6/21 12:50",
              "id": "X3uTExuEJhyM3u8wCRsA",
              "post": "A great post"
          },
          {
              "status": "scheduled",
              "scheduleDate": "4/6/21 13:00",
              "id": "8RGrekuxMnVa7lVnARFm",
              "post": "An even better post"
          }
      ]
  }
  ```
</ResponseExample>
