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

# Partner Overview

> Build widgets for your customers with the Widgetic API and show them in your platform

Partners build widgets for their own customers with the Widgetic API, and show them in their own platform with the embed code. You can also mount Widgetic's own pieces (the File Browser, the Composition Editor, the Embed Editor, the Widget Creator with its agentic chat, and Workflows) in your own page for one customer at a time, without your API key ever reaching the browser.

> [!NOTE]
>
> Partners have a step-by-step guide as well: the [Widgetic Partner integration guide](https://docs.superhuman.com/d/_do4kTYR8IRR/Widgetic-Partner-integration-guide_suGRjp1a). It gives the order to do things in, a brief you can hand to an AI agent, a test plan and a go-live checklist. This documentation is the reference for every call and answer, so use them together. Start with [section 1](https://docs.superhuman.com/d/_do4kTYR8IRR/_su1G6LIg) to choose your approach and [section 3](https://docs.superhuman.com/d/_do4kTYR8IRR/_suFm6jnK) to set up your partner account.

## What Partners Can Do

> [card] Build and Embed Widgets
>
> Create compositions with the API and show the published widgets in your platform with the embed code

> [card] [Keep Track of End-Users](https://docs.widgetic.com/docs/partners/managed-users.md)
>
> Keep a record of your customers as managed users, and find one customer's widgets when they ask for help

> [card] [Editors in Your Page](https://docs.widgetic.com/docs/partners/ui-components)
>
> Mount Widgetic's File Browser, Composition Editor, Embed Editor, AI Widget Creator and Workflows in your own page for one customer at a time

> [card] [A/B Tests and Translations](https://docs.widgetic.com/docs/partners/ab-tests-and-translations.md)
>
> Make and run A/B tests and translations from your server, for one customer at a time

> [card] [Credits & Billing](https://docs.widgetic.com/docs/partners/credits-billing.md)
>
> Pay by invoice, with tax, and track the AI credits on your account

> [card] [Your Own Storage](https://docs.widgetic.com/docs/partners/storage.md)
>
> Your customers' files are kept in a bucket you own

> [card] [Dashboard and Analytics](https://docs.widgetic.com/docs/partners/dashboard.md)
>
> Your credits, invoices, customers and presets, and how their widgets are viewed

> [card] [Notifications](https://docs.widgetic.com/docs/partners/notifications.md)
>
> Invoices, payments, low credits and pauses, by email and as signed webhooks

## Partner API Key

A partner key starts with `wgt_prt_` and acts as your partner. You make it yourself: sign in with the shared mailbox that Widgetic invited, open your partner's home workspace and make the key under Settings → API keys. Make one key for each integration, named after what it serves (the checkout server, the support tool), with only the access that integration needs, so you can switch one off without stopping the others. **Widgetic never makes or sends you a key.** [API keys](https://docs.widgetic.com/docs/api-keys.md) shows how.

A partner key reaches everything your account can (compositions, widgets, uploads and workflows) and the partner endpoints: your managed users, your contract, your invoices and your credits.

A key does everything your account may do, unless you limit it when you make it. A server that only reads your invoices, for example, can hold a key that cannot create anything. See [Limit what a key can do](https://docs.widgetic.com/docs/authentication.md#limit-what-a-key-can-do).

## Your Account

A partner is **one login with one workspace**. Widgetic makes both for you when it invites you: you give it the address of a shared mailbox of your company (not the address of one person, so the account survives a change of staff), and Widgetic sends that mailbox an invitation with a link to choose a password. There is no sign-up, and you do not choose a plan: your contract decides your credits and features, and your workspace shows what it includes instead of a plan to buy.

* **There is one workspace and nobody else in it.** You cannot add a second workspace, invite a person into yours, or join another workspace with this login. Your customers do not need logins: they are [managed users](https://docs.widgetic.com/docs/partners/managed-users.md) and use your widgets and editors through you.
* **Your account cannot be deleted by you.** A partnership ends on a date, not by deleting the account: after the last day there are 60 days in which you can read and export everything, and then the account closes. See [Ending a Partnership](https://docs.widgetic.com/docs/partners/ending-a-partnership.md).
* **One login is the owner of one partner, for good.** Widgetic does not move a partnership to another login. If the shared mailbox changes hands, ask Widgetic to replace the address of the owner login: the old password stops working, the people who held the old mailbox are signed out everywhere, and a new invitation goes to the new address.

## Your Account Status

A partner account starts **inactive** and has no trial: you pay from the first day, and Widgetic activates the account once your contract is in force and your storage works. An invoice of your contract that is still unpaid after its due date stops the account by itself until it is paid, and Widgetic can also pause an account by hand. While the account is stopped, paused or not yet active, your customers cannot use your widgets or editors, and what you can change is limited to paying, buying credits, your storage, your notifications and your keys. After the last day of a partnership the account only reads, and later it closes. See [Account Status](https://docs.widgetic.com/docs/partners/account-status.md) and [Ending a Partnership](https://docs.widgetic.com/docs/partners/ending-a-partnership.md).

## Architecture Overview

```mermaid theme={"theme":"css-variables"}
flowchart TD
    Partner[Your Platform] --> API[Partner API]
    Partner --> Embed[Embed Code]
    API --> Users[Managed Users]
    API --> Compositions[Widgets and Compositions]
    API --> Credits[Credits/Billing]
    API --> Entitlements[Entitlements]
    API --> Sessions[Editor Sessions]
    Embed --> Published[Published Widget]
    Partner --> UI["UI SDK"]
    UI --> Editors["File Browser, Composition Editor, Embed Editor, Widget Creator, Workflows"]
    Sessions -.-> Editors
```

The dotted line is the short-lived token your server gives the page, so the editors work with one customer's content and your API key stays on your server.

## Key Concepts

### Managed Users

A managed user is a record of one of your customers in your partner registry. It is not a login, and it does not own anything: everything you create through the API belongs to your partner's workspace. What you can do is file a composition, a widget or an upload under a managed user when you create it, and list your workspace's items by that managed user later, so each of your customers sees only their own. You create and manage managed users via the API. When one of your customers asks for help, your dashboard's **End users** page finds them by their id, name or email and opens everything they made (see [Dashboard](https://docs.widgetic.com/docs/partners/dashboard.md#end-users)).

```bash theme={"theme":"css-variables"}
curl -sS -X POST "https://api.widgetic.com/v1/managed-users" \
  -H "Authorization: Bearer $WIDGETIC_PARTNER_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "externalId": "your-platform-user-123", "metadata": { "name": "John Doe", "email": "john@example.com" } }'
```

See [Managed Users](https://docs.widgetic.com/docs/partners/managed-users.md) for the full picture.

### Editor Sessions

An editor session is a short-lived token that your server makes for one managed user. Your page gives it to a Widgetic editor, which then reads and changes that customer's content and nothing else. Your API key never reaches the browser. See [Editor Sessions](https://docs.widgetic.com/docs/partners/editor-sessions.md).

### UI Components

The UI SDK (`@widgetic/ui-sdk`) mounts five pieces in your own page. Each draws inside a shadow root, so your page's styles and its own do not touch each other:

* **File Browser**: browse, upload and pick files, from Widgetic's media library or from your own.
* **Composition Editor**: change the texts, pictures, colours and fonts of a widget, beside a live preview.
* **Embed Editor**: decide how and where a widget shows on a page and get the embed code to paste, with an assistant that sets the options from a sentence.
* **Widget Creator**: the whole Widgetic canvas, with the AI that builds a widget from a description.
* **Workflows**: chain a customer's compositions into a path, with filters between them that decide which composition a visitor sees next.

See [UI Components](https://docs.widgetic.com/docs/partners/ui-components) for the SDK and what the pieces have in common, and for each piece its own page: the [File Browser](https://docs.widgetic.com/docs/partners/ui-components/file-browser.md), the [Composition Editor](https://docs.widgetic.com/docs/partners/ui-components/composition-editor.md), the [Embed Editor](https://docs.widgetic.com/docs/partners/ui-components/embed-editor.md), the [Widget Creator](https://docs.widgetic.com/docs/partners/ui-components/widget-creator.md) and [Workflows](https://docs.widgetic.com/docs/partners/ui-components/workflows.md), the screen where a customer builds a path.

### Preset Widgets

A preset is a widget of your own that you offer your customers as a starting point, under a short key your code uses. Your server lists them and gives a customer a copy (or a composition) of the one they pick. See [Preset Widgets](https://docs.widgetic.com/docs/partners/managed-users.md#preset-widgets).

A workflow of yours can be a starting point too: your customers copy it, with a copy of every widget it chains, and build on it. See [Starting points](https://docs.widgetic.com/docs/partners/ui-components/workflows.md#starting-points).

### Credits System

You pay Widgetic by invoice, and Widgetic issues each invoice by itself: one for the credits of every billing period, at your price for a credit. Paying it adds those credits to your account, and when they run out you can buy extra credits with one API call. Credits pay for Widgetic's AI: each generation uses 1 credit. Creating compositions, embedding widgets, storage and API calls do not use credits. An invoice of your contract that is unpaid after its due date stops the account until it is paid. See [Credits & Billing](https://docs.widgetic.com/docs/partners/credits-billing.md).

## Getting Started

**1. Accept the Invitation and Make Your Partner Key**

Contact our sales team to become a partner, and tell them the address of the shared mailbox of your company that will own your partner, and the website where you will integrate Widgetic, such as `acme.com`. Widgetic sets up your partner and its one workspace, records that website as your platform domain, so it and all of its subdomains can always show your widgets (see [Security](https://docs.widgetic.com/resources/security.md#your-platform-is-always-allowed)), and sends an invitation to that mailbox. The account stays inactive until it is activated (see below). Open the invitation, choose a password, sign in, and make your own partner key under Settings → API keys in your partner's home workspace, named after the integration it serves. The secret is shown once, so store it when you make it. See [Security](https://docs.widgetic.com/resources/security.md) for rotating and deleting keys.

**2. Run the Four Connection Checks**

With your partner id and key, run the [four checks](https://docs.widgetic.com/docs/partners/connect.md) from your server before you write integration code.

**3. Set Up Your Storage**

Save a bucket of your own on any S3-compatible service with `PUT /partners/{partnerId}/storage`. It is checked before it is saved, and every editor session and every upload with your key needs it. See [Storage](https://docs.widgetic.com/docs/partners/storage.md).

**4. Agree Your Billing and Get Activated**

Read how [credits and billing](https://docs.widgetic.com/docs/partners/credits-billing.md) work, and agree the credits for each billing period, your price for a credit and the start date with Widgetic. Once your contract is in force and your storage works, Widgetic activates your account (see [Account Status](https://docs.widgetic.com/docs/partners/account-status.md)). There is no trial, so your first invoice is issued on the day your contract starts.

**5. Keep Track of Your Customers**

[Create managed users](https://docs.widgetic.com/docs/partners/managed-users.md) for your platform's customers.

**6. Build and Embed Widgets**

Create [compositions](https://docs.widgetic.com/docs/api/compositions.md) with the API, publish them, and show them in your platform with the embed code.

**7. Put the Editors in Your Page (optional)**

Make an [editor session](https://docs.widgetic.com/docs/partners/editor-sessions.md) for the customer who is on the page, and mount a Widgetic editor with the [UI SDK](https://docs.widgetic.com/docs/partners/ui-components), so your customers make and change widgets without leaving your product.

**8. Watch Your Account**

Open your [dashboard](https://docs.widgetic.com/docs/partners/dashboard.md) for your credits, invoices, customers and analytics, and set an address for [notifications](https://docs.widgetic.com/docs/partners/notifications.md) so that your own system hears about invoices, low credits, pauses and stops.

## Partner Endpoints

All partner endpoints require a partner key (`wgt_prt_`). Key endpoints include:

| Endpoint | Description |
| - | - |
| `GET /managed-users` | List your managed users, find one by `search`, sort them and page through them |
| `POST /managed-users` | Create a managed user |
| `POST /managed-users/{id}/editor-sessions` | Make an editor session for one managed user |
| `DELETE /managed-users/{id}/editor-sessions` | End every editor session of a managed user |
| `GET /partners/{id}/presets` | List the widgets you offer as presets |
| `PUT /partners/{id}/presets/{key}` | Offer one of your widgets as a preset, or replace the preset with that key |
| `POST /managed-users/{id}/presets/{key}/copy` | Give a customer a copy of one of your presets |
| `GET /partners/{id}/workflow-presets` | List the workflows you offer as starting points |
| `PUT /partners/{id}/workflow-presets/{key}` | Offer one of your published workflows as a starting point, or replace the one with that key |
| `POST /workspaces/{workspaceId}/workflows/from-preset` | Start a workflow for a customer (named in a header) from one of your starting points |
| `POST /workspaces/{workspaceId}/ab-tests` | Make an A/B test for a customer (named in a header) from their compositions |
| `POST /organizations/{orgId}/translations` | Make a translation of one of a customer's compositions (named in a header) into other languages |
| `GET /partners/mine` | Find the partner you administer, its status and its platform domain |
| `GET /partners/{id}/contract` | Read your contract |
| `PUT /partners/{id}/storage` | Set the bucket your customers' files are kept in |
| `GET /partners/{id}/storage/usage` | See what each of your customers keeps in storage |
| `GET /partners/{id}/analytics/summary` | See how your customers' widgets are viewed and used |
| `GET /partners/{id}/notifications` | List what Widgetic told you |
| `PUT /partners/{id}/notifications/settings` | Choose where your notifications go, and set your webhook |
| `GET /invoices/partner/{id}` | List your invoices |
| `GET /credits/user/{userId}/balance` | Check your AI credit balance |
| `POST /partners/{id}/credits/extra-invoice` | Buy extra credits: an invoice that you pay on its page |

> [!NOTE]
>
> See the [API Reference](https://docs.widgetic.com/api-reference/introduction.md) for complete endpoint documentation. Filter by the `Managed Users`, `Partners`, `Credits` and `Invoices` tags.

## Next Steps

> [card] [Managed Users](https://docs.widgetic.com/docs/partners/managed-users.md)
>
> Keep a record of your customers

> [card] [Editor Sessions](https://docs.widgetic.com/docs/partners/editor-sessions.md)
>
> Let a customer use Widgetic's editors in your page

> [card] [Credits & Billing](https://docs.widgetic.com/docs/partners/credits-billing.md)
>
> How you pay and how credits work

> [card] [Account Status](https://docs.widgetic.com/docs/partners/account-status.md)
>
> Activation, pauses and what each one stops


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.