POST/api/v4/social/posts

ソーシャル投稿を作成

ブランドに接続されたFacebook、Instagram、X、LinkedIn、Pinterestのアカウントで、下書き、予約済み、または即時公開の投稿を作成します。

API キーが必要です。ヘッダーの形式とキーのローテーションについては認証を参照してください。

パラメーター

ボディ

名前型必須説明
inputobject必須Wrapper object. Every field below is a property of `input`, the entire body must be nested under it.
input.socialProfileIdstring必須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.namestring必須Internal name for the post (not shown to the audience). Used to find it again in lists.
input.platformsarray of strings必須Platforms to publish to: `FACEBOOK`, `INSTAGRAM`, `TWITTER` (X), `LINKEDIN`, `PINTEREST`.
input.contentstring必須The post body, published to every platform in `platforms`.
input.actionstring必須`DRAFT` to save without publishing, `SCHEDULE` to publish at a future time (requires a schedule), or `PUBLISH` to publish now.
input.mediaUrlsarray of strings任意Public https image URLs to attach. Instagram and Pinterest require at least one.
input.videoUrlsarray of strings任意Public https video URLs to attach.
input.linkstring任意Link to attach to the post where the platform supports one.
input.scheduledAtstring任意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.scheduleDatestring任意Publish date as `YYYY-MM-DD`, interpreted in the **brand's** timezone. Must be sent together with `scheduleTime`.
input.scheduleTimestring任意Publish time as `HH:MM` (24-hour), interpreted in the **brand's** timezone. Must be sent together with `scheduleDate`.
input.connectedChannelIdsarray of strings任意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.clientReferencestring任意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.

リクエストの例

そのまま貼り付けられるボディです。プレースホルダーの ID と値をご自身のものに置き換えてください。

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

レスポンス

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`).

1つのブランドの接続済みソーシャルアカウント(1つ以上)に向けて、投稿を1件作成します。同じ呼び出しで、DRAFTの保存、SCHEDULEのキューへの追加、即時のPUBLISHという3つのライフサイクルすべてに対応します。

ユースケース:独自のカレンダーからキャンペーンを予約する。 アプリには、クライアントが何をいつ発信したいかがすでに登録されています。各枠について、action: "SCHEDULE"と、scheduledAtまたはscheduleDate + scheduleTimeのいずれかを指定してこのエンドポイントを呼び出し、返されたUUIDを保存せずに照合できるように、独自の枠の識別子をclientReferenceとして渡します。GET /social/posts/{postId}ですべてのチャネルでの公開が確認できるまでは、その項目を保留中として表示し、POST /social/posts/cancelを呼び出すキャンセルボタンを用意します。

公開は非同期で行われます

action: "PUBLISH"は、応答を返す前に公開を行うことはありません。この呼び出しは投稿を受け付け、socialPostIdを返して、投稿を公開パイプラインに渡します。実際の結果を確認するには、GET /social/posts/{postId}をポーリングし、チャネルごとのchannels[]配列を読み取ります。各要素のstatusが、そのプラットフォームの結果を示します。同じリクエストでも、Instagramでは投稿に成功し、LinkedInでは失敗する場合があるため、channels[]が実際の結果を示し、投稿レベルのstatusはその概要を示します。

スケジュールの選択

action: "SCHEDULE"には、次の2つの形式のうち必ずどちらか1つを指定する必要があり、両方を指定することはできません。

形式フィールド解釈に使用する基準
絶対時刻scheduledAt、オフセット付きのISO-8601(2026-10-02T09:30:00-04:00)送信したオフセット
現地時刻scheduleDate(YYYY-MM-DD)とscheduleTime(HH:MM)ブランドのタイムゾーン

両方を送信した場合、scheduleDateをscheduleTimeなしで送信した場合、またはオフセットのないscheduledAtを送信した場合は、SY95046で拒否されます。DRAFTとPUBLISHには、スケジュールを一切含めてはいけません。

注意事項。

  • リクエストボディはinputオブジェクトでラップする必要があります。
  • HTTPステータスではなく、successを確認してください。 検証に失敗すると、HTTP 200が返され、success: falseと、問題ごとに1つの要素を持つerror配列が含まれます。successがfalseの場合、何も作成されません。
  • ブランドはボディ内のsocialProfileIdで識別します。brandIdはURLパスのトークンとしてのみ使用され、ボディのフィールドとして使用されることはありません。
  • platforms内のすべてのプラットフォームが、そのブランドですでに接続されている必要があります。 有効なチャネルがないプラットフォームはSY95045で失敗するため、まずブランドの接続を確認し、未接続のものについては接続リンクを通じてユーザーに接続してもらいます。
  • プラットフォームの値は、大文字の列挙名FACEBOOK、INSTAGRAM、TWITTER、LINKEDIN、PINTERESTです。TWITTERはXを指し、値には旧名称が維持されており、小文字の値は拒否されます。
  • InstagramとPinterestはテキストのみの投稿を受け付けないため、どちらかがplatformsに含まれる場合は、mediaUrlsの要素を少なくとも1つ指定してください。
  • 投稿IDは通常のUUIDであり、拠点の投稿で使用するBase64のrelay IDではありません。
  • 一度に数件を超える投稿を扱う場合は、同じ行形式を受け取り、バッチ全体を事前に検証するPOST /social/bulk-postsを使用してください。

書き込み操作:実際のアカウントに対しては実行していません。表示されているリクエストとレスポンスはAPIスキーマに基づいて作成されたものであり、実行すると実際のソーシャルアカウントに投稿が公開されます。

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