curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"post_ids": [
"6886b8d390dc7e2f4a2c91b3",
"6886b8d390dc7e2f4a2c91b4"
]
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve"
payload = { "post_ids": ["6886b8d390dc7e2f4a2c91b3", "6886b8d390dc7e2f4a2c91b4"] }
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({post_ids: ['6886b8d390dc7e2f4a2c91b3', '6886b8d390dc7e2f4a2c91b4']})
};
fetch('https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve', 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://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'post_ids' => [
'6886b8d390dc7e2f4a2c91b3',
'6886b8d390dc7e2f4a2c91b4'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve"
payload := strings.NewReader("{\n \"post_ids\": [\n \"6886b8d390dc7e2f4a2c91b3\",\n \"6886b8d390dc7e2f4a2c91b4\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"post_ids\": [\n \"6886b8d390dc7e2f4a2c91b3\",\n \"6886b8d390dc7e2f4a2c91b4\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"post_ids\": [\n \"6886b8d390dc7e2f4a2c91b3\",\n \"6886b8d390dc7e2f4a2c91b4\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"approved": [
"6886b8d390dc7e2f4a2c91b3"
],
"not_found": [
"6886b8d390dc7e2f4a2c91b9"
],
"rejected": [
{
"id": "6886b8d390dc7e2f4a2c91b4",
"status": "posted"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Approve scheduled posts
Approves calendar posts, moving each one from proposal to scheduled.
Approving doesn’t publish anything and doesn’t reserve anything. It marks which posts you want sent, and Start scheduling posts is what hands them to the publisher.
Approval is a selection, so one unusable id never discards the rest. The request succeeds with a 200 even when no id could be approved, and the response reports each one: approved for the posts that are now scheduled, not_found for ids that name no live post of this app, and rejected for posts past the point of approval, each with the status that blocked it. Repeated ids are collapsed, and re-approving a post that’s already scheduled reports it under approved without changing anything, so calling twice returns the same body.
Send between 1 and 50 ids.
The social calendar endpoints share two rate limits: 20 requests per minute across creating, editing, deleting and approving posts, and 40 requests per minute across the rest. This endpoint counts against the 20.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"post_ids": [
"6886b8d390dc7e2f4a2c91b3",
"6886b8d390dc7e2f4a2c91b4"
]
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve"
payload = { "post_ids": ["6886b8d390dc7e2f4a2c91b3", "6886b8d390dc7e2f4a2c91b4"] }
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({post_ids: ['6886b8d390dc7e2f4a2c91b3', '6886b8d390dc7e2f4a2c91b4']})
};
fetch('https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve', 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://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'post_ids' => [
'6886b8d390dc7e2f4a2c91b3',
'6886b8d390dc7e2f4a2c91b4'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve"
payload := strings.NewReader("{\n \"post_ids\": [\n \"6886b8d390dc7e2f4a2c91b3\",\n \"6886b8d390dc7e2f4a2c91b4\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"post_ids\": [\n \"6886b8d390dc7e2f4a2c91b3\",\n \"6886b8d390dc7e2f4a2c91b4\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/social-calendar/posts/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"post_ids\": [\n \"6886b8d390dc7e2f4a2c91b3\",\n \"6886b8d390dc7e2f4a2c91b4\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"approved": [
"6886b8d390dc7e2f4a2c91b3"
],
"not_found": [
"6886b8d390dc7e2f4a2c91b9"
],
"rejected": [
{
"id": "6886b8d390dc7e2f4a2c91b4",
"status": "posted"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal API key.
Path Parameters
ID of the app whose social calendar you want.
Body
IDs of the posts to approve, 1 to 50 of them, as returned by List scheduled posts. Repeated ids are collapsed.
1 - 50 elements^[0-9a-fA-F]{24}$[
"6886b8d390dc7e2f4a2c91b3",
"6886b8d390dc7e2f4a2c91b4"
]
Response
The outcome of each id you sent.
Per-id outcome of an approve call.
Approval is a selection, so one unusable id must not discard the rest: valid
rows transition and the others are reported. Re-approving a row that is
already scheduled lands in approved without a write, which makes a
repeated call return the same body as the first.
IDs of the posts that are now scheduled, including any that already were.
["6886b8d390dc7e2f4a2c91b3"]
IDs that name no live post of this app, because the post never existed or was deleted.
["6886b8d390dc7e2f4a2c91b9"]
Posts that are past the point of approval, each with the status that refused it.
Show child attributes
Show child attributes
[
{
"id": "6886b8d390dc7e2f4a2c91b4",
"status": "posted"
}
]
Was this page helpful?