Publishing
Facebook text backgrounds
The backgrounds a Facebook text post can have — for textFormatPresetId.
https://api.sangtao.ai/v2/publishing/facebook/text-presetsAuthorization
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.
Response
presetsobject[]requiredThe backgrounds. Empty when the list is temporarily unavailable
Show child attributesHide child attributes
idstringrequiredSend it as platforms[].textFormatPresetId in Publish a post
labelstringrequiredBackground name, in English, as Facebook names it
kindstringrequiredKind of background: a solid colour, a gradient, or an illustration
Available options:
colorgradientillustrationcolorstring | nullA 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.
/publishing/facebook/text-presetscurl "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
}
]
}
}/publishing/facebook/text-presetscurl "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
}
]
}
}