sangtao.ai
API key

Publishing

Facebook text backgrounds

The backgrounds a Facebook text post can have — for textFormatPresetId.

GEThttps://api.sangtao.ai/v2/publishing/facebook/text-presets

Authorization

None — this endpoint is public, call it without an API key.

The colour, gradient and illustration backgrounds Facebook offers for text posts. No key, no credits. Send a preset's id as platforms[].textFormatPresetId in Publish a post — on a Facebook text-only post (no jobId, videoUrl or imageUrls). With an image or a video Facebook drops the background; other networks ignore it.

Facebook manages this list and can change it at any time — fetch it rather than hardcoding IDs. It is cached for 6 hours. An id that does not exist is accepted when you publish, but the post fails on Facebook.

Response

  • presetsobject[]required

    The backgrounds. Empty when the list is temporarily unavailable

    Show child attributes
    • idstringrequired

      Send it as platforms[].textFormatPresetId in Publish a post

    • labelstringrequired

      Background name, in English, as Facebook names it

    • kindstringrequired

      Kind of background: a solid colour, a gradient, or an illustration

      Available options:colorgradientillustration

    • colorstring | null

      A CSS value to draw the preview with: rgb(…) for color, linear-gradient(…) for gradient. Can be null for any kind — Facebook gives the colour of only a few backgrounds, and never of an illustration — so draw an empty swatch (or just the label) when it is null

If the list is temporarily unavailable you still get 200, with presets: [] — post without a background, or try again later.

GET/publishing/facebook/text-presets
curl "https://api.sangtao.ai/v2/publishing/facebook/text-presets"
{
  "success": true,
  "data": {
    "presets": [
      {
        "id": "1881421442117417",
        "label": "Black",
        "kind": "color",
        "color": "rgb(0, 0, 0)"
      },
      {
        "id": "433967226963128",
        "label": "Purple 2",
        "kind": "color",
        "color": null
      },
      {
        "id": "249307305544279",
        "label": "Red to blue gradient",
        "kind": "gradient",
        "color": "linear-gradient(45deg, rgb(255, 0, 71), rgb(44, 52, 199))"
      },
      {
        "id": "200521337465306",
        "label": "Flame emojis",
        "kind": "illustration",
        "color": null
      }
    ]
  }
}