Reference

Build on the Lucra API.

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

Connections

Ad accounts, stores, and creator socials.

A connection is an outside account linked to Lucra: a brand's ad accounts and Shopify store, or a creator's Instagram and TikTok.

providerWhoUsed for
meta, tiktok, google, snapchatBrandAd accounts campaigns run on
shopifyBrandProducts and sample orders
instagram, tiktokCreatorPosts for organic programs

GET /v1/connections lists them. People connect accounts themselves, in an onboarding embed.

POST /v1/account-links returns a link for a setup step only the person can finish: payouts, payouts_update, payment_method, or a connection sign-in.

Endpoints

GET/v1/connections/:id
As creatorread

Get a connection

SDKlucra.connections.retrieve({ path: { id } })

Path parameters

  • idstringrequired
Response20012 fieldsShow
  • idconn_…
  • providerenum

    The platform connected.

    metatiktokgooglesnapchatshopifyinstagram
  • statusstring

    The platform connection's state, e.g. connected, active, expired; a shop is connected or reconnect_required.

  • namestringnullable

    The ad account, the shop domain, or the creator's handle.

  • handlestringnullable

    A creator's handle on the platform; null for a brand's connections.

  • avatarUrlstringnullable

    A short-lived link to a creator account's profile photo.

  • lastSyncedAtstringnullable
  • errorstringnullable

    Why a creator account's last sync failed, e.g. token_expired.

  • activeCampaignsinteger

    Live campaigns (or ones needing attention) on an ad platform connection. Campaigns only; `canDisconnect` covers every reason a disconnect is refused.

  • canDisconnectboolean

    Whether a disconnect would be accepted now: you manage the account's connections (or it's your own creator account), and no campaign, ad operation or ad plan is active on it.

  • createdAtstring
  • updatedAtstring
GET/v1/connections
As creatorread

List connected ad platforms, Shopify and creator social accounts

SDKlucra.connections.list({ query })

Query parameters

  • limitinteger
  • cursorstring
  • createdAfterstring

    Only items created at or after this time.

  • createdBeforestring

    Only items created before this time.

Response200A page of items, 12 fields each, and nextCursorShow
  • idconn_…
  • providerenum

    The platform connected.

    metatiktokgooglesnapchatshopifyinstagram
  • statusstring

    The platform connection's state, e.g. connected, active, expired; a shop is connected or reconnect_required.

  • namestringnullable

    The ad account, the shop domain, or the creator's handle.

  • handlestringnullable

    A creator's handle on the platform; null for a brand's connections.

  • avatarUrlstringnullable

    A short-lived link to a creator account's profile photo.

  • lastSyncedAtstringnullable
  • errorstringnullable

    Why a creator account's last sync failed, e.g. token_expired.

  • activeCampaignsinteger

    Live campaigns (or ones needing attention) on an ad platform connection. Campaigns only; `canDisconnect` covers every reason a disconnect is refused.

  • canDisconnectboolean

    Whether a disconnect would be accepted now: you manage the account's connections (or it's your own creator account), and no campaign, ad operation or ad plan is active on it.

  • createdAtstring
  • updatedAtstring
POST/v1/account-links
As creatorwrite

Open a hosted setup step: payouts on Stripe, the payment method, or a platform sign-in

SDKlucra.accountLinks.create({ body })

Body

  • typeenumrequired

    payouts: verify identity and add payout details; payouts_update: manage them once verified (until then it opens payouts); payment_method: add or manage the card Lucra charges a brand; connection: sign in to `provider`.

    payoutspayouts_updatepayment_methodconnection
  • providerenum

    For a connection: a brand connects meta, google, snapchat or tiktok; a creator instagram or tiktok.

    metagooglesnapchattiktokinstagram
  • countryenum

    A creator's payout country, required the first time.

    ATBEBGCAHRCYCZDKEEFIFRDEGRHUISIEITLVLILTLUMTNLNOPLPTROSKSIESSECHGBUS
  • returnUrlstring

    Where the person comes back to: your own https page (its origin must be on the key's embed origins), a page of the Lucra app (a path, like /finance), or `lucra-creators:` for the Lucra iOS app. Defaults to the matching settings page.

Response2013 fieldsShow
  • urlstring

    Send the person here.

  • expiresAtstringnullable
  • typeenum
    payoutspayouts_updatepayment_methodconnection