Reference

Build on the Lucra API.

Drag a sticker to move it, or use the arrow keys while focused.

Account

The account a key belongs to, and its setup.

The account is the brand or partner a key belongs to. GET /v1/account is a good first call: it tells you the account's type (brand or partner), its payment method and payout setup, its fees, and how many brands and creators it has.

TypeScript
const { data: account } = await lucra.account.retrieve()

Payment method

A brand needs a payment method before it can create programs or pay creators. Until it has one, paymentMethod is null and those writes return 409 requirement_payment_method. To add one, send a brand member to the URL from POST /v1/connections with provider: "card".

Update it

PATCH /v1/account changes the account's name, description and logo (profilePicture, a file uploaded with purpose=profile_picture). A partner also sets its take rates here.

Endpoints

GET/v1/account
read

Get the key's own account

const { data } = await lucra.account.retrieve()
Response20021 fieldsShow
  • idacct_…
  • typeenum
    brandpartner
  • namestring
  • statusenum

    ended: a brand whose relationship with your partner account ended; it reads, but no longer changes.

    activeended
  • managedByacct_…nullable
  • brandFeeobjectnullable

    The managing partner's own fee on this brand; null when it's on the partner's default (GET /v1/account partner.brandFee).

    Show 2 child fields
    • ofenum
      ad_spendgmv
    • percentnumber
  • partnerobjectnullable

    A partner's take rates; null for a brand.

    Show 2 child fields
    • creatorTakeRateobjectnullable
      Show 1 child field
      • percentnumber
    • brandFeeobjectnullable
      Show 2 child fields
      • ofenum
        ad_spendgmv
      • percentnumber
  • emailstringnullable
  • phonestringnullable
  • profilePicturefile_…nullable
  • imageobjectnullable

    The account's logo, with a short-lived url.

    Show 5 child fields
    • fileIdfile_…nullable
    • urlstring
    • widthnumbernullable
    • heightnumbernullable
    • blurHashstringnullable
  • paymentMethodobjectnullable

    A brand's payment method; null means none yet (add one with POST /v1/connections, provider card), and always null for a partner.

    Show 3 child fields
    • statusstring
      active
    • brandstringnullable
    • last4stringnullable
  • payoutsobject

    Where it's paid: verified identity lets earnings reach its balance; a bank account is asked for on the first withdrawal. Set up with POST /v1/connections (provider stripe).

    Show 2 child fields
    • identityobject
      Show 1 child field
      • statusenum
        requiredpendingverified
    • bankAccountobjectnullable
      Show 1 child field
      • statusenum
        missingadded
  • brandsobjectnullable

    The brands a partner key reaches; null on a managed brand.

    Show 1 child field
    • countinteger
  • creatorsobjectnullable

    The account's creators and roster; null on a managed brand.

    Show 1 child field
    • countinteger
  • descriptionstringnullable
  • recruitmentobject
    Show 2 child fields
    • headlinestringnullable
    • descriptionstringnullable
  • listingobjectnullable

    A partner's marketplace listing; null for a brand.

    Show 4 child fields
    • listedboolean
    • headlinestringnullable
    • categoriesstring[]
    • registeredAtstringnullable
  • versioninteger
  • createdAtstring
  • updatedAtstring
PATCH/v1/account
write

Update the key's own account

const { data } = await lucra.account.update({
  body: { creatorTakeRate: {} },
})

Body

  • creatorTakeRateobjectnullable

    The partner's cut of each payment to a creator it brought, taken from the creator's side. Up to 20%.

    Show 1 child field
    • percentnumber· required
  • brandFeeobjectnullable
    Show 2 child fields
    • ofenum· required
      ad_spendgmv
    • percentnumber· required
  • profilePicturefile_…nullable
  • namestring
  • descriptionstringnullable
  • recruitmentobject
    Show 2 child fields
    • headlinestringnullable
    • descriptionstringnullable
  • typeenum
    brandpartner
  • listingobject
    Show 3 child fields
    • listedboolean
    • headlinestringnullable
    • categoriesstring[]
  • versioninteger
Response20021 fieldsShow
  • idacct_…
  • typeenum
    brandpartner
  • namestring
  • statusenum

    ended: a brand whose relationship with your partner account ended; it reads, but no longer changes.

    activeended
  • managedByacct_…nullable
  • brandFeeobjectnullable

    The managing partner's own fee on this brand; null when it's on the partner's default (GET /v1/account partner.brandFee).

    Show 2 child fields
    • ofenum
      ad_spendgmv
    • percentnumber
  • partnerobjectnullable

    A partner's take rates; null for a brand.

    Show 2 child fields
    • creatorTakeRateobjectnullable
      Show 1 child field
      • percentnumber
    • brandFeeobjectnullable
      Show 2 child fields
      • ofenum
        ad_spendgmv
      • percentnumber
  • emailstringnullable
  • phonestringnullable
  • profilePicturefile_…nullable
  • imageobjectnullable

    The account's logo, with a short-lived url.

    Show 5 child fields
    • fileIdfile_…nullable
    • urlstring
    • widthnumbernullable
    • heightnumbernullable
    • blurHashstringnullable
  • paymentMethodobjectnullable

    A brand's payment method; null means none yet (add one with POST /v1/connections, provider card), and always null for a partner.

    Show 3 child fields
    • statusstring
      active
    • brandstringnullable
    • last4stringnullable
  • payoutsobject

    Where it's paid: verified identity lets earnings reach its balance; a bank account is asked for on the first withdrawal. Set up with POST /v1/connections (provider stripe).

    Show 2 child fields
    • identityobject
      Show 1 child field
      • statusenum
        requiredpendingverified
    • bankAccountobjectnullable
      Show 1 child field
      • statusenum
        missingadded
  • brandsobjectnullable

    The brands a partner key reaches; null on a managed brand.

    Show 1 child field
    • countinteger
  • creatorsobjectnullable

    The account's creators and roster; null on a managed brand.

    Show 1 child field
    • countinteger
  • descriptionstringnullable
  • recruitmentobject
    Show 2 child fields
    • headlinestringnullable
    • descriptionstringnullable
  • listingobjectnullable

    A partner's marketplace listing; null for a brand.

    Show 4 child fields
    • listedboolean
    • headlinestringnullable
    • categoriesstring[]
    • registeredAtstringnullable
  • versioninteger
  • createdAtstring
  • updatedAtstring