cURL
curl --request POST \
--url "https://omnimux.ai/api/social/v1/posts" \
--header 'Authorization: Bearer <user-access-token>' \
--header 'New-Api-User: <user-id>' \
--header 'Content-Type: application/json' \
--data '{"provider":"zernio","content":"Your original post","account_ids":[123],"publish_now":true}'import requests
url = "https://omnimux.ai/api/social/v1/posts"
payload = {
"provider": "zernio",
"account_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"New-Api-User": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'New-Api-User': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({provider: 'zernio', account_ids: [123]})
};
fetch('https://omnimux.ai/api/social/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://omnimux.ai/api/social/v1/posts"
payload := strings.NewReader("{\n \"provider\": \"zernio\",\n \"account_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("New-Api-User", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": 123,
"provider": "zernio",
"status": "<string>",
"provider_post_id": "<string>",
"content_preview": "<string>",
"created_at": 123,
"idempotency_key": "<string>"
}
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"code": "account-provider-mismatch",
"message": "account-provider-mismatch"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}帖子
创建帖子
创建帖子 — 显式账号来源
POST
/
api
/
social
/
v1
/
posts
cURL
curl --request POST \
--url "https://omnimux.ai/api/social/v1/posts" \
--header 'Authorization: Bearer <user-access-token>' \
--header 'New-Api-User: <user-id>' \
--header 'Content-Type: application/json' \
--data '{"provider":"zernio","content":"Your original post","account_ids":[123],"publish_now":true}'import requests
url = "https://omnimux.ai/api/social/v1/posts"
payload = {
"provider": "zernio",
"account_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"New-Api-User": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'New-Api-User': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({provider: 'zernio', account_ids: [123]})
};
fetch('https://omnimux.ai/api/social/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://omnimux.ai/api/social/v1/posts"
payload := strings.NewReader("{\n \"provider\": \"zernio\",\n \"account_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("New-Api-User", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": 123,
"provider": "zernio",
"status": "<string>",
"provider_post_id": "<string>",
"content_preview": "<string>",
"created_at": 123,
"idempotency_key": "<string>"
}
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"code": "account-provider-mismatch",
"message": "account-provider-mismatch"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}所有目标账号必须属于请求来源。幂等命中也校验已存来源与账号集合;不符返回 409。媒体预签名仍依赖 Zernio,不是官方独立上传链路。
provider 必填,仅允许 tiktok_direct 或 zernio,表示操作范围,不能改写已存来源。缺失或未知值返回 400 invalid-provider。
使用 OmniMux 用户 access token 和 New-Api-User,不是 sk- 密钥。同时检查 HTTP 状态和 success;部分上游错误仍返回 HTTP 200、success:false。授权
OmniMux user access token, not an sk- API key.
Current authenticated user ID.
请求头
Replay must match both source and account set. X-Idempotency-Key is also accepted.
请求体
application/json
Required expected source; never changes the stored account or post provider.
可用选项:
tiktok_direct, zernio Owned OmniMux account IDs, all belonging to the requested source. Official publishing supports one account.
Minimum array length:
1Caption. Use content, not text.
Setting this makes publish_now false.
Official TikTok requires media. Existing provider-specific media and scheduling behavior applies.
Show child attributes
Show child attributes