A connection is an outside account linked to Lucra: a brand's ad accounts and Shopify store, or a creator's Instagram and TikTok.
provider | Who | Used for |
|---|---|---|
meta, tiktok, google, snapchat | Brand | Ad accounts campaigns run on |
shopify | Brand | Products and sample orders |
instagram, tiktok | Creator | Posts for organic programs |
GET /v1/connections lists them. People connect accounts themselves, in an onboarding embed.
Hosted links
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
/v1/connections/:idGet a connection
lucra.connections.retrieve({ path: { id } })Path parameters
idstringrequired
Response20012 fieldsShow
idconn_…providerenumThe platform connected.
metatiktokgooglesnapchatshopifyinstagramstatusstringThe platform connection's state, e.g. connected, active, expired; a shop is connected or reconnect_required.
namestringnullableThe ad account, the shop domain, or the creator's handle.
handlestringnullableA creator's handle on the platform; null for a brand's connections.
avatarUrlstringnullableA short-lived link to a creator account's profile photo.
lastSyncedAtstringnullableerrorstringnullableWhy a creator account's last sync failed, e.g. token_expired.
activeCampaignsintegerLive campaigns (or ones needing attention) on an ad platform connection. Campaigns only; `canDisconnect` covers every reason a disconnect is refused.
canDisconnectbooleanWhether 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.
createdAtstringupdatedAtstring
/v1/connectionsList connected ad platforms, Shopify and creator social accounts
lucra.connections.list({ query })Query parameters
limitintegercursorstringcreatedAfterstringOnly items created at or after this time.
createdBeforestringOnly items created before this time.
Response200A page of items, 12 fields each, and nextCursorShow
idconn_…providerenumThe platform connected.
metatiktokgooglesnapchatshopifyinstagramstatusstringThe platform connection's state, e.g. connected, active, expired; a shop is connected or reconnect_required.
namestringnullableThe ad account, the shop domain, or the creator's handle.
handlestringnullableA creator's handle on the platform; null for a brand's connections.
avatarUrlstringnullableA short-lived link to a creator account's profile photo.
lastSyncedAtstringnullableerrorstringnullableWhy a creator account's last sync failed, e.g. token_expired.
activeCampaignsintegerLive campaigns (or ones needing attention) on an ad platform connection. Campaigns only; `canDisconnect` covers every reason a disconnect is refused.
canDisconnectbooleanWhether 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.
createdAtstringupdatedAtstring
/v1/account-linksOpen a hosted setup step: payouts on Stripe, the payment method, or a platform sign-in
lucra.accountLinks.create({ body })Body
typeenumrequiredpayouts: 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_methodconnectionproviderenumFor a connection: a brand connects meta, google, snapchat or tiktok; a creator instagram or tiktok.
metagooglesnapchattiktokinstagramcountryenumA creator's payout country, required the first time.
ATBEBGCAHRCYCZDKEEFIFRDEGRHUISIEITLVLILTLUMTNLNOPLPTROSKSIESSECHGBUSreturnUrlstringWhere 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
urlstringSend the person here.
expiresAtstringnullabletypeenumpayoutspayouts_updatepayment_methodconnection