v1Resources/Distribution/postImport a content package

Import a content package

Imports a package as draft posts. Nothing is scheduled or published: a person in Synup reviews, approves and schedules each post. Re-sending the same campaign externalId and version, or the same Idempotency-Key, returns the first result. The same version with different content returns 409 version_conflict, so send it as version + 1.

post/api/v1/distribution/packages
distribution:write
Query parameters
Idempotency-Keystringoptional
Any unique string per logical import. A retry with the same key returns the first result.
clientIdstringoptional
The client, when the body is a raw text/markdown file.
Request body
clientIdstringrequired
The client the package belongs to.
manifestobjectoptional
A synup.distribution/v1 manifest: the campaign, its files (assets) and one variant per destination post.
schemastring (synup.distribution/v1)required
campaignobjectrequired
externalIdstringrequired
versionintegerrequired
titlestringrequired
templatestringoptional
subjectstringoptional
canonicalUrlstringoptional
anchorVideoUrlstringoptional
customerReviewRequiredbooleanoptional
allowRawAssetsbooleanoptional
slackobjectoptional
teamIdstringoptional
channelIdstringoptional
threadTsstringoptional
assetsarray of objectrequired
idstringrequired
rolestring (video | image | cover | captions | document | raw)required
filenamestringrequired
mimestringrequired
bytesintegerrequired
sha256stringrequired
widthintegeroptional
heightintegeroptional
durationSecnumberoptional
languagestringoptional
sourceobjectoptional
urlstringoptional
provenanceobjectoptional
attributionRequiredbooleanoptional
customerReviewRequiredbooleanoptional
variantsarray of objectrequired
keystringrequired
platformstring (facebook | instagram | linkedin | x | pinterest | threads | bluesky | mastodon | reddit | medium | substack | vimeo | dailymotion | youtube | tiktok)required
connectionIdstringoptional
formatstring (feed | video | reel | short | image | carousel | article | link | text)optional
textstringoptional
titlestringoptional
descriptionstringoptional
mediaarray of stringoptional
coverstringoptional
captionsstringoptional
firstCommentstringoptional
linkobjectoptional
urlstringoptional
utmobjectoptional
articleobjectoptional
titlestringoptional
subtitlestringoptional
htmlstringoptional
redditobjectoptional
subredditstringoptional
flairstringoptional
postTypestring (text | link | image | video)optional
tagsarray of stringoptional
videoobjectoptional
privacystringoptional
categorystringoptional
isForKidsbooleanoptional
playlistIdstringoptional
tiktokobjectoptional
disableCommentbooleanoptional
disableDuetbooleanoptional
disableStitchbooleanoptional
brandContentbooleanoptional
suggestedAtstringoptional
timezonestringoptional
customerReviewRequiredbooleanoptional
markdownstringoptional
A Series Markdown file, sent instead of manifest.
fileNamestringoptional
The Markdown file's name. A .md name marks the string as Markdown.
filesarray of objectoptional
Size and sha256 of each file the Markdown names, matched by file name. Required to import a series that has files; the preview accepts it without them.
filenamestringrequired
bytesintegerrequired
sha256stringrequired
widthintegeroptional
heightintegeroptional
durationSecnumberoptional
urlstringoptional
An https link Synup fetches the file from, instead of you uploading it.
intoSeriesIdstringoptional
Import the file as the next version of this existing series.
Response
dataobjectoptional
campaignIdstringoptional
versionintegeroptional
statusstring (imported | unchanged)optional
itemsarray of objectoptional
kindstring (asset | variant)optional
refstringoptional
outcomestring (created | revised | unchanged | update_available | published_unchanged | skipped)optional
postIdstringoptional
assetIdstringoptional
messagesarray of stringoptional
pendingUploadsarray of objectoptional
assetIdstringoptional
refstringoptional
filenamestringoptional
bytesintegeroptional
mimestringoptional
pendingFetchesarray of stringoptional
Errors
400The request is missing a required parameter or is otherwise malformed.
401Missing, invalid, expired, or revoked API key.
403The key lacks the required scope, or isn't authorized for this client/location.
404The resource wasn't found, or doesn't belong to your agency.
409The request conflicts with the current state of the resource — for example, changing the email or phone of a recipient who has already been messaged, or a team invite that was already accepted (or hasn't been accepted yet).
422The Markdown file has errors, so nothing was imported. issues lists them by line.
429Too many requests. Retry after the number of seconds in the Retry-After header.
post/api/v1/distribution/packages
Your API key
Idempotency-Key
clientId
Request body*
{
  "data": {
    "campaignId": "dcm_123",
    "version": 1,
    "status": "imported",
    "items": [
      {
        "kind": "asset",
        "ref": "short-1",
        "outcome": "created",
        "assetId": "das_123",
        "messages": []
      },
      {
        "kind": "asset",
        "ref": "short-1-cover",
        "outcome": "created",
        "assetId": "das_124",
        "messages": []
      },
      {
        "kind": "variant",
        "ref": "short-1-linkedin",
        "outcome": "created",
        "postId": "post_123",
        "messages": []
      }
    ],
    "pendingUploads": [
      {
        "assetId": "das_124",
        "ref": "short-1-cover",
        "filename": "short-1.jpg",
        "bytes": 34683,
        "mime": "image/jpeg"
      }
    ],
    "pendingFetches": [
      "das_123"
    ]
  }
}

New to the Synup API?