# Embed Overview

Cloutly Embed lets you render the Cloutly app in your product using an iframe while your backend controls auth and tenancy through signed JWT claims.

## Core flow

1. Your frontend requests an embed JWT from your backend.
2. Your backend signs a short-lived token with your Cloutly signing key.
3. Cloutly validates the token, then upserts user and business records.
4. The iframe session loads in the scoped business context.

```mermaid
flowchart LR
  user[Your User] --> app[Your Frontend]
  app --> api[Your Backend]
  api -->|signed JWT| embed[Cloutly Embed]
  embed -->|upsert user and business| session[Embedded Session]
  session --> app
```

## Required JWT claims

* `externalUserEmail`
* `externalBusinessId`
* `businessDisplayName`
* `firstName`
* `lastName`
* `role`
* `smsLimits`
* `iat`
* `exp`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloutly.com/reviews-sdk-for-marketplace-websites/cloutly-embed/embed-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
