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

# Quickstart

> Get your API key and make your first request in under 5 minutes

## Get started with TribeMade API

TribeMade gives you powerful REST APIs and webhooks completely free with your store. Whether you're automating product imports, syncing inventory, or integrating with shipping providers - our APIs make it effortless.

<Note>
  **Already have a TribeMade store?** Great! If not, [create your free store](https://tribemade.in) in minutes and come back here to access your API.
</Note>

Follow these simple steps to start integrating with TribeMade's API.

### Step 1: Get your API key

<Steps>
  <Step title="Log in to your dashboard">
    Go to [TribeMade Dashboard](https://tribemade.in/dashboard) and select your store.
  </Step>

  <Step title="Navigate to Developer section">
    In the sidebar, click on **Developer** (below Settings).
  </Step>

  <Step title="Generate API key">
    Click the **"Generate API Key"** button. Your API key will be displayed immediately.

    <Warning>
      Store your API key securely! Anyone with your API key can manage your products and orders.
    </Warning>
  </Step>
</Steps>

Your API key format looks like this: `tb-xxxx-xxx-xxxx`

### Step 2: Make your first request

Let's fetch an order to verify your API key works correctly.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.tribemade.in/api/orders/YOUR_ORDER_ID \
    -H "X-API-Key: tb-a1b2-c3d-e4f5"
  ```

  ```python Python theme={null}
  import requests

  headers = {
      "X-API-Key": "tb-a1b2-c3d-e4f5"
  }

  response = requests.get(
      "https://api.tribemade.in/api/orders/YOUR_ORDER_ID",
      headers=headers
  )

  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const fetch = require('node-fetch');

  const headers = {
      'X-API-Key': 'tb-a1b2-c3d-e4f5'
  };

  fetch('https://api.tribemade.in/api/orders/YOUR_ORDER_ID', {
      method: 'GET',
      headers: headers
  })
  .then(response => response.json())
  .then(data => console.log(data));
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();

  curl_setopt($ch, CURLOPT_URL, 
      'https://api.tribemade.in/api/orders/YOUR_ORDER_ID');
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'X-API-Key: tb-a1b2-c3d-e4f5'
  ));
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $response = curl_exec($ch);
  curl_close($ch);

  echo $response;
  ?>
  ```
</CodeGroup>

<Tip>
  Replace `YOUR_ORDER_ID` with an actual order ID from your store, and `tb-a1b2-c3d-e4f5` with your real API key.
</Tip>

### Step 3: Create your first product

Now let's create a product programmatically:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.tribemade.in/api/products/create \
    -H "X-API-Key: tb-a1b2-c3d-e4f5" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Simple T-Shirt",
      "price": 499,
      "description": "Basic cotton t-shirt",
      "stock": 50
    }'
  ```

  ```python Python theme={null}
  import requests

  headers = {
      "X-API-Key": "tb-a1b2-c3d-e4f5",
      "Content-Type": "application/json"
  }

  data = {
      "name": "Simple T-Shirt",
      "price": 499,
      "description": "Basic cotton t-shirt",
      "stock": 50
  }

  response = requests.post(
      "https://api.tribemade.in/api/products/create",
      headers=headers,
      json=data
  )

  print(response.json())
  # Output: {"product_id": "660e8400-e29b-41d4-a716-446655440123"}
  ```

  ```javascript Node.js theme={null}
  const fetch = require('node-fetch');

  const headers = {
      'X-API-Key': 'tb-a1b2-c3d-e4f5',
      'Content-Type': 'application/json'
  };

  const data = {
      name: 'Simple T-Shirt',
      price: 499,
      description: 'Basic cotton t-shirt',
      stock: 50
  };

  fetch('https://api.tribemade.in/api/products/create', {
      method: 'POST',
      headers: headers,
      body: JSON.stringify(data)
  })
  .then(response => response.json())
  .then(data => console.log(data));
  // Output: {"product_id": "660e8400-e29b-41d4-a716-446655440123"}
  ```
</CodeGroup>

<Check>
  **Success!** You've created your first product via the API. The response includes the `product_id` you can use to update or delete the product later.
</Check>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="shield-halved" href="/api-reference/authentication">
    Learn about API key security and best practices
  </Card>

  <Card title="Product APIs" icon="box" href="/api-reference/products/create">
    Explore all product management endpoints
  </Card>

  <Card title="Order APIs" icon="truck" href="/api-reference/orders/get-details">
    Learn how to fetch and update orders
  </Card>

  <Card title="Webhooks" icon="bell" href="/api-reference/webhooks">
    Set up real-time order notifications
  </Card>
</CardGroup>

## Common use cases

<AccordionGroup>
  <Accordion icon="upload" title="Bulk product import">
    Import products from your existing inventory system by looping through your data and calling the Create Product API for each item.
  </Accordion>

  <Accordion icon="sync" title="Inventory sync">
    Keep stock levels synchronized between TribeMade and your warehouse system by periodically updating product stock via the Edit Product API.
  </Accordion>

  <Accordion icon="truck-fast" title="Automated shipping">
    When you receive an order webhook, automatically create a shipping label with your courier and update the order status with tracking information.
  </Accordion>

  <Accordion icon="chart-line" title="Analytics integration">
    Pull order data programmatically and feed it into your analytics dashboard for custom reporting.
  </Accordion>
</AccordionGroup>

<Note>
  **Need help?** Contact support through your [TribeMade Dashboard](https://tribemade.in/dashboard) or check out the complete API reference.
</Note>
