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

# Quickstart

> From nothing to a live assistant on a merchant's storefront, in six calls.

Every call is server-to-server with your partner key. Substitute your own
merchant id for `merchant_8812` — that id is the only handle you ever use.

<Note>
  All examples use `https://api.impellabs.tech/api/v1`. Set `$KEY` to your
  `tgpk_…` secret.
</Note>

## 1. Provision the tenant

```bash theme={null}
curl -X POST https://api.impellabs.tech/api/v1/partner/tenants/ \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{
    "external_ref": "merchant_8812",
    "name": "Moti Creations",
    "owner_email": "owner@moticreations.com",
    "monthly_credit_cap": 5000
  }'
```

```json theme={null}
{ "external_ref": "merchant_8812", "id": "…", "status": "active",
  "billed_to": "partner", "billing_mode": "payg", "monthly_credit_cap": 5000 }
```

**201** on create, **200** on a repeat. Safe to retry after a timeout — see
[idempotency](/reseller/tenants#idempotency). No email is sent and the merchant
cannot log in; they were never asked to.

`monthly_credit_cap` is required. It is the brake between one busy merchant and
your invoice.

## 2. Give it knowledge

```bash theme={null}
curl -X PUT https://api.impellabs.tech/api/v1/partner/tenants/merchant_8812/knowledge/sync/ \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{
    "name": "Store policies",
    "items": [
      {"external_id": "shipping", "title": "Shipping",
       "body": "Orders ship within 3 working days across India."},
      {"external_id": "returns", "title": "Returns",
       "body": "Unused items can be returned within 7 days."}
    ]
  }'
```

Send everything you have, every time. Anything you stop sending is removed, and
re-sending unchanged text costs nothing. You never track our ids.

## 3. Connect your tools

```bash theme={null}
curl -X POST https://api.impellabs.tech/api/v1/partner/tenants/merchant_8812/tools/ \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{
    "label": "Storefront",
    "url": "https://mcp.yourplatform.com/mcp",
    "auth_token": "token-that-identifies-merchant-8812-to-you"
  }'
```

The same URL for every merchant, a **different token** each time. Your server
resolves which merchant from the token. See [tool servers](/reseller/tools).

## 4. Create the assistant

```bash theme={null}
curl -X POST https://api.impellabs.tech/api/v1/partner/tenants/merchant_8812/assistants/ \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{
    "display_name": "Meera",
    "agent_type": "sales",
    "tone": "friendly",
    "languages": ["en", "hi"],
    "channels": ["website"],
    "instructions": "Greet the customer and help them find a design.",
    "capabilities": {"tool_servers": {"enabled": true, "config": {}}}
  }'
```

`tool_servers` must be enabled or the tools from step 3 are ignored.

## 5. Set up the website channel

```bash theme={null}
curl -X POST https://api.impellabs.tech/api/v1/partner/tenants/merchant_8812/channels/website/ \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{"allowed_origins": ["https://moticreations.com"]}'
```

```json theme={null}
{ "public_key": "…",
  "embed_snippet": "<script src=\"https://cdn.impellabs.tech/sdk/impel-chat.js\"\n  data-impel-key=\"…\"\n  data-api-base-url=\"https://api.impellabs.tech/api/v1\"\n  data-brand-color=\"#1f3c7a\"\n  defer></script>" }
```

Paste `embed_snippet` into the merchant's storefront. `allowed_origins` is
required — an unrestricted key is one anyone can lift off the page.

## 6. Go live

```bash theme={null}
curl -X POST https://api.impellabs.tech/api/v1/partner/tenants/merchant_8812/assistants/<id>/activate/ \
  -H "Authorization: Bearer $KEY"
```

<Warning>
  **Until this call the widget answers 503.** Provisioned and live are separate
  states on purpose: an assistant that starts talking to customers the moment it
  exists is the worst possible first impression. If you want your merchant to
  preview first, this is where that screen goes.
</Warning>

## What to build next

<CardGroup cols={2}>
  <Card title="Tool server" icon="wrench" href="/mcp/overview">
    The half that lives in your codebase.
  </Card>

  <Card title="Usage and caps" icon="gauge" href="/reseller/usage">
    Watch spend before the invoice, not after.
  </Card>
</CardGroup>
