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

# Post a Comment

> प्रकाशित पोस्ट में एक टिप्पणी जोड़ें

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 HeaderAPI = ({noProfileKey, profileKeyRequired}) => <>
    <ParamField header="Authorization" type="string" required>
      <a href="/apis/overview#authorization">API Key</a> of the Primary Profile.
      <br />
      <br />
      Format: <code>Authorization: Bearer API_KEY</code>
    </ParamField>
    {!noProfileKey && (profileKeyRequired ? <ParamField header="Profile-Key" type="string" required>
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField> : <ParamField header="Profile-Key" type="string">
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField>)}
  </>;

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 />

Comments API का उपयोग करके Ayrshare Post ID (Ayrshare के माध्यम से भेजे गए पोस्ट) या Social Post ID (Ayrshare के बाहर भेजे गए पोस्ट) के साथ पोस्ट पर टिप्पणी जोड़ें।

<ul class="custom-bullets">
  <li>X Thread में जोड़ी गई टिप्पणियाँ पहले Tweet पर पोस्ट की जाएँगी।</li>
  <li>Instagram Story टिप्पणियाँ अभी तक Meta द्वारा समर्थित नहीं हैं।</li>
  <li>ID प्रकार के आधार पर समर्थित प्लेटफ़ॉर्म्स के लिए नीचे `platforms` field देखें।</li>
</ul>

विभिन्न ID प्रकारों के बारे में अधिक जानकारी के लिए कृपया [Comments Overview](/apis/comments/overview) देखें।

समर्थित प्लेटफ़ॉर्म्स: Bluesky, Facebook, Instagram, LinkedIn, Reddit, TikTok, X, और YouTube।

## Header Parameters

<HeaderAPI noProfileKey={false} />

## Body Parameters

<ParamField body="id" type="string" required>
  [/post endpoint](/apis/post/post) से Ayrshare Post ID या Social Post ID।
</ParamField>

<ParamField body="comment" type="string" required>
  पोस्ट में जोड़ी जाने वाली नई टिप्पणी का text।
</ParamField>

<ParamField body="searchPlatformId" type="boolean" default={false}>
  यदि [Social Post ID](/apis/comments/overview#comments-with-social-post-id) का उपयोग करके टिप्पणी पोस्ट कर रहे हैं, जो सोशल नेटवर्क से पोस्ट `id` है, तो `true` पर सेट करें।
</ParamField>

<ParamField body="platforms" type="array" required>
  टिप्पणियाँ जोड़ने के लिए प्लेटफ़ॉर्म्स निर्दिष्ट करें।

  यदि [Ayrshare Post ID](/apis/comments/overview#comments-with-ayrshare-post-id) का उपयोग कर रहे हैं तो समर्थित प्लेटफ़ॉर्म्स हैं: `bluesky`, `facebook`, `instagram`, `linkedin`, `reddit`, `tiktok`, `twitter`, `youtube`।

  यदि कोई प्लेटफ़ॉर्म निर्दिष्ट नहीं है, तो टिप्पणी सभी कनेक्टेड प्लेटफ़ॉर्म्स पर प्रकाशित की जाएगी जो टिप्पणियों का समर्थन करते हैं।

  ```json Post a Comment with the Ayrshare Post ID theme={"system"}
  {
    "id": "Ut1fWU6XkqkMayHGnJZ", // Ayrshare Post ID
    "comment": "An amazing comment!", // required
    "platforms": [
      "bluesky",
      "facebook",
      "instagram",
      "linkedin",
      "reddit",
      "tiktok",
      "twitter",
      "youtube"
    ]
  }
  ```

  यदि [Social Post ID](/apis/comments/overview#comments-with-social-post-id) का उपयोग कर रहे हैं तो समर्थित प्लेटफ़ॉर्म्स हैं - एक बार में केवल एक प्लेटफ़ॉर्म की अनुमति है: `facebook`, `instagram`, `linkedin`, `tiktok`, `twitter`।

  ```json Post a Comment with the Social Post ID theme={"system"}
  {
    "id": "1288899996423983105", // Social Post ID
    "comment": "An amazing comment!", // required
    "searchPlatformId": true, // required
    // facebook, instagram, linkedin, tiktok, twitter
    "platforms": ["facebook"] // Only specify one platform
  }
  ```
</ParamField>

<ParamField body="mediaUrls" type="array">
  Facebook या X/Twitter के लिए image URL प्रदान करके एक image संलग्न करें।

  <Note>`mediaUrls` field में केवल एक image समर्थित है। समर्थित प्लेटफ़ॉर्म्स Facebook, LinkedIn, और X/Twitter हैं।</Note>

  ```json Post a Comment with an Image theme={"system"}
  {
    "id": "Ut1fWU6XkqkMayHGnJZ", // Ayrshare Post ID
    "comment": "An amazing comment!", // required
    "platforms": ["facebook"], // Facebook, LinkedIn, or X/Twitter only
    "mediaUrls": ["https://img.ayrshare.com/gb.jpg"]
  }
  ```
</ParamField>

## टिप्पणियों में @Mentions

आप सीधे `comment` text string में @mentions शामिल कर सकते हैं। Mentions के लिए कोई अलग parameter नहीं है। बस अपने comment text में `@handle` जोड़ें।

```json Comment with @Mention theme={"system"}
{
  "id": "Ut1fWU6XkqkMayHGnJZ",
  "comment": "Great post @CompanyName! Love this.",
  "platforms": ["linkedin", "twitter", "facebook"]
}
```

<Note>
  **LinkedIn Mentions:** LinkedIn mentions Ayrshare द्वारा server-side resolve किए जाते हैं। सही vanity name या member name देखने के लिए [LinkedIn Search endpoint](/apis/listen/search/linkedin-search) का उपयोग करें। संगठनों के लिए, `@handle` का उपयोग करें। सदस्यों के लिए, `@vanity_name` या `@[Full Name]` का उपयोग करें।
</Note>

प्रति प्लेटफ़ॉर्म विस्तृत mention सिंटैक्स और सीमाओं के लिए देखें:

* [Bluesky mentions](/apis/post/social-networks/bluesky#bluesky-mentions)
* [Facebook mentions](/apis/post/social-networks/facebook#facebook-page-mentions)
* [Instagram mentions](/apis/post/social-networks/instagram#instagram-mentions)
* [LinkedIn mentions](/apis/post/social-networks/linkedin#linkedin-mentions)
* [Reddit mentions](/apis/post/social-networks/reddit#reddit-mentions)
* [Threads mentions](/apis/post/social-networks/threads#threads-mentions)
* [TikTok mentions](/apis/post/social-networks/tiktok#tiktok-mentions)
* [X/Twitter mentions](/apis/post/social-networks/x-twitter#mentions)
* [YouTube mentions](/apis/post/social-networks/youtube#youtube-mentions)

प्लेटफ़ॉर्म-दर-प्लेटफ़ॉर्म mention नियमों और अनुशंसाओं के लिए [Post Verification](/testing/post-verification) देखें।

<RequestExample>
  ```bash cURL theme={"system"}
  curl \
  -H "Authorization: Bearer API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"id": "Ut1fWU6XkqkMayHGnJZ", "platforms": ["bluesky", "facebook", "instagram", "linkedin", "reddit", "tiktok", "twitter", "youtube"], "comment": "An amazing comment!"}' \
  -X POST https://api.ayrshare.com/api/comments
  ```

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

  fetch("https://api.ayrshare.com/api/comments", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${API_KEY}`,
    },
    body: JSON.stringify({
      id: "Ut1fWU6XkqkMayHGnJZ", // required
      platforms: ["bluesky", "facebook", "instagram", "linkedin", "reddit", "tiktok", "twitter", "youtube"], // required
      comment: "An amazing comment!", //required
    }),
  })
    .then((res) => res.json())
    .then((json) => console.log(json))
    .catch(console.error);
  ```

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

  payload = {'id': 'Ut1fWU6XkqkMayHGnJZ',
          'platforms': ['bluesky', 'facebook', 'instagram', 'linkedin', 'reddit', 'tiktok', 'twitter', 'youtube'],
          'comment': 'An amazing comment!'}
  headers = {'Content-Type': 'application/json',
          'Authorization': 'Bearer API_KEY'}

  r = requests.post('https://api.ayrshare.com/api/comments',
      json=payload,
      headers=headers)

  print(r.json())
  ```

  ```php PHP theme={"system"}
  <?php

  $apiUrl = 'https://api.ayrshare.com/api/comments';
  $apiKey = 'API_KEY';  // Replace 'API_KEY' with your actual API key

  $headers = [
      'Content-Type: application/json',
      'Authorization: Bearer ' . $apiKey,
  ];

  $data = json_encode([
      'id' => 'Ut1fWU6XkqkMayHGnJZ', // Replace with your actual post ID
      'platforms' => ['bluesky', 'facebook', 'instagram', 'linkedin', 'reddit', 'tiktok', 'twitter', 'youtube'],
      'comment' => 'An amazing comment!'
  ]);

  $curl = curl_init($apiUrl);
  curl_setopt_array($curl, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_POST => true,
      CURLOPT_HTTPHEADER => $headers,
      CURLOPT_POSTFIELDS => $data
  ]);

  $response = curl_exec($curl);

  if ($response === false) {
      echo 'Curl error: ' . curl_error($curl);
  } else {
      echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
  }

  curl_close($curl);
  ```

  ```go Go theme={"system"}
  package main

  import (
  	"bytes"
  	"encoding/json"
  	"log"
  	"net/http"
  )

  func main() {
  	message := map[string]interface{}{
  		"id":      "Ut1fWU6XkqkMayHGnJZ", // required
  		"platforms": []string{"bluesky", "facebook", "instagram", "linkedin", "reddit", "tiktok", "twitter", "youtube"}, // required
  		"comment": []string{"An amazing comment!"} // required
  	}

  	bytesRepresentation, err := json.Marshal(message)
  	if err != nil {
  		log.Fatalln(err)
  	}

  	req, _ := http.NewRequest("POST", "https://api.ayrshare.com/api/comments",
  		bytes.NewBuffer(bytesRepresentation))

  	req.Header.Add("Content-Type", "application/json; charset=UTF-8")
  	req.Header.Add("Authorization", "Bearer API_KEY")

  	res, err := http.DefaultClient.Do(req)
  	if err != nil {
  		log.Fatal("Error:", err)
  	}

  	res.Body.Close()
  }
  ```

  ```csharp C# theme={"system"}
  using System;
  using System.Net.Http;
  using System.Text;
  using System.Threading.Tasks;

  namespace CommentsPOSTRequest_csharp
  {
      class CommentsPOST
      {
          private static readonly HttpClient client = new HttpClient();

          static async Task Main(string[] args)
          {
              string API_KEY = "API_KEY";
              string url = "https://api.ayrshare.com/api/comments";

              client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);

              string json = "{\"id\": \"Ut1fWU6XkqkMayHGnJZ\"," +
                  "\"platforms\": [\"bluesky\", \"facebook\", \"instagram\", \"linkedin\", \"reddit\", \"tiktok\", \"twitter\", \"youtube\"]," +
                  "\"comment\": [\"An amazing comment!\"]}";

              try
              {
                  var content = new StringContent(json, Encoding.UTF8, "application/json");
                  HttpResponseMessage response = await client.PostAsync(url, content);
                  response.EnsureSuccessStatusCode();
                  string responseBody = await response.Content.ReadAsStringAsync();
                  Console.WriteLine(responseBody);
              }
              catch (HttpRequestException e)
              {
                  Console.WriteLine($"Error: {e.Message}");
              }
          }
      }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200: Success theme={"system"}
  {
    "status": "success",
    "commentID": "IUDSCfdYfFkw_dWhW9PLI", // Ayrshare Comment ID. Used for replying to a comment.
    "id": "Ut1fWU6XkqlMayHGnJZ", // Ayrshare Post ID
    "bluesky": {
      "status": "success",
      "commentId": "at://did:plc:62musrcyanhro2lydyhlw7ci/app.bsky.feed.post/3lf4b4j3dqy2i",
      "cid": "bafyreiaoivcafelkpzhbbjco23pguyqmy7wucuvfxaifgj34qoyp7nrhhy",
      "comment": "Nice one this is",
      "platform": "bluesky",
      "postUrl": "https://bsky.app/profile/ayrshare.com/post/3lf4b4j3dqy2i"
    },
    "facebook": {
      "status": "success",
      "commentId": "358482752285927_363474831785719", // Facebook Social Comment ID
      "comment": "The best comment ever!",
      "platform": "facebook"
    },
    "instagram": {
      "status": "success",
      "commentId": "17060111860440276", // Instagram Social Comment ID
      "comment": "The best comment ever!",
      "platform": "instagram"
    },
    "linkedin": {
      "status": "success",
      "commentId": "urn:li:comment:(urn:li:activity:7141202289402236928,7141205176207503360)", // LinkedIn Social Comment ID
      "comment": "Someone's sitting in the shade today because someone planted a tree a long time ago. - Warren Buffett",
      "commentUrn": "urn:li:comment:(urn:li:activity:7141202289402236928,7141205176207503360)", // Social comment Id from LinkedIn
      "platform": "linkedin"
    },
    "tiktok": {
      "status": "success",
      "commentId": "7260964914699764524", // TikTok Social Comment ID
      "comment": "The best comment ever!",
      "platform": "tiktok",
      "videoId": "7260964048362310959"
    },
    "twitter": {
      "status": "success",
      "commentId": "1525632403262101648", // Twitter Social Comment ID
      "comment": "The best comment ever!",
      "postUrl": "https://twitter.com/ayrshare/status/1525632403262101648"
    },
    "youtube": {
      "status": "success",
      "commentId": "UgzIEZsDQKXgHsEnwTR4AaABAa", // YouTube Social Comment ID
      "comment": "The best comment ever!",
      "platform": "youtube"
    },
  }
  ```

  ```json 404: Not Linked & Success theme={"system"}
  {
    "commentId": "5GizKtM9TFRFFWNDgBZ",
    "twitter": {
      "status": "success",
      "commentId": "1842266484032016",
      "comment": "Having a meeting on this",
      "platform": "twitter",
      "postUrl": "https://twitter.com/ayrshare/status/18422664840320"
    },
    "action": "post",
    "status": "error",
    "code": 156,
    "message": "Instagram is not linked. Please confirm the linkage on the Social Accounts page in the dashboard.",
    "platform": "instagram",
    "id": "1w3QI6bU7KE9XyxrN0u", // Ayrshare Post ID
    "errors": [
      {
        "action": "post",
        "status": "error",
        "code": 156,
        "message": "Facebook is not linked. Please confirm the linkage on the Social Accounts page in the dashboard.",
        "platform": "facebook"
      },
      {
        "action": "post",
        "status": "error",
        "code": 156,
        "message": "Instagram is not linked. Please confirm the linkage on the Social Accounts page in the dashboard.",
        "platform": "instagram"
      }
    ]
  }
  ```

  ```json 400: Duplicate comment theme={"system"}
  {
    "twitter": {
      "action": "post",
      "status": "error",
      "code": 134,
      "message": "The social network detected duplicate content and blocked this post. Please change the content and try again.",
      "post": "Having a meeting on this",
      "detail": "You are not allowed to create a Tweet with duplicate content."
    },
    "code": 134,
    "status": "error",
    "id": "1w3QI6bU7KE9XyxrN", // Ayrshare Post ID
    "errors": [
      {
        "action": "post",
        "status": "error",
        "code": 134,
        "message": "The social network detected duplicate content and blocked this post. Please change the content and try again.",
        "post": "Having a meeting on this",
        "detail": "You are not allowed to create a Tweet with duplicate content.",
        "id": "1w3QI6bU7KE9XyxrN",
        "platform": "twitter"
      }
    ]
  }
  ```
</ResponseExample>
