XreplyAIDevelopers
API ReferencePosts

Create up to 50 posts in one call

Requires scope: `posts:write`. Each item is created in its own transaction, so a single invalid item does not roll back the others. Returns `201` if any item succeeded, `422` if all failed or if more than 50 items were supplied.

POST
/posts/bulk
AuthorizationBearer <token>

A personal API key created in the dashboard (Starter, Pro, and Team plans).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/posts/bulk" \  -H "Content-Type: application/json" \  -d '{    "posts": [      {        "post_contents": [          {            "platform": "twitter",            "body": "First."          }        ],        "social_account_ids": [          301        ]      },      {        "post_contents": [          {            "platform": "linkedin",            "body": "Second."          }        ],        "social_account_ids": [          302        ]      }    ]  }'
{  "created": [    {      "id": 9101,      "status": "draft"    }  ],  "errors": [    {      "index": 1,      "message": "Body can't be blank"    }  ]}