Posts
Retry a failed post
Publishes a failed post now.
Retrying is refused when the platform rejected the post (failureKind is permanent: change the post first) or its channel needs reconnecting (failureKind is account).
POST
/
posts
/
{id}
/
retry
Retry a failed post
curl --request POST \
--url https://api.postploy.com/public/v1/posts/{id}/retry \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postploy.com/public/v1/posts/{id}/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/posts/{id}/retry"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"statusGroup": "draft",
"blockedReason": "account_disconnected",
"socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "linkedin",
"title": "<string>",
"text": "<string>",
"thread": [
"<string>"
],
"scheduledAt": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"acceptedAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"link": "<string>",
"failureReason": "<string>",
"failureKind": "transient",
"sentBack": {
"reason": "<string>",
"note": "<string>",
"by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "member"
},
"at": "2023-11-07T05:31:56Z"
},
"review": {
"reviewer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"sentAt": "2023-11-07T05:31:56Z"
},
"attempts": 123,
"mediaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "image",
"fileName": "<string>",
"url": "<string>",
"thumbnailUrl": "<string>",
"mimeType": "<string>",
"duration": 123,
"altText": "<string>"
}
],
"platformFields": {
"linkedin": {
"visibility": "PUBLIC",
"firstComment": "<string>",
"link": "<string>"
},
"twitter": {
"replyRule": "everyone",
"retweetConfig": {
"value": 2,
"frequency": "hour"
}
},
"instagram": {
"postType": "post",
"reelGrid": "reel_only",
"firstComment": "<string>",
"collaborators": [
"<string>"
]
},
"tiktok": {
"visibility": "public",
"discloseContent": true,
"allowMusic": true,
"promotion": [
"brand"
],
"allowUsersTo": [
"comment"
]
},
"youtube": {
"visibility": "public",
"forKids": true
}
},
"conversationId": "<string>",
"seriesId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"actions": {
"edit": true,
"approve": true,
"reject": true,
"review": true,
"retry": true,
"delete": true
}
}
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 409,
"message": "The platform rejected this post. Edit it, then schedule it again.",
"errors": null,
"timestamp": "2030-01-15T09:02:00.000Z",
"route": "/public/v1/posts/3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9/retry"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}⌘I
Retry a failed post
curl --request POST \
--url https://api.postploy.com/public/v1/posts/{id}/retry \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postploy.com/public/v1/posts/{id}/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/posts/{id}/retry"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"statusGroup": "draft",
"blockedReason": "account_disconnected",
"socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "linkedin",
"title": "<string>",
"text": "<string>",
"thread": [
"<string>"
],
"scheduledAt": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"acceptedAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"link": "<string>",
"failureReason": "<string>",
"failureKind": "transient",
"sentBack": {
"reason": "<string>",
"note": "<string>",
"by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "member"
},
"at": "2023-11-07T05:31:56Z"
},
"review": {
"reviewer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"sentAt": "2023-11-07T05:31:56Z"
},
"attempts": 123,
"mediaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "image",
"fileName": "<string>",
"url": "<string>",
"thumbnailUrl": "<string>",
"mimeType": "<string>",
"duration": 123,
"altText": "<string>"
}
],
"platformFields": {
"linkedin": {
"visibility": "PUBLIC",
"firstComment": "<string>",
"link": "<string>"
},
"twitter": {
"replyRule": "everyone",
"retweetConfig": {
"value": 2,
"frequency": "hour"
}
},
"instagram": {
"postType": "post",
"reelGrid": "reel_only",
"firstComment": "<string>",
"collaborators": [
"<string>"
]
},
"tiktok": {
"visibility": "public",
"discloseContent": true,
"allowMusic": true,
"promotion": [
"brand"
],
"allowUsersTo": [
"comment"
]
},
"youtube": {
"visibility": "public",
"forKids": true
}
},
"conversationId": "<string>",
"seriesId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"actions": {
"edit": true,
"approve": true,
"reject": true,
"review": true,
"retry": true,
"delete": true
}
}
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 409,
"message": "The platform rejected this post. Edit it, then schedule it again.",
"errors": null,
"timestamp": "2030-01-15T09:02:00.000Z",
"route": "/public/v1/posts/3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9/retry"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}