curl --request POST \
--url https://api.olie.ai/api/management/save-media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": 1,
"project_ids": [
"00000000-0000-0000-0000-000000000000"
],
"text": "Texto a ser enviado",
"file[0]": "<binary>",
"audio": "<binary>"
}
'import requests
url = "https://api.olie.ai/api/management/save-media"
payload = {
"type": 1,
"project_ids": ["00000000-0000-0000-0000-000000000000"],
"text": "Texto a ser enviado",
"file[0]": "<binary>",
"audio": "<binary>"
}
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({
type: 1,
project_ids: ['00000000-0000-0000-0000-000000000000'],
text: 'Texto a ser enviado',
'file[0]': '<binary>',
audio: '<binary>'
})
};
fetch('https://api.olie.ai/api/management/save-media', 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.olie.ai/api/management/save-media",
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([
'type' => 1,
'project_ids' => [
'00000000-0000-0000-0000-000000000000'
],
'text' => 'Texto a ser enviado',
'file[0]' => '<binary>',
'audio' => '<binary>'
]),
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.olie.ai/api/management/save-media"
payload := strings.NewReader("{\n \"type\": 1,\n \"project_ids\": [\n \"00000000-0000-0000-0000-000000000000\"\n ],\n \"text\": \"Texto a ser enviado\",\n \"file[0]\": \"<binary>\",\n \"audio\": \"<binary>\"\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.olie.ai/api/management/save-media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": 1,\n \"project_ids\": [\n \"00000000-0000-0000-0000-000000000000\"\n ],\n \"text\": \"Texto a ser enviado\",\n \"file[0]\": \"<binary>\",\n \"audio\": \"<binary>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/save-media")
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 \"type\": 1,\n \"project_ids\": [\n \"00000000-0000-0000-0000-000000000000\"\n ],\n \"text\": \"Texto a ser enviado\",\n \"file[0]\": \"<binary>\",\n \"audio\": \"<binary>\"\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"medias": [
{
"user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"type": 1,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"project_id": "019bbcd3-2249-7357-ac43-8ab6209ec54c",
"name": "description.4fea17cab04852a3b32d401766a84d5e",
"technical_name": "description.4fea17cab04852a3b32d401766a84d5e",
"text": "Cada porta pode ser uma porta para outro mundo.",
"id": "019bc309-175d-7211-9524-29646278c39f",
"updated_at": "2026-01-15T19:01:51.000000Z",
"created_at": "2026-01-15T19:01:51.000000Z",
"user": {
"id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"old_id": null,
"name": "Test User",
"description": "Nostrum debitis pariatur dolorum sapiente.",
"email": "[email protected]",
"avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero",
"status": 1,
"lang": "en",
"email_verified_at": "2025-12-18 14:55:28"
}
},
{
"user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"type": 1,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"project_id": "019bc2c3-5404-707f-be4d-9690f6bb8179",
"name": "description.4fea17cab04852a3b32d401766a84d5e",
"technical_name": "description.4fea17cab04852a3b32d401766a84d5e",
"text": "Cada porta pode ser uma porta para outro mundo.",
"id": "019bc309-1777-71e5-98c3-bff91d787182",
"updated_at": "2026-01-15T19:01:51.000000Z",
"created_at": "2026-01-15T19:01:51.000000Z",
"user": {
"id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"old_id": null,
"name": "Test User",
"description": "Nostrum debitis pariatur dolorum sapiente.",
"email": "[email protected]",
"avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero",
"status": 1,
"lang": "en",
"email_verified_at": "2025-12-18 14:55:28"
}
}
]
}{
"response": true,
"media": {
"user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"type": 1,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"project_id": "019bbcd3-2249-7357-ac43-8ab6209ec54c",
"name": "description.46767bcea2ed5b93a9e55717177d08f0",
"technical_name": "description.46767bcea2ed5b93a9e55717177d08f0",
"text": "Amigos não mentem",
"id": "019bc2e1-e52e-72f5-a30c-f2a6c563188c",
"updated_at": "2026-01-15T18:19:02.000000Z",
"created_at": "2026-01-15T18:19:02.000000Z",
"user": {
"id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"old_id": null,
"name": "Test User",
"description": "Nostrum debitis pariatur dolorum sapiente.",
"email": "[email protected]",
"avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero",
"status": 1,
"lang": "en",
"email_verified_at": "2025-12-18 14:55:28"
}
}
}{
"response": false,
"message": "validation_errors",
"error": "The texto field is required when type is 1.",
"validation": {
"text": [
"The texto field is required when type is 1."
]
}
}Enviar um conteúdo no projeto
Salvar/enviar diferentes tipos de conteúdo (texto, áudio ou arquivo) em um ou múltiplos projetos.
Tipo 1 - Descrição
- text (string, obrigatório): Conteúdo de texto. Menções não são suportadas via API
Tipo 2 - Áudio
- audio (file, obrigatório): Arquivo de áudio (multipart/form-data)
Tipo 3 - Arquivo
-
file (array, obrigatório): Array de arquivos (multipart/form-data)
-
text (string, opcional): Texto descritivo
Observações
-
Projetos merged não podem receber novas mídias
-
Múltiplos arquivos geram múltiplas entradas de mídia
-
Menções em descrições processam notificações automaticamente
-
Quando múltiplas mídias são criadas, o retorno usa
medias(array) ao invés demedia(objeto).
curl --request POST \
--url https://api.olie.ai/api/management/save-media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": 1,
"project_ids": [
"00000000-0000-0000-0000-000000000000"
],
"text": "Texto a ser enviado",
"file[0]": "<binary>",
"audio": "<binary>"
}
'import requests
url = "https://api.olie.ai/api/management/save-media"
payload = {
"type": 1,
"project_ids": ["00000000-0000-0000-0000-000000000000"],
"text": "Texto a ser enviado",
"file[0]": "<binary>",
"audio": "<binary>"
}
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({
type: 1,
project_ids: ['00000000-0000-0000-0000-000000000000'],
text: 'Texto a ser enviado',
'file[0]': '<binary>',
audio: '<binary>'
})
};
fetch('https://api.olie.ai/api/management/save-media', 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.olie.ai/api/management/save-media",
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([
'type' => 1,
'project_ids' => [
'00000000-0000-0000-0000-000000000000'
],
'text' => 'Texto a ser enviado',
'file[0]' => '<binary>',
'audio' => '<binary>'
]),
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.olie.ai/api/management/save-media"
payload := strings.NewReader("{\n \"type\": 1,\n \"project_ids\": [\n \"00000000-0000-0000-0000-000000000000\"\n ],\n \"text\": \"Texto a ser enviado\",\n \"file[0]\": \"<binary>\",\n \"audio\": \"<binary>\"\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.olie.ai/api/management/save-media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": 1,\n \"project_ids\": [\n \"00000000-0000-0000-0000-000000000000\"\n ],\n \"text\": \"Texto a ser enviado\",\n \"file[0]\": \"<binary>\",\n \"audio\": \"<binary>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/save-media")
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 \"type\": 1,\n \"project_ids\": [\n \"00000000-0000-0000-0000-000000000000\"\n ],\n \"text\": \"Texto a ser enviado\",\n \"file[0]\": \"<binary>\",\n \"audio\": \"<binary>\"\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"medias": [
{
"user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"type": 1,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"project_id": "019bbcd3-2249-7357-ac43-8ab6209ec54c",
"name": "description.4fea17cab04852a3b32d401766a84d5e",
"technical_name": "description.4fea17cab04852a3b32d401766a84d5e",
"text": "Cada porta pode ser uma porta para outro mundo.",
"id": "019bc309-175d-7211-9524-29646278c39f",
"updated_at": "2026-01-15T19:01:51.000000Z",
"created_at": "2026-01-15T19:01:51.000000Z",
"user": {
"id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"old_id": null,
"name": "Test User",
"description": "Nostrum debitis pariatur dolorum sapiente.",
"email": "[email protected]",
"avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero",
"status": 1,
"lang": "en",
"email_verified_at": "2025-12-18 14:55:28"
}
},
{
"user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"type": 1,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"project_id": "019bc2c3-5404-707f-be4d-9690f6bb8179",
"name": "description.4fea17cab04852a3b32d401766a84d5e",
"technical_name": "description.4fea17cab04852a3b32d401766a84d5e",
"text": "Cada porta pode ser uma porta para outro mundo.",
"id": "019bc309-1777-71e5-98c3-bff91d787182",
"updated_at": "2026-01-15T19:01:51.000000Z",
"created_at": "2026-01-15T19:01:51.000000Z",
"user": {
"id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"old_id": null,
"name": "Test User",
"description": "Nostrum debitis pariatur dolorum sapiente.",
"email": "[email protected]",
"avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero",
"status": 1,
"lang": "en",
"email_verified_at": "2025-12-18 14:55:28"
}
}
]
}{
"response": true,
"media": {
"user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"type": 1,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"project_id": "019bbcd3-2249-7357-ac43-8ab6209ec54c",
"name": "description.46767bcea2ed5b93a9e55717177d08f0",
"technical_name": "description.46767bcea2ed5b93a9e55717177d08f0",
"text": "Amigos não mentem",
"id": "019bc2e1-e52e-72f5-a30c-f2a6c563188c",
"updated_at": "2026-01-15T18:19:02.000000Z",
"created_at": "2026-01-15T18:19:02.000000Z",
"user": {
"id": "019b329a-3f1f-7198-89e5-008dc4e2bd60",
"old_id": null,
"name": "Test User",
"description": "Nostrum debitis pariatur dolorum sapiente.",
"email": "[email protected]",
"avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero",
"status": 1,
"lang": "en",
"email_verified_at": "2025-12-18 14:55:28"
}
}
}{
"response": false,
"message": "validation_errors",
"error": "The texto field is required when type is 1.",
"validation": {
"text": [
"The texto field is required when type is 1."
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
O tipo do conteúdo. Valores possíveis: 1 (Texto), 2 (Arquivo), 3 (Áudio).
1, 2, 3 IDs dos projetos (UUIDs) onde você deseja enviar o conteúdo.
Texto do conteúdo. Obrigatório se 'type' for 1 (Texto).
50000Arquivos. Obrigatório se 'type' for 2 (Arquivo). O nome do campo deve seguir o padrão 'file[0]', 'file[1]' ou 'file[2]', dependendo da quantidade de arquivos enviados.
Arquivo de áudio. Obrigatório se 'type' for 3 (Áudio).
Was this page helpful?