渠道管理/内容发布
修改发布时间
接口说明:修改待发布任务的发布时间。taskId 来自创建发布流程接口成功响应中的 data.tasks[n].id;publishAt 必须填写未来的 ISO 8601 时间,且任务状态必须允许修改。
PATCH
/
api
/
v2
/
channels
/
publish
/
tasks
/
{taskId}
/
publish-at
修改发布时间
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"publishAt": "2030-01-01T00:00:00.000Z"
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload = { "publishAt": "2030-01-01T00:00:00.000Z" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({publishAt: '2030-01-01T00:00:00.000Z'})
};
fetch('https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at', 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://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload := strings.NewReader("{\n \"publishAt\": \"2030-01-01T00:00:00.000Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<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))
}{
"code": 0,
"message": "请求成功",
"data": {
"taskId": "string"
},
"requestId": "string"
}授权
需要从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。
路径参数
任务 ID,取自创建发布流程响应中的 data.tasks[n].id
示例:
"task-id-from-create-flow"
请求体
application/json
目标发布时间
最后修改于 2026年9月29日
⌘I
修改发布时间
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"publishAt": "2030-01-01T00:00:00.000Z"
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload = { "publishAt": "2030-01-01T00:00:00.000Z" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({publishAt: '2030-01-01T00:00:00.000Z'})
};
fetch('https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at', 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://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload := strings.NewReader("{\n \"publishAt\": \"2030-01-01T00:00:00.000Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<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))
}{
"code": 0,
"message": "请求成功",
"data": {
"taskId": "string"
},
"requestId": "string"
}
