POST/api/v4/social/posts

Sosyal medya gönderisi oluşturun

Bir markanın bağlı Facebook, Instagram, X, LinkedIn ve Pinterest hesaplarında taslak, zamanlanmış veya hemen yayımlanan bir gönderi oluşturur.

API anahtarı gerektirir. Başlık biçimi ve anahtar yenileme için Kimlik doğrulama bölümüne bakın.

Parametreler

Gövde

AdTürZorunluAçıklama
inputobjectzorunluWrapper object. Every field below is a property of `input`, the entire body must be nested under it.
input.socialProfileIdstringzorunluUUID 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.namestringzorunluInternal name for the post (not shown to the audience). Used to find it again in lists.
input.platformsarray of stringszorunluPlatforms to publish to: `FACEBOOK`, `INSTAGRAM`, `TWITTER` (X), `LINKEDIN`, `PINTEREST`.
input.contentstringzorunluThe post body, published to every platform in `platforms`.
input.actionstringzorunlu`DRAFT` to save without publishing, `SCHEDULE` to publish at a future time (requires a schedule), or `PUBLISH` to publish now.
input.mediaUrlsarray of stringsisteğe bağlıPublic https image URLs to attach. Instagram and Pinterest require at least one.
input.videoUrlsarray of stringsisteğe bağlıPublic https video URLs to attach.
input.linkstringisteğe bağlıLink to attach to the post where the platform supports one.
input.scheduledAtstringisteğe bağlı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.scheduleDatestringisteğe bağlıPublish date as `YYYY-MM-DD`, interpreted in the **brand's** timezone. Must be sent together with `scheduleTime`.
input.scheduleTimestringisteğe bağlıPublish time as `HH:MM` (24-hour), interpreted in the **brand's** timezone. Must be sent together with `scheduleDate`.
input.connectedChannelIdsarray of stringsisteğe bağlı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.clientReferencestringisteğe bağlı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.

Örnek istek

Yapıştırmaya hazır gövde. Yer tutucu kimlikleri ve değerleri kendi değerlerinizle değiştirin.

Request body
{  "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"  }}

Yanıtlar

200Post accepted. Publishing runs asynchronously, poll GET /social/posts/{postId} for per-channel status.
Response
{  "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.
Response
{  "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`).

Bir marka için, markanın bağlı sosyal medya hesaplarından birinde veya birkaçında tek bir gönderi oluşturur. Aynı çağrı üç yaşam döngüsünü de kapsar: DRAFT kaydetme, SCHEDULE kuyruğa alma veya hemen PUBLISH.

Kullanım örneği: kendi takviminizden bir kampanya zamanlama. Uygulamanız, bir müşterinin ne söylemek istediğini ve bunu ne zaman söylemek istediğini zaten bilir. Her zaman dilimi için bu uç noktayı action: "SCHEDULE" ve scheduledAt ya da scheduleDate + scheduleTime ile çağırın ve döndürülen UUID'yi saklamadan eşleştirme yapabilmek için kendi zaman dilimi tanımlayıcınızı clientReference olarak iletin. GET /social/posts/{postId}, gönderinin tüm kanallarda yayımlandığını bildirene kadar kaydı beklemede olarak gösterin ve POST /social/posts/cancel çağrısını yapan bir iptal düğmesi sunun.

Yayımlama eşzamansızdır

action: "PUBLISH", yanıt vermeden önce gönderiyi yayımlamaz. Çağrı gönderiyi kabul eder, bir socialPostId döndürür ve gönderiyi yayımlama sürecine aktarır. Gerçekte ne olduğunu öğrenmek için GET /social/posts/{postId} uç noktasını düzenli aralıklarla sorgulayın ve kanal bazındaki channels[] dizisini okuyun: her kaydın status değeri, ilgili platformdaki sonucu gösterir. Aynı istekte bir gönderi Instagram'da başarıyla yayımlanırken LinkedIn'de başarısız olabilir; bu nedenle channels[] gerçek durumu gösterir, gönderi düzeyindeki status ise bir özettir.

Zamanlama seçimi

action: "SCHEDULE", iki biçimden tam olarak birini gerektirir; ikisi birden kullanılamaz:

BiçimAlanlarYorumlamada esas alınan
Mutlak zamanscheduledAt, saat farkı içeren ISO-8601 (2026-10-02T09:30:00-04:00)Gönderdiğiniz saat farkı
Yerel saatscheduleDate (YYYY-MM-DD) ve scheduleTime (HH:MM)Markanın saat dilimi

Her ikisini birden göndermek, scheduleDate alanını scheduleTime olmadan göndermek veya saat farkı içermeyen bir scheduledAt göndermek, SY95046 ile reddedilir. DRAFT ve PUBLISH hiçbir şekilde zamanlama içermemelidir.

Notlar.

  • İstek gövdesi bir input nesnesi içine alınmalıdır.
  • HTTP durumunu değil, success değerini kontrol edin. Doğrulama hataları, success: false ve error dizisinde her sorun için bir kayıt içeren HTTP 200 olarak döndürülür. success değeri false olduğunda hiçbir şey oluşturulmaz.
  • Marka, gövdede socialProfileId ile tanımlanır. brandId yalnızca bir URL yolu belirtecidir; hiçbir zaman gövde alanı değildir.
  • platforms içindeki her platformun markada önceden kurulmuş bir bağlantısı olmalıdır. Etkin kanalı olmayan bir platform SY95045 ile başarısız olur; önce markanın bağlantılarını okuyun ve eksik olan her bağlantı için kullanıcıyı bir bağlantı kurma bağlantısına yönlendirin.
  • Platform değerleri, büyük harfli enum adları olan FACEBOOK, INSTAGRAM, TWITTER, LINKEDIN ve PINTEREST değerleridir. TWITTER, X'i ifade eder; değer eski adını korumuştur ve küçük harfli bir değer reddedilir.
  • Instagram ve Pinterest, yalnızca metin içeren bir gönderiyi kabul etmez: platforms içinde bu platformlardan biri varsa en az bir mediaUrls kaydı sağlayın.
  • Gönderi kimlikleri, konum gönderilerinde kullanılan Base64 relay kimlikleri değil, düz UUID'lerdir.
  • Tek seferde birkaç gönderiden fazlası için aynı satır yapısını kabul eden ve tüm grubu baştan doğrulayan POST /social/bulk-posts uç noktasını kullanın.

Yazma işlemi: canlı hesapta yürütülmemiştir. Gösterilen istek ve yanıt API şemasından oluşturulmuştur; bu işlem çalıştırıldığında gerçek sosyal medya hesaplarında gönderi yayımlar.

Request
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"    }  }'