# Partners

> Run Lucra for client brands and creators, like Stripe Connect.

Source: https://www.onlucra.com/docs/api-partners

A partner account runs Lucra for other businesses: agencies managing client brands, and developers building creator payments, programs or ads into their own product. It works much like Stripe Connect. Client brands are connected accounts, roster creators are payout recipients, and the `Lucra-Account` header plays the part of `Stripe-Account`.

## Set up

1. Sign up as an **Agency** or **Developer**; both are partner accounts. An existing brand can turn on partner tools in **Settings → Partner profile**.
2. Create a `write` key in **Settings → Developers → API**.
3. Set your [take rates](#take-rates).
4. Create [brands](https://www.onlucra.com/docs/api-brands) and add [creators](https://www.onlucra.com/docs/api-creators). Finish their setup with `POST /v1/connections`, and listen for [webhooks](https://www.onlucra.com/docs/webhooks).

## What your key reaches

A partner key reaches its own account, every active client brand (including brands added later), and every roster creator. You don't list accounts on the key. Pick one per request with `Lucra-Account`, or `lucra.as(id)` in the SDK:

```ts
const { data: page } = await lucra.brands.list()
const brand = lucra.as(page.data[0].id)
const { data: programs } = await brand.programs.list()
```

A brand whose relationship with you ended stays readable with `status: "ended"`, but can't be changed.

## Take rates

A partner earns from the creators it brings and the brands it manages. Set the defaults with `PATCH /v1/account`:

```ts
await lucra.account.update({
  body: {
    creatorTakeRate: { percent: 15 },
    brandFee: { of: "ad_spend", percent: 10 },
  },
})
```

- `creatorTakeRate` is your cut of each payment to a roster creator, up to 20%. Override it for one creator with `takeRate` on `PATCH /v1/creators/:id`.
- `brandFee` is charged on the `ad_spend` or `gmv` of the brands you manage. Override it for one brand with `PATCH /v1/brands/:id`.

## Act as a creator

Send `Lucra-Account: crtr_…` to do what a roster creator would: edit their profile, apply to or join programs, upload files, submit work, request samples, answer retainer offers, and read their payments and messages. Acting as a creator needs a `write` key. Endpoints that allow it are marked in the reference.

```ts
await lucra
  .as("crtr_026UYfiw1Y6OvUpuKWiOpeL")
  .applications.create({ body: { program: "prog_00lhuAJjQgdtNt5WnqTBc95" } })
```

## Your own UI, or ours

Build every screen yourself on the API, or drop in Lucra's onboarding, programs, wallet and other screens with [embeds](https://www.onlucra.com/docs/embeds).
