Edit or reschedule a post
curl --request PUT \
--url https://api.salesive.com/api/v1/social-posts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"prompt": "<string>",
"caption": "<string>",
"platforms": [
"<string>"
],
"formats": [
"<string>"
],
"media": [
{
"url": "<string>",
"duration": 123
}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"generateAheadHours": 84
}
'import requests
url = "https://api.salesive.com/api/v1/social-posts/{id}"
payload = {
"title": "<string>",
"prompt": "<string>",
"caption": "<string>",
"platforms": ["<string>"],
"formats": ["<string>"],
"media": [
{
"url": "<string>",
"duration": 123
}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"generateAheadHours": 84
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
prompt: '<string>',
caption: '<string>',
platforms: ['<string>'],
formats: ['<string>'],
media: [{url: '<string>', duration: 123}],
scheduledAt: '2023-11-07T05:31:56Z',
generateAheadHours: 84
})
};
fetch('https://api.salesive.com/api/v1/social-posts/{id}', 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.salesive.com/api/v1/social-posts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'prompt' => '<string>',
'caption' => '<string>',
'platforms' => [
'<string>'
],
'formats' => [
'<string>'
],
'media' => [
[
'url' => '<string>',
'duration' => 123
]
],
'scheduledAt' => '2023-11-07T05:31:56Z',
'generateAheadHours' => 84
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/social-posts/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"prompt\": \"<string>\",\n \"caption\": \"<string>\",\n \"platforms\": [\n \"<string>\"\n ],\n \"formats\": [\n \"<string>\"\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"duration\": 123\n }\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"generateAheadHours\": 84\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.put("https://api.salesive.com/api/v1/social-posts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"prompt\": \"<string>\",\n \"caption\": \"<string>\",\n \"platforms\": [\n \"<string>\"\n ],\n \"formats\": [\n \"<string>\"\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"duration\": 123\n }\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"generateAheadHours\": 84\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/social-posts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"prompt\": \"<string>\",\n \"caption\": \"<string>\",\n \"platforms\": [\n \"<string>\"\n ],\n \"formats\": [\n \"<string>\"\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"duration\": 123\n }\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"generateAheadHours\": 84\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"kind": "ai",
"title": "<string>",
"prompt": "<string>",
"caption": "<string>",
"captions": {},
"platforms": [
"instagram"
],
"formats": [
"<string>"
],
"media": [
{
"url": "<string>",
"type": "image",
"duration": 123
}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"status": "proposed",
"mode": "auto",
"generated": {
"images": [
"<string>"
],
"imagesByFormat": {},
"generatedAt": "2023-11-07T05:31:56Z"
},
"publishResults": [
{
"platform": "<string>",
"format": "<string>",
"success": true,
"postId": "<string>",
"error": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Social planner
Edit or reschedule a post
Edit a post that has not started publishing. Requires the WRITE_SOCIAL scope.
PUT
/
social-posts
/
{id}
Edit or reschedule a post
curl --request PUT \
--url https://api.salesive.com/api/v1/social-posts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"prompt": "<string>",
"caption": "<string>",
"platforms": [
"<string>"
],
"formats": [
"<string>"
],
"media": [
{
"url": "<string>",
"duration": 123
}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"generateAheadHours": 84
}
'import requests
url = "https://api.salesive.com/api/v1/social-posts/{id}"
payload = {
"title": "<string>",
"prompt": "<string>",
"caption": "<string>",
"platforms": ["<string>"],
"formats": ["<string>"],
"media": [
{
"url": "<string>",
"duration": 123
}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"generateAheadHours": 84
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
prompt: '<string>',
caption: '<string>',
platforms: ['<string>'],
formats: ['<string>'],
media: [{url: '<string>', duration: 123}],
scheduledAt: '2023-11-07T05:31:56Z',
generateAheadHours: 84
})
};
fetch('https://api.salesive.com/api/v1/social-posts/{id}', 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.salesive.com/api/v1/social-posts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'prompt' => '<string>',
'caption' => '<string>',
'platforms' => [
'<string>'
],
'formats' => [
'<string>'
],
'media' => [
[
'url' => '<string>',
'duration' => 123
]
],
'scheduledAt' => '2023-11-07T05:31:56Z',
'generateAheadHours' => 84
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/social-posts/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"prompt\": \"<string>\",\n \"caption\": \"<string>\",\n \"platforms\": [\n \"<string>\"\n ],\n \"formats\": [\n \"<string>\"\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"duration\": 123\n }\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"generateAheadHours\": 84\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.put("https://api.salesive.com/api/v1/social-posts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"prompt\": \"<string>\",\n \"caption\": \"<string>\",\n \"platforms\": [\n \"<string>\"\n ],\n \"formats\": [\n \"<string>\"\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"duration\": 123\n }\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"generateAheadHours\": 84\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/social-posts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"prompt\": \"<string>\",\n \"caption\": \"<string>\",\n \"platforms\": [\n \"<string>\"\n ],\n \"formats\": [\n \"<string>\"\n ],\n \"media\": [\n {\n \"url\": \"<string>\",\n \"duration\": 123\n }\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"generateAheadHours\": 84\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"kind": "ai",
"title": "<string>",
"prompt": "<string>",
"caption": "<string>",
"captions": {},
"platforms": [
"instagram"
],
"formats": [
"<string>"
],
"media": [
{
"url": "<string>",
"type": "image",
"duration": 123
}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"status": "proposed",
"mode": "auto",
"generated": {
"images": [
"<string>"
],
"imagesByFormat": {},
"generatedAt": "2023-11-07T05:31:56Z"
},
"publishResults": [
{
"platform": "<string>",
"format": "<string>",
"success": true,
"postId": "<string>",
"error": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}A change to the prompt, slides, references, catalog item or formats on an AI post discards its images and re-queues generation, which spends the store’s AI credits, so that edit also needs
USE_MERCHANT_AI. A pure reschedule does not.Authorizations
Body
application/json
Any subset of the create fields. kind cannot be changed after the post exists.
Response
The updated post.
Was this page helpful?

