curl --request POST \
--url https://api.recoupable.dev/api/posts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"video_url": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_account_id": "<string>",
"cover_url": "<string>",
"title": "<string>",
"description": "<string>",
"privacy": "public",
"tags": [
"<string>"
],
"publish_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.recoupable.dev/api/posts"
payload = {
"video_url": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_account_id": "<string>",
"cover_url": "<string>",
"title": "<string>",
"description": "<string>",
"privacy": "public",
"tags": ["<string>"],
"publish_at": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
video_url: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sub_account_id: '<string>',
cover_url: '<string>',
title: '<string>',
description: '<string>',
privacy: 'public',
tags: ['<string>'],
publish_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.recoupable.dev/api/posts', 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.recoupable.dev/api/posts",
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([
'video_url' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sub_account_id' => '<string>',
'cover_url' => '<string>',
'title' => '<string>',
'description' => '<string>',
'privacy' => 'public',
'tags' => [
'<string>'
],
'publish_at' => '2023-11-07T05:31:56Z'
]),
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.recoupable.dev/api/posts"
payload := strings.NewReader("{\n \"video_url\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_account_id\": \"<string>\",\n \"cover_url\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"privacy\": \"public\",\n \"tags\": [\n \"<string>\"\n ],\n \"publish_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.recoupable.dev/api/posts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_account_id\": \"<string>\",\n \"cover_url\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"privacy\": \"public\",\n \"tags\": [\n \"<string>\"\n ],\n \"publish_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_account_id\": \"<string>\",\n \"cover_url\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"privacy\": \"public\",\n \"tags\": [\n \"<string>\"\n ],\n \"publish_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled"
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}Create Post
Availability: pending. This endpoint is specified ahead of implementation and is not yet live on the hosted API; it ships through recoupable/app#2241. Do not rely on it until this notice is removed.
Publish a video with its copy to one connected social account, now or at a set time. Send one request per target account; to post the same video to several platforms, call this once per platform.
Without publish_at the post starts publishing immediately and is returned as publishing. With publish_at it is returned as scheduled and publishes at that time. Either way this returns 202 right away: poll Get Post until status is posted, failed or cancelled.
The platform must already be connected for the account (see Authorize Connector). Copy uses one shape for every platform. Which fields each platform uses, and their limits:
| Platform | title | description | cover_url | privacy, tags |
|---|---|---|---|---|
youtube | required, video title, max 100 characters | video description, max 5,000 characters | not used (YouTube picks the frame) | used |
instagram | not used | required, Reel caption, max 2,200 characters | Reel cover image | not used |
x | not used | required, post text, max 280 weighted characters (URLs count as 23) | not used | not used |
linkedin | video title shown on the post | required, post commentary, max 3,000 characters | video thumbnail | not used |
Limits are checked here, so an over-length body fails with 400 instead of at publish time.
curl --request POST \
--url https://api.recoupable.dev/api/posts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"video_url": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_account_id": "<string>",
"cover_url": "<string>",
"title": "<string>",
"description": "<string>",
"privacy": "public",
"tags": [
"<string>"
],
"publish_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.recoupable.dev/api/posts"
payload = {
"video_url": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sub_account_id": "<string>",
"cover_url": "<string>",
"title": "<string>",
"description": "<string>",
"privacy": "public",
"tags": ["<string>"],
"publish_at": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
video_url: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sub_account_id: '<string>',
cover_url: '<string>',
title: '<string>',
description: '<string>',
privacy: 'public',
tags: ['<string>'],
publish_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.recoupable.dev/api/posts', 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.recoupable.dev/api/posts",
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([
'video_url' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sub_account_id' => '<string>',
'cover_url' => '<string>',
'title' => '<string>',
'description' => '<string>',
'privacy' => 'public',
'tags' => [
'<string>'
],
'publish_at' => '2023-11-07T05:31:56Z'
]),
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.recoupable.dev/api/posts"
payload := strings.NewReader("{\n \"video_url\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_account_id\": \"<string>\",\n \"cover_url\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"privacy\": \"public\",\n \"tags\": [\n \"<string>\"\n ],\n \"publish_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.recoupable.dev/api/posts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_account_id\": \"<string>\",\n \"cover_url\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"privacy\": \"public\",\n \"tags\": [\n \"<string>\"\n ],\n \"publish_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sub_account_id\": \"<string>\",\n \"cover_url\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"privacy\": \"public\",\n \"tags\": [\n \"<string>\"\n ],\n \"publish_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled"
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}{
"status": "error",
"error": "<string>",
"missing_fields": [
"<string>"
]
}Authorizations
Your Recoup API key. Learn more.
Body
One post to one connected account. Copy uses the same fields for every platform; see the operation description for which fields each platform uses and their limits.
Target platform. The account must have this platform connected.
instagram, x, linkedin, youtube Publicly reachable URL of the video file (MP4). It is fetched at publish time, so it must still resolve then.
Optional. The account whose connection posts (e.g. an artist). The authenticated account must have access. Defaults to the calling account.
Optional, LinkedIn only. Organization URN to post as a Page (e.g. urn:li:organization:101127186) instead of as the connected member. The connected member must be an admin of that Page.
Optional. Publicly reachable image URL used as the cover or thumbnail where the platform supports one (see the table in the description).
Title. Required for youtube; see the table in the description.
Body text: caption, post text or description, depending on the platform. Required for instagram, x and linkedin.
Optional, YouTube only. Visibility after upload.
public, unlisted, private Optional, YouTube only. Video tags.
Optional. ISO 8601 time to publish, in the future. Omit to publish now.
Response
Post accepted: publishing now, or scheduled for publish_at.
The post's id and current status.
Was this page helpful?
