Gift links

Create a gift-link CSV export

The website's bulk export: scope all, selection (recipientIds or giftIds) or filtered. By default it holds ready links plus the original source columns; includeUnavailable:true lists everyone for a status report. Returns the export ID, an authenticated downloadUrl (valid 24 hours), counts and exclusions. Creates an export record only. Accepts an MCP OAuth token with gifts:links:read.

post/campaigns/{id}/distribution/exports

Request

  • Base URL: https://gtmswag.com/api/v1
  • URL: https://gtmswag.com/api/v1/campaigns/{id}/distribution/exports
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://gtmswag.com/oauth/authorize, token URL https://gtmswag.com/oauth/token, scopes: gifts:links:read)

Path parameters

idstring required

Campaign or playbook ID (cmp_).

Request body

recipientIdsstring[]

Explicit stable recipient IDs to select.

giftIdsstring[]

Explicit gift/send IDs to select.

searchstring

Filter supplied recipient name, email, source ID, company or profile.

availability'ready' | 'awaiting_approval' | 'preparing_links' | 'unavailable'

Filter current link availability; ready means usable now.

scope'all' | 'selection' | 'filtered' required

Explicit all, selection or filtered recipient scope.

preset'original' | 'compact'

original preserves selected source columns; compact exports gift-link identity columns.

includeUnavailableboolean

True creates a full status report with blank unavailable links; false exports ready links only.

columnPrefixstring

Optional prefix for appended gift columns; collisions receive gtm_swag_ automatically.

optionalColumnsstring[]

Additional technical columns; default export has only gift_link, gift_status and gift_expires_at.

Response

Success: {"data": GiftLinkExport}.

Changes

No recorded changes to this operation across all 1 revision of this API.