Social publishing

Push generated creatives into a market's content calendar over the API. Messy stores the media, and publishes the day you choose to Facebook and Instagram on schedule.

How it fits together

Social publishing has one programmatic entry point (provisioning a day with content), and the rest happens in the app and on schedule:

  • Set up a market once in the app: connect the Meta credential, pick a Facebook Page and Instagram account, set the timezone, posting hour, target countries and a hashtag pool.
  • Provision a day over the API with POST /socials/provision: push one or more creative variants, each with copy and media URLs. Messy downloads and stores every asset.
  • Review in the calendar: pick which variant fills the feed, reel and/or carousel slot for the day, then mark it ready.
  • Auto-publish: ready days post to Facebook and Instagram at the market’s scheduled hour, through the Meta Graph API.
A market (called a region in the app) carries its own Page, Instagram account, timezone and hashtag pool, so one workspace can run many brands or regions. Regions are set up in the app; the API targets them by id or name.

Provision a day

Authenticate with your environment API key as a bearer token, the same as every other programmatic endpoint. Regions without an environment are visible to any key; environment-scoped regions only to that environment’s key.

FieldTypeDescription
regionreqstring | integerTarget market by numeric id, or by name (case-insensitive), within your account.
datereqstringThe calendar day, ISO YYYY-MM-DD.
alternativesreqarrayOne or more creative variants for the day (see below).
replacebooleanWhen true, previously generated variants for that day are cleared first; manual uploads made in the app are kept.

Each alternative

FieldTypeDescription
headlinestringShort hook; also names the variant in the app.
bodystringCaption body. Bake in the hashtags you want here.
cta_labelstringCall-to-action label.
cta_urlstringCall-to-action link.
feed_media_urlstringURL of the 4:5 feed render (image or video). Downloaded and stored.
reel_media_urlstringURL of the 9:16 reel render (image or video).
carousel_media_urlsstring[]Ordered image URLs for a native carousel (2–10 images).
provision.sh
curl https://api.messy.sh/socials/provision \
  -H "Authorization: Bearer $MESSY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "region": "Pakistan",
    "date": "2026-07-15",
    "replace": true,
    "alternatives": [
      {
        "headline": "Source Sialkot leather, direct",
        "body": "Verified manufacturers, MOQ from 50 units.\n\n#manufacturer #pakistanexports #findsuppliers",
        "cta_label": "Browse suppliers",
        "cta_url": "https://lalaaji.com/leather",
        "feed_media_url": "https://cdn.example.com/renders/leather-feed.jpg",
        "reel_media_url": "https://cdn.example.com/renders/leather-reel.mp4",
        "carousel_media_urls": [
          "https://cdn.example.com/renders/leather-1.jpg",
          "https://cdn.example.com/renders/leather-2.jpg"
        ]
      }
    ]
  }'

A successful call returns 201 with the day’s post id and the ids of the variants it created:

json
{
  "success": true,
  "data": {
    "id": 812,
    "region": "Pakistan",
    "date": "2026-07-15",
    "alternative_ids": [4471]
  }
}
Media is fetched server-side from each URL and stored in Messy, so the source URLs can be short-lived (e.g. a generation service’s temporary links). Feed and reel each take a single image or video; carousels are images only, 2 to 10 of them.

Publishing

In the calendar, pick which variant fills the feed, reel and/or carousel slot for the day, then mark it ready. At the market’s scheduled hour Messy publishes each filled slot to Facebook and Instagram through the Meta Graph API (each channel has its own on/off toggle on the region). Carousels post natively on both networks. Need it out immediately, or a retry after a failure? Publish on demand from the day view.

A market must have a configured Meta credential and a selected Page before it can publish. Set that up under the region in the app; provisioning content to an unconfigured region works, but the day won’t post until it’s connected.