Conversion sources#

Manage conversion sources (HDYHAU surveys, UTM links, etc.) that attribute conversions to marketing activities.

List conversion sources#

List conversion sources with pagination, search, and sorting.

typescript
const { items, totalCount, facets } = await bw.conversionSources.list({
  pageIndex: 0,
  pageSize: 25,
  organizationId: 'org_123',
});

Parameters#

NameTypeRequiredDescription
pageIndexintegerRequiredZero-based page index for pagination.
pageSizeintegerRequiredNumber of items per page (1-100).
organizationIdstring (UUID)RequiredOrganization identifier.
searchTermstringFree-text search term to filter results (max 200 characters).
sortBystringColumn name to sort by.
sortDirection'asc' | 'desc'Sort direction: ascending or descending.

Response#

Returns { items, totalCount, facets } with paginated results.

Get conversion source#

Retrieve a single conversion source by ID.

typescript
const { data } = await bw.conversionSources({ id: 'abc-123' });

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredConversion source identifier.

Response#

Returns { data } with the result.

Create conversion source#

Create a new conversion source with a marketing channel category for tracking attribution.

typescript
const { data } = await bw.conversionSources.create({
  organizationId: 'org_123',
  name: 'My Campaign',
  type: 'instagram_post',
  category: '...',
});

Parameters#

NameTypeRequiredDescription
organizationIdstring (UUID)RequiredOrganization identifier.
namestringRequiredConversion source name.
type'hdyhau' | 'promo_code' | 'tracking_link'RequiredAttribution method type.
category'organic_social' | 'podcast' | 'events' | 'paid' | 'referral' | 'other'RequiredMarketing channel category.
channel'instagram' | 'youtube' | 'tiktok' | 'twitter' | 'linkedin' | 'reddit' | nullSocial media platform for this conversion source.
creatorIdstring (UUID)Creator associated with this source.
campaignIdstring (UUID)Campaign associated with this source.
codestringPromo code or tracking code (max 255 characters).
urlstring (URL)Tracking URL for link-based attribution (max 2,048 characters).

Response#

Returns { data } with the result.

Update conversion source#

Update a conversion source attribution type, category, social media channel, creator or campaign association, promo code, or tracking URL.

typescript
const { data } = await bw.conversionSources.update({
  id: 'abc-123',
});

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredConversion source identifier to update.
namestringUpdated name (1-255 characters).
type'hdyhau' | 'promo_code' | 'tracking_link'Updated attribution type.
category'organic_social' | 'podcast' | 'events' | 'paid' | 'referral' | 'other'Updated category.
channel'instagram' | 'youtube' | 'tiktok' | 'twitter' | 'linkedin' | 'reddit' | nullUpdated social media platform.
creatorIdstring (UUID) | nullUpdated creator association.
campaignIdstring (UUID) | nullUpdated campaign association.
codestring | nullUpdated promo/tracking code (max 255 characters).
urlstring (URL) | nullUpdated tracking URL (max 2,048 characters).
isActivebooleanWhether this source is active.

Response#

Returns { data } with the result.

Delete conversion source#

Permanently delete a conversion source and disassociate its conversions.

typescript
const { data } = await bw.conversionSources.delete({
  id: 'abc-123',
});

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredConversion source identifier to delete.

Response#

Returns { data } with the result.

Cascading effect

Deleting a conversion source removes the source attribution from all linked conversions. The conversion records themselves are preserved.