Gift links

Upload a large source import in parts

For a source import too large for POST /campaigns/{id}/distribution/imports: send the UTF-8 import JSON as base64 parts (up to 384, 150,000 bytes each before encoding). Keep uploadId, partCount, totalBytes and each part's bytes identical on retries. complete turns true once every part is saved and the import is validated; while another request assembles it the response carries retryAfterMs (resend the same last part after it). Uploads expire after 6 hours. Accepts an MCP OAuth token with gifts:write.

post/campaigns/{id}/distribution/import-chunks

Request

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

uploadIdstring required

Stable upload ID; reuse it with identical metadata and part bytes on retries.

partIndexinteger required

Zero-based part position; each UTF-8 byte segment is separately base64 encoded.

partCountinteger required

Total number of parts in this upload, from 1 to 384.

datastring required

Canonical base64 for this part, at most 200000 ASCII characters; no data-URL prefix. Blank unselected cells before serializing the import JSON.

totalBytesinteger required

UTF-8 byte length of the complete serialized import JSON, at most 32 MiB.

Response

Success: {"data": SourceUploadProgress}.

Changes

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