Getting Started with the Demi API

This guide will help you set up authentication and make your first API call in just a few minutes.

1. Get Your API Key

To use the Demi API, you'll need an API key. Here's how to get one:

  1. Log in to your Demi dashboard
  2. Navigate to Settings → API Keys
  3. Click Generate New Key
  4. Give your key a descriptive name (e.g., "Production Integration")
  5. Select the scopes you need:
    • customers:read - Read customer data
    • customers:write - Create/update customers
    • orders:read - Read order data
    • orders:write - Create/update orders
    • products:read - Read product catalog
  6. Click Generate
Important: Copy your API key immediately! It will only be shown once. If you lose it, you'll need to generate a new one.

2. Make Your First Request

Test your API key by fetching the product catalog:

curl https://api.getdemi.co/api/v1/products \
  -H "X-API-Key: pk_your_api_key_here"

You should receive a JSON response with a list of products:

{
  "data": [
    {
      "id": 1,
      "name": "Organic Chicken Bowl",
      "priceRetail": 12.99,
      "tags": ["healthy", "protein"]
    }
  ],
  "total": 42,
  "limit": 20,
  "offset": 0
}

3. Explore the API

Now that you're authenticated, explore the full API:

Prefer the terminal? Use the Demi CLI for imports, bulk updates, data checks, and agentic workflows backed by the same API.

4. Best Practices

  • Use environment variables - Never hardcode your API key in source code
  • Handle rate limits - Respect the X-RateLimit-Remaining header
  • Implement retries - Use exponential backoff for transient errors
  • Use pagination - Don't fetch all records at once; use limit/offset
  • Keep keys secure - Rotate keys periodically and revoke unused ones

Need Help?

If you run into issues: