Create Content
curl --request POST \
--url https://api.proposales.com/v3/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": 123,
"language": "<string>",
"title": "<string>",
"description": "<string>",
"images": [
{}
]
}
'import requests
url = "https://api.proposales.com/v3/content"
payload = {
"company_id": 123,
"language": "<string>",
"title": "<string>",
"description": "<string>",
"images": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_id: 123,
language: '<string>',
title: '<string>',
description: '<string>',
images: [{}]
})
};
fetch('https://api.proposales.com/v3/content', 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.proposales.com/v3/content",
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([
'company_id' => 123,
'language' => '<string>',
'title' => '<string>',
'description' => '<string>',
'images' => [
[
]
]
]),
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.proposales.com/v3/content"
payload := strings.NewReader("{\n \"company_id\": 123,\n \"language\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.proposales.com/v3/content")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": 123,\n \"language\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proposales.com/v3/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_id\": 123,\n \"language\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"product_id": 123,
"variation_id": 123,
"message": "<string>"
}
}Content
Create Content
Create a new content item in the library.
POST
/
v3
/
content
Create Content
curl --request POST \
--url https://api.proposales.com/v3/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": 123,
"language": "<string>",
"title": "<string>",
"description": "<string>",
"images": [
{}
]
}
'import requests
url = "https://api.proposales.com/v3/content"
payload = {
"company_id": 123,
"language": "<string>",
"title": "<string>",
"description": "<string>",
"images": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_id: 123,
language: '<string>',
title: '<string>',
description: '<string>',
images: [{}]
})
};
fetch('https://api.proposales.com/v3/content', 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.proposales.com/v3/content",
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([
'company_id' => 123,
'language' => '<string>',
'title' => '<string>',
'description' => '<string>',
'images' => [
[
]
]
]),
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.proposales.com/v3/content"
payload := strings.NewReader("{\n \"company_id\": 123,\n \"language\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.proposales.com/v3/content")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": 123,\n \"language\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proposales.com/v3/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_id\": 123,\n \"language\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"product_id": 123,
"variation_id": 123,
"message": "<string>"
}
}Body
The ID of the Proposales company that the content should belong to.
A two-letter ISO 3166-1 alpha-2 language code indicating the language of the content.
The title of the content in the specified language.
The description of the content in the specified language.
A list of images to be added to the content. You have two options for providing images:Example with Uploadcare UUID:Example with URL:Note:
- Using Uploadcare UUID: Upload images to Uploadcare first and provide the UUID
- Using URL: Provide a publicly accessible image URL with an empty
uuidstring. The system will automatically download and upload the image to Uploadcare.
{
uuid: string; // UUID from Uploadcare, or empty string "" when using url
filename?: string;
mime_type?: string;
url?: string; // Public image URL (used when uuid is empty)
size?: number;
height?: number;
width?: number;
}[]
{
"uuid": "9a7b8c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"filename": "product.jpg"
}
{
"uuid": "",
"url": "https://example.com/image.jpg"
}
- Images that fail to download from URL will be silently skipped.
- At least one valid image must be provided (either successful URL download or existing UUID).
Response
⌘I