Update a post
curl --request PATCH \
--url https://api.cut.pro/api/v1/posts/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"scheduled_at": "<string>",
"items": [
{
"edit_id": "<string>",
"connection_id": "<string>",
"metadata": {
"twitter": {
"text": "<string>"
}
},
"item_id": "<string>"
}
]
}
'import requests
url = "https://api.cut.pro/api/v1/posts/{id}"
payload = {
"scheduled_at": "<string>",
"items": [
{
"edit_id": "<string>",
"connection_id": "<string>",
"metadata": { "twitter": { "text": "<string>" } },
"item_id": "<string>"
}
]
}
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({
scheduled_at: '<string>',
items: [
{
edit_id: '<string>',
connection_id: '<string>',
metadata: {twitter: {text: '<string>'}},
item_id: '<string>'
}
]
})
};
fetch('https://api.cut.pro/api/v1/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.cut.pro/api/v1/posts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scheduled_at' => '<string>',
'items' => [
[
'edit_id' => '<string>',
'connection_id' => '<string>',
'metadata' => [
'twitter' => [
'text' => '<string>'
]
],
'item_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.cut.pro/api/v1/posts/{id}"
payload := strings.NewReader("{\n \"scheduled_at\": \"<string>\",\n \"items\": [\n {\n \"edit_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"metadata\": {\n \"twitter\": {\n \"text\": \"<string>\"\n }\n },\n \"item_id\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.patch("https://api.cut.pro/api/v1/posts/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scheduled_at\": \"<string>\",\n \"items\": [\n {\n \"edit_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"metadata\": {\n \"twitter\": {\n \"text\": \"<string>\"\n }\n },\n \"item_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cut.pro/api/v1/posts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduled_at\": \"<string>\",\n \"items\": [\n {\n \"edit_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"metadata\": {\n \"twitter\": {\n \"text\": \"<string>\"\n }\n },\n \"item_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"scheduled_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"item_count": 123,
"items": [
{
"id": "<string>",
"connection_id": "<string>",
"edit_id": "<string>",
"render_id": "<string>",
"published_url": "<string>",
"error_code": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"posted_at": "<string>"
}
]
}{
"item_id": "<string>",
"invalid_connections": [
"<string>"
]
}{
"invalid_edits": [
"<string>"
]
}Publicação
Update a post
Updates a post that is still pending. Two things can change:
• scheduled_at — reschedule (must be at least 1 minute in the future) or set to null to publish immediately. Only allowed while every item is still in pending state.
• items — replace the set of pending items. Items with item_id are updated in place, items without are inserted, and pending items not present in the body are deleted. Items that already finished publishing are never touched.
At least one of scheduled_at or items must be provided.
PATCH
/
posts
/
{id}
Update a post
curl --request PATCH \
--url https://api.cut.pro/api/v1/posts/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"scheduled_at": "<string>",
"items": [
{
"edit_id": "<string>",
"connection_id": "<string>",
"metadata": {
"twitter": {
"text": "<string>"
}
},
"item_id": "<string>"
}
]
}
'import requests
url = "https://api.cut.pro/api/v1/posts/{id}"
payload = {
"scheduled_at": "<string>",
"items": [
{
"edit_id": "<string>",
"connection_id": "<string>",
"metadata": { "twitter": { "text": "<string>" } },
"item_id": "<string>"
}
]
}
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({
scheduled_at: '<string>',
items: [
{
edit_id: '<string>',
connection_id: '<string>',
metadata: {twitter: {text: '<string>'}},
item_id: '<string>'
}
]
})
};
fetch('https://api.cut.pro/api/v1/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.cut.pro/api/v1/posts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scheduled_at' => '<string>',
'items' => [
[
'edit_id' => '<string>',
'connection_id' => '<string>',
'metadata' => [
'twitter' => [
'text' => '<string>'
]
],
'item_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.cut.pro/api/v1/posts/{id}"
payload := strings.NewReader("{\n \"scheduled_at\": \"<string>\",\n \"items\": [\n {\n \"edit_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"metadata\": {\n \"twitter\": {\n \"text\": \"<string>\"\n }\n },\n \"item_id\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.patch("https://api.cut.pro/api/v1/posts/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scheduled_at\": \"<string>\",\n \"items\": [\n {\n \"edit_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"metadata\": {\n \"twitter\": {\n \"text\": \"<string>\"\n }\n },\n \"item_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cut.pro/api/v1/posts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduled_at\": \"<string>\",\n \"items\": [\n {\n \"edit_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"metadata\": {\n \"twitter\": {\n \"text\": \"<string>\"\n }\n },\n \"item_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"scheduled_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"item_count": 123,
"items": [
{
"id": "<string>",
"connection_id": "<string>",
"edit_id": "<string>",
"render_id": "<string>",
"published_url": "<string>",
"error_code": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"posted_at": "<string>"
}
]
}{
"item_id": "<string>",
"invalid_connections": [
"<string>"
]
}{
"invalid_edits": [
"<string>"
]
}Autorizações
Parâmetros de caminho
Corpo
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Resposta
Response for status 200
Última modificação em 7 de julho de 2026
Esta página foi útil?
⌘I