Gift links

Keep original source columns with recipients

Keeps only the columns you select (retainedColumnIndices) from the original CSV, linked to recipients by importRowId (and recipientId), so exports can return the customer's own columns. Rows may arrive across several calls; replays with identical rows are no-ops. No gifts, messages or charges. Accepts an MCP OAuth token with gifts:write.

post/campaigns/{id}/distribution/imports

Request

  • Base URL: https://gtmswag.com/api/v1
  • URL: https://gtmswag.com/api/v1/campaigns/{id}/distribution/imports
  • 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:write)

Path parameters

idstring required

Campaign or playbook ID (cmp_).

Request body

importIdstring required

Stable customer import ID; reuse with identical retry data.

headersstring[] required

Original source CSV headers in order, including duplicates.

retainedColumnIndicesinteger[] required

Original zero-based positions explicitly selected for private retention.

totalRowsinteger required

Total source rows, at most 500; do not truncate.

sourceBytesinteger required

Original CSV bytes, at most 5 MiB.

Response

Success: {"data": SourceImport}.

Changes

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