POST/api/v4/social/bulk-posts

投稿を一括作成する

1回のリクエストで最大500件のソーシャル投稿を検証してキューに登録し、行ごとの結果をポーリングで取得するためのジョブを返します。

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

パラメーター

ボディ

必須と示されたネストされたフィールドは、その親フィールドを送信する場合にのみ適用されます。親フィールドが任意で省略した場合、その必須の子フィールドは適用されません。

名前型必須説明
inputobject必須Wrapper object. The entire request body must be nested under `input`.
input.postsarray of objects必須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.namestring任意Optional label for the job itself, to identify it in your own logs. Not shown to any audience.
input.posts[].socialProfileIdstring必須UUID of the brand publishing this row. Rows may target different brands in one request.
input.posts[].namestring必須Internal name for the post.
input.posts[].platformsarray of strings必須Platforms for this row: `FACEBOOK`, `INSTAGRAM`, `TWITTER` (X), `LINKEDIN`, `PINTEREST`. Each must already have a connection on that row's brand.
input.posts[].contentstring必須The post body.
input.posts[].actionstring必須`DRAFT`, `SCHEDULE` (requires a schedule) or `PUBLISH`.
input.posts[].mediaUrlsarray of strings任意Public https image URLs. Required when the row targets Instagram or Pinterest.
input.posts[].videoUrlsarray of strings任意Public https video URLs.
input.posts[].linkstring任意Link to attach where the platform supports one.
input.posts[].scheduledAtstring任意ISO-8601 publish instant with an offset. Alternative to `scheduleDate` + `scheduleTime`, never both.
input.posts[].scheduleDatestring任意`YYYY-MM-DD`, interpreted in that row's brand timezone. Send with `scheduleTime`.
input.posts[].scheduleTimestring任意`HH:MM`, interpreted in that row's brand timezone. Send with `scheduleDate`.
input.posts[].connectedChannelIdsarray of strings任意Restrict this row to specific connections by ID.
input.posts[].clientReferencestring任意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.

リクエストの例

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

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

レスポンス

200The whole batch validated. A job was queued, poll GET /social/bulk-posts/{bulkJobId} for per-row results.
Response
{  "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`.
Response
{  "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.

1回のリクエストで多数のソーシャル投稿を作成します。各行はリクエストペイロード内で送信されます。ファイルのアップロードもCSVもなく、POST /social/postsが1件ずつ受け取るものと同じオブジェクトの配列だけを使用します。1回のリクエストにつき最大500行です。

ユースケース:1回の呼び出しで四半期分のコンテンツを読み込む。 計画ツールには、クライアントのコンテンツカレンダー全体が保存されています。各枠に対応する行を作成し、それぞれに独自のclientReferenceを付けて、まとめて送信します。バッチは全体として成功するか、修正が必要な行を正確に通知します。返されたjob.idを保存し、statusが終了状態になるまでGET /social/bulk-posts/{bulkJobId}をポーリングしてから、各結果をそのclientReferenceで照合します。

バッチ全体の事前検証

何かが作成される前にすべての行が検証され、この段階ではバッチ全体が不可分の単位として扱われます。

  • いずれかの行が無効な場合、何も作成されません。successはfalseになり、SY95050がerror内に返され、無効な各行がjob.results[]に表示されます。それぞれに0始まりのindex、その行のclientReference、およびerrors[]内の理由が含まれます。該当する行を修正し、バッチ全体を再送信してください。
  • すべての行が有効な場合、ジョブがキューに登録され、successはtrueになり、job.idが返されます。個々の行は、後で公開時にプラットフォームから拒否されると失敗することがあります。その失敗はここではなくジョブに表示されます。

可能な場合はclientReferenceで、それ以外の場合はindexで照合してください。行自体は返されないため、この2つのフィールドだけが自社のデータとの対応付けに使えます。

注意事項。

  • リクエストボディはinputオブジェクトでラップする必要があり、行はinput.postsに格納します。
  • HTTPステータスではなく、successを確認してください。 バッチ全体が拒否された場合もHTTP 200が返され、success: falseとなり、errorにSY95050が含まれます。
  • 1回のリクエストにつき最大500行です。 これを超える配列はSY95048で即座に拒否され、何も作成されないため、分割して複数のバッチで送信してください。
  • 各行のブランドはsocialProfileIdです。brandIdは常にURLパストークンとしてのみ使用され、このルートにはパストークン自体がありません。
  • 各行は異なるブランドを対象にできます。各行のplatformsはその行自身のブランドに対して確認されるため、あるブランドでは接続されていて別のブランドでは接続されていないプラットフォームがある場合、失敗するのはそのプラットフォームを必要とする行だけです。
  • 各行には単一の投稿と同じスケジュールルールが適用されます。scheduledAtまたはscheduleDate + scheduleTimeのどちらか一方を指定し、両方は指定しません。scheduleDate / scheduleTimeはその行のブランドのタイムゾーンで解釈されます。1つのバッチ内の異なる行で、この2つの形式を混在させても問題ありません。
  • レート制限は行ではなくリクエストに適用されるため、500行のバッチは許容量に対して1回のリクエストとしてカウントされます。レート制限を参照してください。

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

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