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

# पिन की गई सूचियों को प्रबंधित करें

> सूचियों को पिन या अनपिन करें

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

यह गाइड आपको सूचियों को पिन और अनपिन करने का तरीका बताती है।

<Note>
  **पूर्वापेक्षाएँ**

  शुरू करने से पहले, आपके पास ये होने चाहिए:

  * एक स्वीकृत ऐप के साथ [डेवलपर खाता](https://developer.x.com/en/portal/petition/essential/basic-info)
  * उपयोगकर्ता एक्सेस टोकन (OAuth 1.0a या OAuth 2.0 PKCE)
</Note>

***

<div id="pin-a-list">
  ## किसी सूची को पिन करें
</div>

<Steps>
  <Step title="अपनी user ID और सूची ID प्राप्त करें">
    आपको अपने प्रमाणीकृत उपयोगकर्ता की ID और उस सूची की ID चाहिए जिसे आप पिन करना चाहते हैं। किसी सूची को देखते समय उसकी ID, URL में मिल जाएगी।
  </Step>

  <Step title="सूची को पिन करें">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl -X POST "https://api.x.com/2/users/2244994945/pinned_lists" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{"list_id": "1454155907651158017"}'
      ```

      ```python Python SDK theme={null}
      from xdk import Client
      from xdk.oauth1_auth import OAuth1

      oauth1 = OAuth1(
          api_key="YOUR_API_KEY",
          api_secret="YOUR_API_SECRET",
          access_token="YOUR_ACCESS_TOKEN",
          access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
      )

      client = Client(auth=oauth1)

      # किसी सूची को पिन करें
      response = client.lists.pin(
          user_id="2244994945",
          list_id="1454155907651158017"
      )

      print(f"Pinned: {response.data.pinned}")
      ```

      ```javascript JavaScript SDK theme={null}
      import { Client, OAuth1 } from "@xdevplatform/xdk";

      const oauth1 = new OAuth1({
        apiKey: "YOUR_API_KEY",
        apiSecret: "YOUR_API_SECRET",
        accessToken: "YOUR_ACCESS_TOKEN",
        accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
      });

      const client = new Client({ oauth1 });

      // किसी सूची को पिन करें
      const response = await client.lists.pin("2244994945", {
        listId: "1454155907651158017",
      });

      console.log(`Pinned: ${response.data?.pinned}`);
      ```
    </CodeGroup>
  </Step>

  <Step title="रिस्पॉन्स देखें">
    ```json theme={null}
    {
      "data": {
        "pinned": true
      }
    }
    ```
  </Step>
</Steps>

***

<div id="unpin-a-list">
  ## सूची को अनपिन करें
</div>

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.x.com/2/users/2244994945/pinned_lists/1454155907651158017" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

  ```python Python SDK theme={null}
  from xdk import Client
  from xdk.oauth1_auth import OAuth1

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # सूची को अनपिन करें
  response = client.lists.unpin(
      user_id="2244994945",
      list_id="1454155907651158017"
  )

  print(f"Pinned: {response.data.pinned}")
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client, OAuth1 } from "@xdevplatform/xdk";

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // सूची को अनपिन करें
  const response = await client.lists.unpin("2244994945", "1454155907651158017");

  console.log(`Pinned: ${response.data?.pinned}`);
  ```
</CodeGroup>

**रिस्पॉन्स:**

```json theme={null}
{
  "data": {
    "pinned": false
  }
}
```

***

<div id="important-notes">
  ## महत्वपूर्ण नोट्स
</div>

<Note>
  * आप केवल उन्हीं सूचियों को पिन कर सकते हैं जिन्हें आप फ़ॉलो करते हैं या जिनके मालिक आप हैं
  * पिन की गई सूचियाँ X ऐप में आपकी सूचियों में सबसे ऊपर दिखाई देती हैं
  * आप जितनी सूचियाँ पिन कर सकते हैं, उनकी संख्या सीमित है
</Note>

***

<div id="next-steps">
  ## अगले चरण
</div>

<CardGroup cols={2}>
  <Card title="पिन की गई सूचियों की जानकारी" icon="thumbtack" href="/hi/x-api/lists/pinned-lists/quickstart/pinned-list-lookup">
    अपनी पिन की गई सूचियाँ प्राप्त करें
  </Card>

  <Card title="सूची जानकारी" icon="list" href="/hi/x-api/lists/list-lookup/quickstart">
    सूची का विवरण प्राप्त करें
  </Card>

  <Card title="API संदर्भ" icon="code" href="/hi/x-api/lists/pin-list">
    एंडपॉइंट का पूर्ण दस्तावेज़ीकरण
  </Card>
</CardGroup>
