Skip to main content
POST
/
api
/
v2
/
channels
/
publish
/
flows
Create Publish Flow
curl --request POST \
  --url https://aitoearn.cn/api/v2/channels/publish/flows \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "content": {
    "body": "test",
    "media": [
      {
        "url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4",
        "metadata": {
          "type": "video"
        }
      }
    ],
    "cover": {
      "url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg",
      "metadata": {
        "type": "image"
      }
    },
    "title": "test title"
  },
  "publishAt": "2026-06-29T09:43:42Z",
  "items": {
    "accountId": "KWAI_f1b6d99b9252a17314bf5724e666123f",
    "platform": "KWAI",
    "overrides": {
      "body": "test",
      "media": [
        {
          "url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4",
          "metadata": {
            "type": "video"
          }
        }
      ],
      "cover": {
        "url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg",
        "metadata": {
          "type": "image"
        }
      },
      "title": "test title"
    }
  }
}
'
{ "code": 0, "message": "Request succeeded", "data": { "flowId": "string", "tasks": [ { "id": "string", "accountId": "string", "platform": "douyin", "status": -1, "publishTime": "2026-07-02T12:00:00.000Z", "platformWorkId": "string", "workLink": "string", "linkStatus": "pending", "linkError": "string", "linkMeta": {}, "errorMsg": "string" } ] } }

Authorizations

X-Api-Key
string
header
required

Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".

Body

application/json
content
object
required

Share content across platforms

publishAt
string<date-time>
required

Target release time

items
object[]
required

Platform release items

Minimum array length: 1
flowId
string

External flow ID

context
object

External business relationships

Response

200 - application/json

The request has been processed by the service. Business success is determined by whether the response body has code === 0.

code
integer
required

Business status code. 0 means success; non-zero means a business error.

message
string
required

Response message.

data
object
requestId
string

Request ID.

timestamp
integer

Error response timestamp in Unix milliseconds.