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

# Claim

> Instant claimable tenant: provision it, claim it, go live.

Infi provisions a **claimable tenant** immediately — with a seed product and
`sk_test_*` plus `pk_test_*` — before you log in. Then you **claim** it and
become the owner. It is the flow Cursor, Lovable and the CLI use.

<Info>
  **Sandbox → claim.** "Sandbox" in day-to-day speech = a claimable tenant with a test key. The API and
  the CLI use the **claim / claimable** vocabulary (`POST /public/v1/claimables`,
  `infi claim create`). How to get the key is in
  [quickstart](https://beinfi.com/en/inicio-rapido).
</Info>

## What gets provisioned

One provisioning call prepares:

<CardGroup cols={2}>
  <Card title="Anonymous tenant">
    A random slug (`app-ec62ff27`), ready to be claimed.
  </Card>

  <Card title="App + seed catalog">
    An example product, **not ready to sell**: version 1 in `draft` and no meter.
  </Card>

  <Card title="sk_test_* key">
    Returned **once only**, in the response body. Keep it carefully.
  </Card>

  <Card title="pk_test_* key">
    Publishable key, safe for the browser. Reserved: no route accepts it today, so do not build on it. The sk\_test\_\* stays on your server.
  </Card>

  <Card title="claimUrl">
    `https://app-sandbox.beinfi.com/claim/{id}` — you open it and log in.
  </Card>
</CardGroup>

<Warning>
  **The public endpoint does not take `intent`.** `intent` (crm, prepaid-ai-chat, one-time, usage-saas) is a concept of the CLI
  and the company file. Sending `{"intent":"…"}` to `/public/v1/claimables`
  answers `422 unrecognized field`. To choose the shape of the catalog, declare it
  in [company as code](https://beinfi.com/en/company-as-code) — or create the products directly
  through the [catalog](https://beinfi.com/en/catalogo).
</Warning>

## Lifecycle

| State       | How it gets there                                     | What happens                                                       |
| ----------- | ----------------------------------------------------- | ------------------------------------------------------------------ |
| `UNCLAIMED` | `POST /public/v1/claimables` (or `infi claim create`) | Account prepared, seed applied, `sk_test_*` and `pk_test_*` issued |
| `CLAIMED`   | Opening the `claimUrl` and claiming it                | Links the owning user, records `signup_source` and `claimed_at`    |
| Expired     | The `expiresAt` deadline passes without a claim       | An unclaimed account expires                                       |

To check the state without a key:

```bash theme={null}
curl https://api-sandbox.beinfi.com/public/v1/claimables/{id}
# -> { id, status, tenantSlug, productId, ref, expiresAt }   (no key)
```

<Warning>
  **Finish within the deadline.** The default window is 30 days. Use the `expiresAt` the API returns and claim
  before that date to keep the account and the keys.
</Warning>

## A prepared account and the claim email

The agent can collect an email and an app name before provisioning.
`accountName` fills in the account name; `email` is a contact that is not
verified yet. Logging in during the claim is what confirms who takes the
account.

With the claim-email update, provisioning with an address queues a notice
carrying the name, the link and the deadline. Delivery happens in the
background, and never includes the keys. Failures are retried, and at most one
notice is queued per address every 24 hours. Accounts already claimed or expired
are skipped before sending.

Continue the integration with the returned credentials. The agent hands the
`claimUrl` back in the conversation even when there is an email: `201` confirms
creation, not delivery. Do not create another account to force a resend. See
[agent onboarding](https://beinfi.com/en/agent-onboarding) for the step by step.

## The flow

1. **Provision** — curl (or CLI/MCP) returns `claimUrl`, `expiresAt`, `sk_test_*` and `pk_test_*`.
2. **Catalog** — create and publish your product: [catalog](https://beinfi.com/en/catalogo).
3. **Charge** — [payment link](https://beinfi.com/en/link-de-pagamento) or `checkout()`, and
   confirm the payment through [webhook/polling](https://beinfi.com/en/webhooks).
4. **Claim** — open the `claimUrl` from the conversation or the email, log in and
   review the name. Products, keys and slug are preserved.
5. **Go live** — the provider's human KYC and `sk_live_`. Never skip KYC.

## signup\_source

Where the provisioning came from becomes the tenant's `signup_source` — it is
the `ref` you send when provisioning (`lovable`, `cursor`, `bolt`, `claude`,
`cli`, `web`, `mcp`):

```bash theme={null}
curl -X POST https://api-sandbox.beinfi.com/public/v1/claimables \
  -H 'Content-Type: application/json' -d '{"ref":"lovable"}'
```

<Tip>
  Came from Lovable? See the [Lovable integration guide](https://beinfi.com/en/lovable).
</Tip>
