media
Create company media
Create a new media item for the company
POST
/
api
/
company
/
media
Create company media
curl --request POST \
--url https://api.fluid.app/api/company/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"medium": {
"title": "<string>",
"language": "<string>",
"media_type": "<string>",
"description": "<string>",
"video_url": "<string>",
"available_countries": [
"<string>"
],
"tags_attributes": [
{
"name": "<string>"
}
],
"label": {
"title": "<string>"
},
"category": "<string>",
"cta_enabled": true,
"cta_action_type": "<string>",
"cta_button_text": "<string>",
"cta_url": "<string>",
"display_shop": true,
"video_shopping_enabled": true,
"attached_shareables_attributes": [
{
"attachment_type": "<string>",
"timestamp": "<string>",
"attachment_id": 123
}
],
"subtitles": [
{
"lang": "<string>",
"src": "<string>"
}
],
"prompts_attributes": [
{
"title": "<string>",
"content": "<string>"
}
]
}
}
'import requests
url = "https://api.fluid.app/api/company/media"
payload = { "medium": {
"title": "<string>",
"language": "<string>",
"media_type": "<string>",
"description": "<string>",
"video_url": "<string>",
"available_countries": ["<string>"],
"tags_attributes": [{ "name": "<string>" }],
"label": { "title": "<string>" },
"category": "<string>",
"cta_enabled": True,
"cta_action_type": "<string>",
"cta_button_text": "<string>",
"cta_url": "<string>",
"display_shop": True,
"video_shopping_enabled": True,
"attached_shareables_attributes": [
{
"attachment_type": "<string>",
"timestamp": "<string>",
"attachment_id": 123
}
],
"subtitles": [
{
"lang": "<string>",
"src": "<string>"
}
],
"prompts_attributes": [
{
"title": "<string>",
"content": "<string>"
}
]
} }
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({
medium: {
title: '<string>',
language: '<string>',
media_type: '<string>',
description: '<string>',
video_url: '<string>',
available_countries: ['<string>'],
tags_attributes: [{name: '<string>'}],
label: {title: '<string>'},
category: '<string>',
cta_enabled: true,
cta_action_type: '<string>',
cta_button_text: '<string>',
cta_url: '<string>',
display_shop: true,
video_shopping_enabled: true,
attached_shareables_attributes: [{attachment_type: '<string>', timestamp: '<string>', attachment_id: 123}],
subtitles: [{lang: '<string>', src: '<string>'}],
prompts_attributes: [{title: '<string>', content: '<string>'}]
}
})
};
fetch('https://api.fluid.app/api/company/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.fluid.app/api/company/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([
'medium' => [
'title' => '<string>',
'language' => '<string>',
'media_type' => '<string>',
'description' => '<string>',
'video_url' => '<string>',
'available_countries' => [
'<string>'
],
'tags_attributes' => [
[
'name' => '<string>'
]
],
'label' => [
'title' => '<string>'
],
'category' => '<string>',
'cta_enabled' => true,
'cta_action_type' => '<string>',
'cta_button_text' => '<string>',
'cta_url' => '<string>',
'display_shop' => true,
'video_shopping_enabled' => true,
'attached_shareables_attributes' => [
[
'attachment_type' => '<string>',
'timestamp' => '<string>',
'attachment_id' => 123
]
],
'subtitles' => [
[
'lang' => '<string>',
'src' => '<string>'
]
],
'prompts_attributes' => [
[
'title' => '<string>',
'content' => '<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://api.fluid.app/api/company/media"
payload := strings.NewReader("{\n \"medium\": {\n \"title\": \"<string>\",\n \"language\": \"<string>\",\n \"media_type\": \"<string>\",\n \"description\": \"<string>\",\n \"video_url\": \"<string>\",\n \"available_countries\": [\n \"<string>\"\n ],\n \"tags_attributes\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"label\": {\n \"title\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"cta_enabled\": true,\n \"cta_action_type\": \"<string>\",\n \"cta_button_text\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"display_shop\": true,\n \"video_shopping_enabled\": true,\n \"attached_shareables_attributes\": [\n {\n \"attachment_type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"attachment_id\": 123\n }\n ],\n \"subtitles\": [\n {\n \"lang\": \"<string>\",\n \"src\": \"<string>\"\n }\n ],\n \"prompts_attributes\": [\n {\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\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.fluid.app/api/company/media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"medium\": {\n \"title\": \"<string>\",\n \"language\": \"<string>\",\n \"media_type\": \"<string>\",\n \"description\": \"<string>\",\n \"video_url\": \"<string>\",\n \"available_countries\": [\n \"<string>\"\n ],\n \"tags_attributes\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"label\": {\n \"title\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"cta_enabled\": true,\n \"cta_action_type\": \"<string>\",\n \"cta_button_text\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"display_shop\": true,\n \"video_shopping_enabled\": true,\n \"attached_shareables_attributes\": [\n {\n \"attachment_type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"attachment_id\": 123\n }\n ],\n \"subtitles\": [\n {\n \"lang\": \"<string>\",\n \"src\": \"<string>\"\n }\n ],\n \"prompts_attributes\": [\n {\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/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 \"medium\": {\n \"title\": \"<string>\",\n \"language\": \"<string>\",\n \"media_type\": \"<string>\",\n \"description\": \"<string>\",\n \"video_url\": \"<string>\",\n \"available_countries\": [\n \"<string>\"\n ],\n \"tags_attributes\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"label\": {\n \"title\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"cta_enabled\": true,\n \"cta_action_type\": \"<string>\",\n \"cta_button_text\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"display_shop\": true,\n \"video_shopping_enabled\": true,\n \"attached_shareables_attributes\": [\n {\n \"attachment_type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"attachment_id\": 123\n }\n ],\n \"subtitles\": [\n {\n \"lang\": \"<string>\",\n \"src\": \"<string>\"\n }\n ],\n \"prompts_attributes\": [\n {\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"medium": {
"id": 123,
"user_id": 123,
"title": "<string>",
"description": {},
"stripped": "<string>",
"media_type": "<string>",
"media_format": "<string>",
"image_url": "<string>",
"video_url": "<string>",
"pdf_url": "<string>",
"kind": "<string>",
"active": true,
"visibility": 123,
"share_link": "<string>",
"preview_link": "<string>",
"views": 123,
"leads": 123,
"watch": {},
"video_status": "<string>",
"duration": 123,
"cta_url": "<string>",
"cta_button_text": "<string>",
"cta_enabled": true,
"cta_action_type": "<string>",
"video_shopping_enabled": true,
"prompts_enabled": true,
"ranks": [
"<string>"
],
"settings": {},
"application_theme_template_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"subtitles": {},
"countries": [
{
"id": 123,
"iso": "<string>",
"name": "<string>"
}
],
"tags": [
{
"id": 123,
"name": "<string>"
}
],
"slug": "<string>",
"canonical_url": "<string>",
"custom_slug": true,
"prompts": [
{}
],
"attached_shareables": [
{}
],
"comments": [
{}
],
"label": {},
"display_tag": "<string>",
"publish_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}Authorizations
Bearer token authentication
Body
application/json
Show child attributes
Show child attributes
⌘I
Create company media
curl --request POST \
--url https://api.fluid.app/api/company/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"medium": {
"title": "<string>",
"language": "<string>",
"media_type": "<string>",
"description": "<string>",
"video_url": "<string>",
"available_countries": [
"<string>"
],
"tags_attributes": [
{
"name": "<string>"
}
],
"label": {
"title": "<string>"
},
"category": "<string>",
"cta_enabled": true,
"cta_action_type": "<string>",
"cta_button_text": "<string>",
"cta_url": "<string>",
"display_shop": true,
"video_shopping_enabled": true,
"attached_shareables_attributes": [
{
"attachment_type": "<string>",
"timestamp": "<string>",
"attachment_id": 123
}
],
"subtitles": [
{
"lang": "<string>",
"src": "<string>"
}
],
"prompts_attributes": [
{
"title": "<string>",
"content": "<string>"
}
]
}
}
'import requests
url = "https://api.fluid.app/api/company/media"
payload = { "medium": {
"title": "<string>",
"language": "<string>",
"media_type": "<string>",
"description": "<string>",
"video_url": "<string>",
"available_countries": ["<string>"],
"tags_attributes": [{ "name": "<string>" }],
"label": { "title": "<string>" },
"category": "<string>",
"cta_enabled": True,
"cta_action_type": "<string>",
"cta_button_text": "<string>",
"cta_url": "<string>",
"display_shop": True,
"video_shopping_enabled": True,
"attached_shareables_attributes": [
{
"attachment_type": "<string>",
"timestamp": "<string>",
"attachment_id": 123
}
],
"subtitles": [
{
"lang": "<string>",
"src": "<string>"
}
],
"prompts_attributes": [
{
"title": "<string>",
"content": "<string>"
}
]
} }
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({
medium: {
title: '<string>',
language: '<string>',
media_type: '<string>',
description: '<string>',
video_url: '<string>',
available_countries: ['<string>'],
tags_attributes: [{name: '<string>'}],
label: {title: '<string>'},
category: '<string>',
cta_enabled: true,
cta_action_type: '<string>',
cta_button_text: '<string>',
cta_url: '<string>',
display_shop: true,
video_shopping_enabled: true,
attached_shareables_attributes: [{attachment_type: '<string>', timestamp: '<string>', attachment_id: 123}],
subtitles: [{lang: '<string>', src: '<string>'}],
prompts_attributes: [{title: '<string>', content: '<string>'}]
}
})
};
fetch('https://api.fluid.app/api/company/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.fluid.app/api/company/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([
'medium' => [
'title' => '<string>',
'language' => '<string>',
'media_type' => '<string>',
'description' => '<string>',
'video_url' => '<string>',
'available_countries' => [
'<string>'
],
'tags_attributes' => [
[
'name' => '<string>'
]
],
'label' => [
'title' => '<string>'
],
'category' => '<string>',
'cta_enabled' => true,
'cta_action_type' => '<string>',
'cta_button_text' => '<string>',
'cta_url' => '<string>',
'display_shop' => true,
'video_shopping_enabled' => true,
'attached_shareables_attributes' => [
[
'attachment_type' => '<string>',
'timestamp' => '<string>',
'attachment_id' => 123
]
],
'subtitles' => [
[
'lang' => '<string>',
'src' => '<string>'
]
],
'prompts_attributes' => [
[
'title' => '<string>',
'content' => '<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://api.fluid.app/api/company/media"
payload := strings.NewReader("{\n \"medium\": {\n \"title\": \"<string>\",\n \"language\": \"<string>\",\n \"media_type\": \"<string>\",\n \"description\": \"<string>\",\n \"video_url\": \"<string>\",\n \"available_countries\": [\n \"<string>\"\n ],\n \"tags_attributes\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"label\": {\n \"title\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"cta_enabled\": true,\n \"cta_action_type\": \"<string>\",\n \"cta_button_text\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"display_shop\": true,\n \"video_shopping_enabled\": true,\n \"attached_shareables_attributes\": [\n {\n \"attachment_type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"attachment_id\": 123\n }\n ],\n \"subtitles\": [\n {\n \"lang\": \"<string>\",\n \"src\": \"<string>\"\n }\n ],\n \"prompts_attributes\": [\n {\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\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.fluid.app/api/company/media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"medium\": {\n \"title\": \"<string>\",\n \"language\": \"<string>\",\n \"media_type\": \"<string>\",\n \"description\": \"<string>\",\n \"video_url\": \"<string>\",\n \"available_countries\": [\n \"<string>\"\n ],\n \"tags_attributes\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"label\": {\n \"title\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"cta_enabled\": true,\n \"cta_action_type\": \"<string>\",\n \"cta_button_text\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"display_shop\": true,\n \"video_shopping_enabled\": true,\n \"attached_shareables_attributes\": [\n {\n \"attachment_type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"attachment_id\": 123\n }\n ],\n \"subtitles\": [\n {\n \"lang\": \"<string>\",\n \"src\": \"<string>\"\n }\n ],\n \"prompts_attributes\": [\n {\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/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 \"medium\": {\n \"title\": \"<string>\",\n \"language\": \"<string>\",\n \"media_type\": \"<string>\",\n \"description\": \"<string>\",\n \"video_url\": \"<string>\",\n \"available_countries\": [\n \"<string>\"\n ],\n \"tags_attributes\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"label\": {\n \"title\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"cta_enabled\": true,\n \"cta_action_type\": \"<string>\",\n \"cta_button_text\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"display_shop\": true,\n \"video_shopping_enabled\": true,\n \"attached_shareables_attributes\": [\n {\n \"attachment_type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"attachment_id\": 123\n }\n ],\n \"subtitles\": [\n {\n \"lang\": \"<string>\",\n \"src\": \"<string>\"\n }\n ],\n \"prompts_attributes\": [\n {\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"medium": {
"id": 123,
"user_id": 123,
"title": "<string>",
"description": {},
"stripped": "<string>",
"media_type": "<string>",
"media_format": "<string>",
"image_url": "<string>",
"video_url": "<string>",
"pdf_url": "<string>",
"kind": "<string>",
"active": true,
"visibility": 123,
"share_link": "<string>",
"preview_link": "<string>",
"views": 123,
"leads": 123,
"watch": {},
"video_status": "<string>",
"duration": 123,
"cta_url": "<string>",
"cta_button_text": "<string>",
"cta_enabled": true,
"cta_action_type": "<string>",
"video_shopping_enabled": true,
"prompts_enabled": true,
"ranks": [
"<string>"
],
"settings": {},
"application_theme_template_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"subtitles": {},
"countries": [
{
"id": 123,
"iso": "<string>",
"name": "<string>"
}
],
"tags": [
{
"id": 123,
"name": "<string>"
}
],
"slug": "<string>",
"canonical_url": "<string>",
"custom_slug": true,
"prompts": [
{}
],
"attached_shareables": [
{}
],
"comments": [
{}
],
"label": {},
"display_tag": "<string>",
"publish_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}