Update a post
curl --request PATCH \
--url https://rawugc.com/api/v1/social/posts/{postId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"scheduledFor": 123,
"timezone": "<string>",
"accountIds": [
"<string>"
]
}
'import requests
url = "https://rawugc.com/api/v1/social/posts/{postId}"
payload = {
"content": "<string>",
"scheduledFor": 123,
"timezone": "<string>",
"accountIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
scheduledFor: 123,
timezone: '<string>',
accountIds: ['<string>']
})
};
fetch('https://rawugc.com/api/v1/social/posts/{postId}', 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://rawugc.com/api/v1/social/posts/{postId}",
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([
'content' => '<string>',
'scheduledFor' => 123,
'timezone' => '<string>',
'accountIds' => [
'<string>'
]
]),
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://rawugc.com/api/v1/social/posts/{postId}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"scheduledFor\": 123,\n \"timezone\": \"<string>\",\n \"accountIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://rawugc.com/api/v1/social/posts/{postId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"scheduledFor\": 123,\n \"timezone\": \"<string>\",\n \"accountIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rawugc.com/api/v1/social/posts/{postId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"scheduledFor\": 123,\n \"timezone\": \"<string>\",\n \"accountIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"postId": "<string>",
"platforms": [
"<string>"
],
"scheduledFor": 123,
"timezone": "<string>",
"content": "<string>",
"videoUrl": "<string>",
"createdAt": 123,
"publishedAt": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}Social Scheduling
Update a post
Update the caption, target platforms, or scheduled time of an existing post. At least one field must be provided.
PATCH
/
social
/
posts
/
{postId}
Update a post
curl --request PATCH \
--url https://rawugc.com/api/v1/social/posts/{postId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"scheduledFor": 123,
"timezone": "<string>",
"accountIds": [
"<string>"
]
}
'import requests
url = "https://rawugc.com/api/v1/social/posts/{postId}"
payload = {
"content": "<string>",
"scheduledFor": 123,
"timezone": "<string>",
"accountIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
scheduledFor: 123,
timezone: '<string>',
accountIds: ['<string>']
})
};
fetch('https://rawugc.com/api/v1/social/posts/{postId}', 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://rawugc.com/api/v1/social/posts/{postId}",
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([
'content' => '<string>',
'scheduledFor' => 123,
'timezone' => '<string>',
'accountIds' => [
'<string>'
]
]),
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://rawugc.com/api/v1/social/posts/{postId}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"scheduledFor\": 123,\n \"timezone\": \"<string>\",\n \"accountIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://rawugc.com/api/v1/social/posts/{postId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"scheduledFor\": 123,\n \"timezone\": \"<string>\",\n \"accountIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rawugc.com/api/v1/social/posts/{postId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"scheduledFor\": 123,\n \"timezone\": \"<string>\",\n \"accountIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"postId": "<string>",
"platforms": [
"<string>"
],
"scheduledFor": 123,
"timezone": "<string>",
"content": "<string>",
"videoUrl": "<string>",
"createdAt": 123,
"publishedAt": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}Authorizations
Use your API key from the RawUGC dashboard. Include as: Authorization: Bearer YOUR_API_KEY
Path Parameters
Post ID
Body
application/json
At least one field must be provided
Response
Post updated
Was this page helpful?
⌘I

