> ## 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), जिसमें एक स्वीकृत App हो
  * यूज़र एक्सेस टोकन (OAuth 1.0a या OAuth 2.0 PKCE)
</Note>

***

<div id="create-a-list">
  ## एक सूची बनाएँ
</div>

<Steps>
  <Step title="अपना अनुरोध तैयार करें">
    सूची का नाम (आवश्यक) और वैकल्पिक विवरण व गोपनीयता सेटिंग तय करें:

    ```json theme={null}
    {
      "name": "Tech News",
      "description": "Top tech journalists and publications",
      "private": false
    }
    ```
  </Step>

  <Step title="अनुरोध भेजें">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl -X POST "https://api.x.com/2/lists" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "name": "Tech News",
          "description": "Top tech journalists and publications",
          "private": false
        }'
      ```

      ```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.create(
          name="Tech News",
          description="Top tech journalists and publications",
          private=False
      )

      print(f"List created: {response.data.id} - {response.data.name}")
      ```

      ```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.create({
        name: "Tech News",
        description: "Top tech journalists and publications",
        private: false,
      });

      console.log(`List created: ${response.data?.id} - ${response.data?.name}`);
      ```
    </CodeGroup>
  </Step>

  <Step title="रिस्पॉन्स की समीक्षा करें">
    ```json theme={null}
    {
      "data": {
        "id": "1441162269824405510",
        "name": "Tech News"
      }
    }
    ```

    बाद में सूची को अपडेट या हटाने के लिए `id` सहेजकर रखें।
  </Step>
</Steps>

***

<div id="update-a-list">
  ## सूची अपडेट करें
</div>

किसी सूची का नाम, विवरण या गोपनीयता संशोधित करें:

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X PUT "https://api.x.com/2/lists/1441162269824405510" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Tech News & Insights",
      "description": "Updated description"
    }'
  ```

  ```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.update(
      "1441162269824405510",
      name="Tech News & Insights",
      description="Updated description"
  )

  print(f"Updated: {response.data.updated}")
  ```

  ```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.update("1441162269824405510", {
    name: "Tech News & Insights",
    description: "Updated description",
  });

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

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

```json theme={null}
{
  "data": {
    "updated": true
  }
}
```

***

<div id="delete-a-list">
  ## किसी सूची को हटाएँ
</div>

<Steps>
  <Step title="सूची की ID प्राप्त करें">
    आपको उस सूची की ID चाहिए जिसे आप हटाना चाहते हैं।
  </Step>

  <Step title="हटाने का अनुरोध भेजें">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl -X DELETE "https://api.x.com/2/lists/1441162269824405510" \
        -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.delete("1441162269824405510")
      print(f"Deleted: {response.data.deleted}")
      ```

      ```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.delete("1441162269824405510");
      console.log(`Deleted: ${response.data?.deleted}`);
      ```
    </CodeGroup>
  </Step>

  <Step title="हटाने की पुष्टि करें">
    ```json theme={null}
    {
      "data": {
        "deleted": true
      }
    }
    ```
  </Step>
</Steps>

<Warning>
  आप केवल वही सूचियाँ हटा सकते हैं जिनके आप स्वामी हैं।
</Warning>

***

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

<CardGroup cols={2}>
  <Card title="सूची सदस्य" icon="users" href="/hi/x-api/lists/list-members/introduction">
    सूची सदस्यों को जोड़ें और हटाएँ
  </Card>

  <Card title="सूची खोज" icon="magnifying-glass" href="/hi/x-api/lists/list-lookup/quickstart">
    सूची का विवरण देखें
  </Card>

  <Card title="एकीकरण मार्गदर्शिका" icon="book" href="/hi/x-api/lists/manage-lists/integrate">
    मुख्य अवधारणाएँ और सर्वोत्तम प्रथाएँ
  </Card>

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