/api/v4/social/bulk-postsCriar publicações em lote
Valida e enfileira até 500 publicações em redes sociais por requisição e retorna uma tarefa para você consultar periodicamente os resultados por linha.
Parâmetros
Corpo
Um campo aninhado marcado como obrigatório só se aplica quando você envia o campo pai. Se o campo pai for opcional e você o omitir, os campos filhos obrigatórios não se aplicam.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| input | object | obrigatório | Wrapper object. The entire request body must be nested under `input`. |
| input.posts | array of objects | obrigatório | The rows to create, 1 to 500 of them. Each row is the same object POST /social/posts takes as its `input`; the per-row fields are listed below. |
| input.name | string | opcional | Optional label for the job itself, to identify it in your own logs. Not shown to any audience. |
| input.posts[].socialProfileId | string | obrigatório | UUID of the brand publishing this row. Rows may target different brands in one request. |
| input.posts[].name | string | obrigatório | Internal name for the post. |
| input.posts[].platforms | array of strings | obrigatório | Platforms for this row: `FACEBOOK`, `INSTAGRAM`, `TWITTER` (X), `LINKEDIN`, `PINTEREST`. Each must already have a connection on that row's brand. |
| input.posts[].content | string | obrigatório | The post body. |
| input.posts[].action | string | obrigatório | `DRAFT`, `SCHEDULE` (requires a schedule) or `PUBLISH`. |
| input.posts[].mediaUrls | array of strings | opcional | Public https image URLs. Required when the row targets Instagram or Pinterest. |
| input.posts[].videoUrls | array of strings | opcional | Public https video URLs. |
| input.posts[].link | string | opcional | Link to attach where the platform supports one. |
| input.posts[].scheduledAt | string | opcional | ISO-8601 publish instant with an offset. Alternative to `scheduleDate` + `scheduleTime`, never both. |
| input.posts[].scheduleDate | string | opcional | `YYYY-MM-DD`, interpreted in that row's brand timezone. Send with `scheduleTime`. |
| input.posts[].scheduleTime | string | opcional | `HH:MM`, interpreted in that row's brand timezone. Send with `scheduleDate`. |
| input.posts[].connectedChannelIds | array of strings | opcional | Restrict this row to specific connections by ID. |
| input.posts[].clientReference | string | opcional | Your own identifier for this row, echoed back on the matching job result. The most reliable way to reconcile a batch against your own records. |
Exemplo de requisição
Corpo pronto para colar. Substitua os IDs e valores de exemplo pelos seus.
{ "input": { "name": "Autumn campaign load", "posts": [ { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "name": "Autumn week 1", "platforms": ["INSTAGRAM", "FACEBOOK"], "content": "Week one of the autumn collection: the Fairfield oak sideboard, finished by hand in the workshop.", "mediaUrls": ["https://cdn.example.com/social/autumn-w1.jpg"], "action": "SCHEDULE", "scheduleDate": "2026-10-02", "scheduleTime": "09:30", "clientReference": "campaign-4471-slot-01" }, { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "name": "Autumn week 2", "platforms": ["INSTAGRAM", "FACEBOOK", "LINKEDIN"], "content": "Week two: the Halcyon armchair. Sixty hours of work, one chair.", "mediaUrls": ["https://cdn.example.com/social/autumn-w2.jpg"], "action": "SCHEDULE", "scheduleDate": "2026-10-09", "scheduleTime": "09:30", "clientReference": "campaign-4471-slot-02" }, { "socialProfileId": "a90f7c22-5db1-4e83-9f40-2b7c6a1e5d33", "name": "Eastside autumn teaser", "platforms": ["INSTAGRAM"], "content": "Something solid is arriving next week. Stay tuned.", "mediaUrls": ["https://cdn.example.com/social/eastside-teaser.jpg"], "action": "SCHEDULE", "scheduledAt": "2026-10-01T08:00:00-04:00", "clientReference": "campaign-4471-slot-03" } ] }}Respostas
200The whole batch validated. A job was queued, poll GET /social/bulk-posts/{bulkJobId} for per-row results.
{ "data": { "createBulkSocialMediaPosts": { "success": true, "error": [], "job": { "id": "9b3f18d0-7a26-4c51-8e94-1f0d5c6b7a82", "status": "QUEUED", "totalCount": 3, "processedCount": 0, "successCount": 0, "failureCount": 0, "createdAt": "2026-09-28T14:04:52Z", "updatedAt": "2026-09-28T14:04:52Z", "results": [] } } }}200At least one row failed validation, so **nothing was created**. `success` is `false`, no job is returned, and each rejected row is reported with its 0-based `index`.
{ "data": { "createBulkSocialMediaPosts": { "success": false, "error": [ { "message": "SY95050: Bulk validation failed, no posts were created", "code": "SY95050", "contextInfo": null } ], "job": { "id": null, "status": "FAILED", "totalCount": 3, "processedCount": 0, "successCount": 0, "failureCount": 2, "createdAt": "2026-09-28T14:04:52Z", "updatedAt": "2026-09-28T14:04:52Z", "results": [ { "index": 1, "clientReference": "campaign-4471-slot-02", "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "platforms": ["INSTAGRAM", "FACEBOOK", "LINKEDIN"], "status": "INVALID", "socialPostId": null, "postStatus": null, "errors": [ { "message": "SY95045: No connected channel for LINKEDIN on this brand", "code": "SY95045", "contextInfo": [{ "key": "platform", "value": "LINKEDIN" }] } ] }, { "index": 2, "clientReference": "campaign-4471-slot-03", "socialProfileId": "a90f7c22-5db1-4e83-9f40-2b7c6a1e5d33", "platforms": ["INSTAGRAM"], "status": "INVALID", "socialPostId": null, "postStatus": null, "errors": [ { "message": "SY95046: scheduledAt must carry a UTC offset", "code": "SY95046", "contextInfo": null } ] } ] } } }}401Unauthenticated, missing or invalid API key.
Cria várias publicações em redes sociais em uma única requisição. As linhas são enviadas no corpo da requisição — não há upload de arquivo nem CSV, apenas um array dos mesmos objetos que POST /social/posts aceita um de cada vez. Até 500 linhas por requisição.
Caso de uso: carregar o conteúdo de um trimestre em uma única chamada. Sua ferramenta de planejamento tem todo o calendário de conteúdo do cliente. Crie uma linha para cada horário previsto, identifique cada uma com seu próprio clientReference e envie todas juntas. O lote é aceito por inteiro ou informa exatamente quais linhas você precisa corrigir. Armazene o job.id retornado e consulte GET /social/bulk-posts/{bulkJobId} periodicamente até que status esteja em um estado terminal; depois, concilie cada resultado pelo respectivo clientReference.
Todo o lote é validado previamente
A validação é executada em todas as linhas antes que qualquer coisa seja criada, e o lote é atômico nessa etapa:
- Se qualquer linha for inválida, nada será criado.
successéfalse,SY95050é retornado emerror, e cada linha inválida aparece emjob.results[]com seuindexcom base em 0, seuclientReferencee o motivo emerrors[]. Corrija essas linhas e reenvie todo o lote. - Se todas as linhas forem válidas, uma tarefa será enfileirada,
successserátruee você receberá umjob.id. Linhas individuais ainda podem falhar mais tarde, quando a plataforma as rejeitar no momento da publicação; isso aparece na tarefa, não aqui.
Faça a conciliação por clientReference quando possível e por index nos demais casos — as próprias linhas não são retornadas, então esses dois campos são o único vínculo com seus dados.
Observações.
- O corpo da requisição deve estar encapsulado em um objeto
input, com as linhas eminput.posts. - Verifique
success, não o status HTTP. Uma rejeição de todo o lote é umHTTP 200comsuccess: falseeSY95050emerror. - Máximo de 500 linhas por requisição. Um array maior é rejeitado imediatamente com
SY95048e nada é criado; divida-o e envie vários lotes. - A marca de cada linha é
socialProfileId.brandIdé sempre usado apenas como um token de caminho de URL, e esta rota não tem nenhum token de caminho. - As linhas podem se destinar a marcas diferentes. Os valores de
platformsde cada linha são verificados em relação à própria marca dessa linha, então uma plataforma conectada a uma marca, mas não a outra, causa falha apenas nas linhas que precisam dela. - Cada linha segue as mesmas regras de agendamento de uma publicação individual:
scheduledAtouscheduleDate+scheduleTime, nunca ambos, escheduleDate/scheduleTimesão interpretados no fuso horário da marca dessa linha. Você pode combinar as duas formas em linhas diferentes de um mesmo lote. - Os limites de taxa se aplicam à requisição, não às linhas: um lote de 500 linhas consome uma requisição da sua cota. Consulte Limites de taxa.
Operação de escrita: não executada na conta real. A requisição e a resposta exibidas são construídas a partir do esquema da API; quando executada, esta operação publica em contas reais de redes sociais.
curl -X POST 'https://listingsapi.com/api/v4/social/bulk-posts' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "name": "Autumn campaign load", "posts": [ { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "name": "Autumn week 1", "platforms": [ "INSTAGRAM", "FACEBOOK" ], "content": "Week one of the autumn collection: the Fairfield oak sideboard, finished by hand in the workshop.", "mediaUrls": [ "https://cdn.example.com/social/autumn-w1.jpg" ], "action": "SCHEDULE", "scheduleDate": "2026-10-02", "scheduleTime": "09:30", "clientReference": "campaign-4471-slot-01" }, { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "name": "Autumn week 2", "platforms": [ "INSTAGRAM", "FACEBOOK", "LINKEDIN" ], "content": "Week two: the Halcyon armchair. Sixty hours of work, one chair.", "mediaUrls": [ "https://cdn.example.com/social/autumn-w2.jpg" ], "action": "SCHEDULE", "scheduleDate": "2026-10-09", "scheduleTime": "09:30", "clientReference": "campaign-4471-slot-02" }, { "socialProfileId": "a90f7c22-5db1-4e83-9f40-2b7c6a1e5d33", "name": "Eastside autumn teaser", "platforms": [ "INSTAGRAM" ], "content": "Something solid is arriving next week. Stay tuned.", "mediaUrls": [ "https://cdn.example.com/social/eastside-teaser.jpg" ], "action": "SCHEDULE", "scheduledAt": "2026-10-01T08:00:00-04:00", "clientReference": "campaign-4471-slot-03" } ] } }'