# For platforms, SaaS and apps

**Who it is for:** you build a platform, a SaaS or an app with many customers —merchants, clinics, shops, real estate agencies— and you want each of them to have WhatsApp and an AI agent (a **Met**) that answers, inside your product.

**What you can build today:**

- **Create each customer's Meteor account** from your backend, load Energy onto it and leave it ready to use.
- **Connect their WhatsApp** with a single-use link, without them leaving your product.
- **Find out by webhook** when their line got connected, or why it failed.
- **Show them their WhatsApp inbox inside your page**, with your theme, your color and your language. It is in pilot.
- **Operate their account with the same API**: run their Met, read their CRM, check the health of their channels and how much they consume.
- **Ask for access to accounts that already exist** with an OAuth app, if your customers already use Meteor.

[AI agents for SaaS](https://meteor.com.co/en/soluciones/software) tells the same story for whoever decides in your company, without the technical detail.

## Two paths, depending on who owns the account

| Your case | Path | How you authenticate |
|---|---|---|
| You create and operate your customers' accounts | Tech Partner program | Partner API key |
| Your customers already have a Meteor account and grant you access | OAuth app | The token each customer authorizes |

Creating accounts, connecting WhatsApp and embedding the inbox are capabilities of **approved Tech Partners**. Their permissions only exist on partner keys, and none of them works with a test key (`met_test_`), because they create accounts and connect real numbers. Tech Partner is not bought: you apply through the [Tech Partner program](https://meteor.com.co/partners/tech-partners) telling us what you build, the team reviews it and, once approved, it is enabled.

You don't need to wait for approval to start: your own trial account includes API access, and a test partner key lets you check that your backend handles every error along the way before you have the live key.

## The path, in six steps

1. **Try the API on your account.** Issue a key in **Settings → Developers** and run your first Met. See [Authentication](authentication.html) and [Run Mets](run-mets.html).
2. **Walk through Meteor inside.** The four steps end to end —create the account, connect WhatsApp, confirm by webhook and mount the inbox—, with the minimal code for each one and a reference app. See [Meteor inside](meteor-inside.html).
3. **Create your customers' accounts.** Idempotent sign-up, Energy, plan, monthly quotas and closure, which is in pilot. See [Account provisioning](account-provisioning.html).
4. **Connect their WhatsApp and show them their inbox.** The connection link, the line notifications, the embedded inbox and what you can customize in it. See [WhatsApp for platforms](whatsapp-for-platforms.html).
5. **Find out what happens without polling.** Subscribe to events, verify the signature and watch the channel health of all your accounts. See [Webhooks](webhooks.html), [Events](events.html) and [Channel status](channel-status.html).
6. **If your customers already use Meteor**, connect your app with OAuth and PKCE instead of asking for their API key. See [Third-party OAuth apps](oauth-apps.html).

Your own partner business —attributed customers, commissions, opportunities, projects and tickets— has its own API: [Partners API](../../partners.html).

## Minimal example

From your backend, with the partner key: create a customer's account and request the link so they connect their WhatsApp from your page.

```ts
import Met from '@meteor.ia/sdk';

const met = new Met(process.env.MET_PARTNER_KEY!);

// 1. The customer's account: it is born attributed to you and without Energy
const account = await met.workspaces.create(
  { business_name: 'Restaurante La Esquina', owner_email: 'owner@laesquina.co', owner_name: 'Carlos Ruiz' },
  { idempotencyKey: `signup-${customer.id}` }, // a retry returns the same account
);
// Load Energy before their first message: met.workspaces.recharge(...)

// 2. The single-use link to connect their WhatsApp
const session = await met.workspaces.whatsappConnectSession(account.id, {
  return_origin: 'https://app.yourplatform.com', // an origin registered for your partner
});
// session.connect_url → open it on the customer's click; don't store it, it works once.
// The line confirmation arrives through the channel.line.connected webhook.
```

## What it does not cover

- **New numbers.** The API does not create or buy WhatsApp numbers: your customer connects a number they already have, through coexistence or as a dedicated number.
- **Chat with a Met inside your page.** What you can embed today is the WhatsApp inbox.
- **The owner's password.** You don't set it: Meteor emails the owner so they create it.
- **Accounts that are not yours.** Your partner key only operates the accounts attributed to you; on any other it answers `403 workspace_not_attributed`. The owner of each account can revoke your access whenever they want.
- **Test keys on the real steps.** Creating accounts, loading Energy, connecting WhatsApp and embedding the inbox don't run with a `met_test_` key.
