API endpointsPublish requestsSubmit one or more publish requests POST

Submit one or more publish requests

POST
/v1/publish-requests

Submit one or more publish requests. Each item creates provider content — a post, a comment, a reply, a message — through a Connected Profile. Every item's args is validated against its content type's publish input first and the submission is rejected whole if any item fails; each item then runs independently with its own pub_* ledger entry. Requires an Idempotency-Key.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Header Parameters

idempotency-key*string

A unique key for this request, scoped to the Organization and operation. Retrying with the same key and payload returns the first result instead of repeating the work; the same key with a different payload is refused with 409 conflict. Keys expire 24 hours after first use, and a request still in flight after 15 minutes releases its key.

Match\S
Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/publish-requests" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "publishRequests": [      {        "contentType": "youtube.videos.comments",        "connectedProfileId": "test_cp_4T2cgH9gnSqEb9DrntKA",        "args": {          "target": {            "contentType": "youtube.videos.items",            "externalId": "test_video_1"          },          "text": "Hello from Koil"        }      }    ]  }'
{  "publishRequests": [    {      "status": "created",      "contentType": "string",      "variant": "string",      "connectedProfileId": "string",      "groupId": "string",      "clientItemId": "string",      "publishRequestId": "string",      "error": null,      "statusUrl": "string"    }  ]}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "property1": null,      "property2": null    }  }}