Retry failed platforms
curl --request POST \
--url https://api.aisa.one/apis/v1/social/posts/{postId}/retry \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/posts/{postId}/retry"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/posts/{postId}/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/social/posts/{postId}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/social/posts/{postId}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/social/posts/{postId}/retry")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/posts/{postId}/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"mediaItems": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"notice": "<string>",
"platforms": [
{
"accountId": "<string>",
"customContent": "<string>",
"customMedia": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"error": {
"category": "platform_rate_limit",
"message": "<string>",
"platformError": {},
"retryHint": "never",
"retryable": true,
"source": "<string>"
},
"platform": "tiktok",
"platformPostId": "<string>",
"platformPostUrl": "<string>",
"platformSpecificData": {},
"publishedAt": "2023-11-07T05:31:56Z",
"removedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>"
}
],
"profileId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>",
"timezone": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"mediaItems": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"notice": "<string>",
"platforms": [
{
"accountId": "<string>",
"customContent": "<string>",
"customMedia": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"error": {
"category": "platform_rate_limit",
"message": "<string>",
"platformError": {},
"retryHint": "never",
"retryable": true,
"source": "<string>"
},
"platform": "tiktok",
"platformPostId": "<string>",
"platformPostUrl": "<string>",
"platformSpecificData": {},
"publishedAt": "2023-11-07T05:31:56Z",
"removedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>"
}
],
"profileId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>",
"timezone": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"mediaItems": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"notice": "<string>",
"platforms": [
{
"accountId": "<string>",
"customContent": "<string>",
"customMedia": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"error": {
"category": "platform_rate_limit",
"message": "<string>",
"platformError": {},
"retryHint": "never",
"retryable": true,
"source": "<string>"
},
"platform": "tiktok",
"platformPostId": "<string>",
"platformPostUrl": "<string>",
"platformSpecificData": {},
"publishedAt": "2023-11-07T05:31:56Z",
"removedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>"
}
],
"profileId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>",
"timezone": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}发布与排期
Retry failed platforms
Retries failed platforms of a failed or partial post. Platforms whose retryHint is never are skipped.
POST
https://api.aisa.one
/
apis
/
v1
/
social
/
posts
/
{postId}
/
retry
Retry failed platforms
curl --request POST \
--url https://api.aisa.one/apis/v1/social/posts/{postId}/retry \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/posts/{postId}/retry"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/posts/{postId}/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/social/posts/{postId}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/social/posts/{postId}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/social/posts/{postId}/retry")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/posts/{postId}/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"mediaItems": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"notice": "<string>",
"platforms": [
{
"accountId": "<string>",
"customContent": "<string>",
"customMedia": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"error": {
"category": "platform_rate_limit",
"message": "<string>",
"platformError": {},
"retryHint": "never",
"retryable": true,
"source": "<string>"
},
"platform": "tiktok",
"platformPostId": "<string>",
"platformPostUrl": "<string>",
"platformSpecificData": {},
"publishedAt": "2023-11-07T05:31:56Z",
"removedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>"
}
],
"profileId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>",
"timezone": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"mediaItems": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"notice": "<string>",
"platforms": [
{
"accountId": "<string>",
"customContent": "<string>",
"customMedia": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"error": {
"category": "platform_rate_limit",
"message": "<string>",
"platformError": {},
"retryHint": "never",
"retryable": true,
"source": "<string>"
},
"platform": "tiktok",
"platformPostId": "<string>",
"platformPostUrl": "<string>",
"platformSpecificData": {},
"publishedAt": "2023-11-07T05:31:56Z",
"removedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>"
}
],
"profileId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>",
"timezone": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"mediaItems": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"notice": "<string>",
"platforms": [
{
"accountId": "<string>",
"customContent": "<string>",
"customMedia": [
{
"altText": "<string>",
"mediaId": "<string>",
"thumbnailUrl": "<string>",
"title": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"error": {
"category": "platform_rate_limit",
"message": "<string>",
"platformError": {},
"retryHint": "never",
"retryable": true,
"source": "<string>"
},
"platform": "tiktok",
"platformPostId": "<string>",
"platformPostUrl": "<string>",
"platformSpecificData": {},
"publishedAt": "2023-11-07T05:31:56Z",
"removedAt": "2023-11-07T05:31:56Z",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>"
}
],
"profileId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"status": "<string>",
"timezone": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}请求规范
- 方法与路径: POST /apis/v1/social/posts/{postId}/retry
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/social/posts/{postId}/retry - postId: path; 必填
{
"operationId": "post_aisa_social_apis_v1_social_posts_postid_retry",
"method": "POST",
"path": "/apis/v1/social/posts/{postId}/retry",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"in": "path",
"name": "postId",
"required": true,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
每个成功发布的目标单独收费:X 普通帖子 $0.015 USD;正文含链接 $0.200 USD(媒体链接不影响价格);其他平台 $0.01 USD。 同一帖子可以同时发布到 X 和其他平台。 发布失败的目标不收费;某个目标因余额不足或超过请求最高限价被拒付时,仅该目标失败,其他目标继续发布。 创建草稿免费。 已受理或结果未知的目标保持待确认状态;确认发布后,每个目标仅结算一次费用。 发布前可通过报价功能获取总费用。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
响应
Success