/api/v4/social/postsEinen Social-Media-Beitrag erstellen
Erstellt Entwürfe, geplante oder sofort veröffentlichte Beiträge auf verbundenen Facebook-, Instagram-, X-, LinkedIn- und Pinterest-Konten einer Marke.
Parameter
Body
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| input | object | erforderlich | Wrapper object. Every field below is a property of `input`, the entire body must be nested under it. |
| input.socialProfileId | string | erforderlich | UUID of the brand publishing the post, the same value used as the `brandId` path token elsewhere. Every platform in `platforms` must already have a connection on this brand. |
| input.name | string | erforderlich | Internal name for the post (not shown to the audience). Used to find it again in lists. |
| input.platforms | array of strings | erforderlich | Platforms to publish to: `FACEBOOK`, `INSTAGRAM`, `TWITTER` (X), `LINKEDIN`, `PINTEREST`. |
| input.content | string | erforderlich | The post body, published to every platform in `platforms`. |
| input.action | string | erforderlich | `DRAFT` to save without publishing, `SCHEDULE` to publish at a future time (requires a schedule), or `PUBLISH` to publish now. |
| input.mediaUrls | array of strings | optional | Public https image URLs to attach. Instagram and Pinterest require at least one. |
| input.videoUrls | array of strings | optional | Public https video URLs to attach. |
| input.link | string | optional | Link to attach to the post where the platform supports one. |
| input.scheduledAt | string | optional | Publish time as an ISO-8601 timestamp with an offset, e.g. `2026-10-02T09:30:00-04:00`. Required when `action` is `SCHEDULE` unless you send `scheduleDate` + `scheduleTime`. Never send both forms. |
| input.scheduleDate | string | optional | Publish date as `YYYY-MM-DD`, interpreted in the **brand's** timezone. Must be sent together with `scheduleTime`. |
| input.scheduleTime | string | optional | Publish time as `HH:MM` (24-hour), interpreted in the **brand's** timezone. Must be sent together with `scheduleDate`. |
| input.connectedChannelIds | array of strings | optional | Restrict publishing to specific connections by their `id` from the connections list. Defaults to the brand's active connection for each platform in `platforms`. |
| input.clientReference | string | optional | Your own identifier for this post, stored and echoed back. Use it to reconcile the post against your own records without holding onto the returned UUID. |
Beispielanfrage
Body zum direkten Einfügen. Ersetzen Sie Platzhalter-IDs und -Werte durch Ihre eigenen.
{ "input": { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "name": "Autumn collection launch", "platforms": ["INSTAGRAM", "FACEBOOK", "LINKEDIN"], "content": "Our autumn collection lands today. Solid oak, hand-finished, made two blocks from the shop. Come see it in person this weekend.", "mediaUrls": ["https://cdn.example.com/social/autumn-collection.jpg"], "link": "https://jennyhome.example/autumn", "action": "SCHEDULE", "scheduleDate": "2026-10-02", "scheduleTime": "09:30", "clientReference": "campaign-4471-slot-01" }}Antworten
200Post accepted. Publishing runs asynchronously, poll GET /social/posts/{postId} for per-channel status.
{ "data": { "createSimpleSocialMediaPost": { "success": true, "error": [], "socialPostId": "c47a1e58-2b93-4f10-a6d7-58e0c9b12345", "status": "SCHEDULED" } }}200Validation failed. Nothing was created. The status is still 200: read `success` and the `error` array.
{ "data": { "createSimpleSocialMediaPost": { "success": false, "error": [ { "message": "SY95045: No connected channel for PINTEREST on this brand", "code": "SY95045", "contextInfo": [{ "key": "platform", "value": "PINTEREST" }] }, { "message": "SY95046: scheduleTime must be HH:MM in the brand's timezone", "code": "SY95046", "contextInfo": null } ], "socialPostId": null, "status": null } }}401Unauthenticated, missing or invalid API key.
404No brand with that ID on this account (`SY95043`).
Erstellt einen Beitrag für eine Marke auf einem oder mehreren ihrer verbundenen Social-Media-Konten. Derselbe Aufruf deckt alle drei Abläufe ab: als DRAFT speichern, als SCHEDULE einplanen oder sofort PUBLISH.
Anwendungsfall: Eine Kampagne aus Ihrem eigenen Kalender planen. Ihre App weiß bereits, was ein Kunde mitteilen möchte und wann. Rufen Sie diesen Endpunkt für jeden Termin mit action: "SCHEDULE" und entweder scheduledAt oder scheduleDate + scheduleTime auf und übergeben Sie Ihre eigene Terminkennung als clientReference, damit Sie einen Abgleich durchführen können, ohne die zurückgegebene UUID zu speichern. Zeigen Sie den Eintrag als ausstehend an, bis GET /social/posts/{postId} die Veröffentlichung auf allen Kanälen meldet, und bieten Sie eine Schaltfläche zum Abbrechen an, die POST /social/posts/cancel aufruft.
Die Veröffentlichung erfolgt asynchron
action: "PUBLISH" veröffentlicht nicht, bevor die Antwort zurückgegeben wird. Der Aufruf nimmt den Beitrag entgegen, gibt einen socialPostId zurück und übergibt den Beitrag an die Veröffentlichungspipeline. Um herauszufinden, was tatsächlich geschehen ist, fragen Sie GET /social/posts/{postId} regelmäßig ab und lesen Sie das Array channels[] mit den Ergebnissen pro Kanal: status jedes Eintrags ist das Ergebnis für genau diese Plattform. Bei derselben Anfrage kann ein Beitrag auf Instagram erfolgreich veröffentlicht werden und auf LinkedIn fehlschlagen, daher ist channels[] maßgeblich und status auf Beitragsebene eine Zusammenfassung.
Einen Veröffentlichungszeitpunkt wählen
action: "SCHEDULE" erfordert genau eine von zwei Formen, niemals beide:
Wenn Sie beide Formen senden, scheduleDate ohne scheduleTime senden oder scheduledAt ohne Offset senden, wird die Anfrage mit SY95046 abgelehnt. DRAFT und PUBLISH dürfen überhaupt keinen geplanten Veröffentlichungszeitpunkt enthalten.
Hinweise.
- Der Anfrage-Body muss in ein
input-Objekt eingebettet sein. - Prüfen Sie
success, nicht den HTTP-Status. Validierungsfehler werden alsHTTP 200mitsuccess: falseund einem Eintrag pro Problem im Arrayerrorzurückgegeben. Es wird nichts erstellt, wennsuccessden Wertfalsehat. - Die Marke wird im Body durch
socialProfileIdidentifiziert.brandIdist ausschließlich ein Platzhalter im URL-Pfad, niemals ein Feld im Body. - Für jede Plattform in
platformsmuss bereits eine Verbindung bei der Marke bestehen. Eine Plattform ohne aktiven Kanal führt zu einem Fehler mitSY95045; rufen Sie zuerst die Verbindungen der Marke ab und leiten Sie den Benutzer für jede fehlende Verbindung über einen Verbindungslink weiter. - Die Plattformwerte sind die Enum-Namen in Großbuchstaben
FACEBOOK,INSTAGRAM,TWITTER,LINKEDIN,PINTEREST.TWITTERsteht für X; der Wert hat seinen alten Namen behalten, und ein Wert in Kleinbuchstaben wird abgelehnt. - Instagram und Pinterest akzeptieren keine reinen Textbeiträge: Geben Sie mindestens einen
mediaUrls-Eintrag an, wenn eine dieser Plattformen inplatformsenthalten ist. - Beitrags-IDs sind einfache UUIDs, nicht die Base64-Relay-IDs, die für Standortbeiträge verwendet werden.
- Für mehr als eine Handvoll Beiträge auf einmal verwenden Sie
POST /social/bulk-posts, das dieselbe Zeilenstruktur akzeptiert und den gesamten Stapel vorab validiert.
Schreiboperation: nicht für das Live-Konto ausgeführt. Die gezeigte Anfrage und Antwort wurden anhand des API-Schemas erstellt; bei der Ausführung werden Beiträge auf echten Social-Media-Konten veröffentlicht.
curl -X POST 'https://listingsapi.com/api/v4/social/posts' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "name": "Autumn collection launch", "platforms": [ "INSTAGRAM", "FACEBOOK", "LINKEDIN" ], "content": "Our autumn collection lands today. Solid oak, hand-finished, made two blocks from the shop. Come see it in person this weekend.", "mediaUrls": [ "https://cdn.example.com/social/autumn-collection.jpg" ], "link": "https://jennyhome.example/autumn", "action": "SCHEDULE", "scheduleDate": "2026-10-02", "scheduleTime": "09:30", "clientReference": "campaign-4471-slot-01" } }'