Legacy (v0)
Create a favorite
Adds an item to your favorites. Favorites always belong to the membership of the token’s user in the current company; the {user_company_id} segment does not select another member. favoriteable_type must be a shareable type such as Product, Medium, Page, EnrollmentPack, Library, Promotion, Category, Collection, or Post. Returns 400 with validation errors when the type is not shareable or the item is already a favorite. Requires permission to update users.
POST
/
api
/
user_companies
/
{user_company_id}
/
favorites
Create a favorite
curl --request POST \
--url https://api.fluid.app/api/user_companies/{user_company_id}/favorites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"favorite": {
"favoriteable_type": "Product",
"favoriteable_id": 48213,
"order": 1
}
}
'import requests
url = "https://api.fluid.app/api/user_companies/{user_company_id}/favorites"
payload = { "favorite": {
"favoriteable_type": "Product",
"favoriteable_id": 48213,
"order": 1
} }
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({favorite: {favoriteable_type: 'Product', favoriteable_id: 48213, order: 1}})
};
fetch('https://api.fluid.app/api/user_companies/{user_company_id}/favorites', 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/user_companies/{user_company_id}/favorites",
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([
'favorite' => [
'favoriteable_type' => 'Product',
'favoriteable_id' => 48213,
'order' => 1
]
]),
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/user_companies/{user_company_id}/favorites"
payload := strings.NewReader("{\n \"favorite\": {\n \"favoriteable_type\": \"Product\",\n \"favoriteable_id\": 48213,\n \"order\": 1\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/user_companies/{user_company_id}/favorites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"favorite\": {\n \"favoriteable_type\": \"Product\",\n \"favoriteable_id\": 48213,\n \"order\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/user_companies/{user_company_id}/favorites")
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 \"favorite\": {\n \"favoriteable_type\": \"Product\",\n \"favoriteable_id\": 48213,\n \"order\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 7741,
"user_company_id": 48213,
"order": 1,
"created_at": "2026-09-18T16:20:04Z",
"favoriteable_type": "Product",
"favoriteable": {
"id": 48213,
"title": "Dunder Mifflin 20lb Copy Paper",
"slug": "20lb-copy-paper",
"sku": "DM-20LB-CASE",
"price": "54.99",
"image_url": "https://cdn.fluid.app/dunder-mifflin/products/20lb-copy-paper.jpg",
"active": true
}
}{
"message": "<string>"
}Response
Created
An item a member has pinned to the favorites on their personal site.
⌘I
Create a favorite
curl --request POST \
--url https://api.fluid.app/api/user_companies/{user_company_id}/favorites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"favorite": {
"favoriteable_type": "Product",
"favoriteable_id": 48213,
"order": 1
}
}
'import requests
url = "https://api.fluid.app/api/user_companies/{user_company_id}/favorites"
payload = { "favorite": {
"favoriteable_type": "Product",
"favoriteable_id": 48213,
"order": 1
} }
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({favorite: {favoriteable_type: 'Product', favoriteable_id: 48213, order: 1}})
};
fetch('https://api.fluid.app/api/user_companies/{user_company_id}/favorites', 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/user_companies/{user_company_id}/favorites",
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([
'favorite' => [
'favoriteable_type' => 'Product',
'favoriteable_id' => 48213,
'order' => 1
]
]),
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/user_companies/{user_company_id}/favorites"
payload := strings.NewReader("{\n \"favorite\": {\n \"favoriteable_type\": \"Product\",\n \"favoriteable_id\": 48213,\n \"order\": 1\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/user_companies/{user_company_id}/favorites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"favorite\": {\n \"favoriteable_type\": \"Product\",\n \"favoriteable_id\": 48213,\n \"order\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/user_companies/{user_company_id}/favorites")
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 \"favorite\": {\n \"favoriteable_type\": \"Product\",\n \"favoriteable_id\": 48213,\n \"order\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 7741,
"user_company_id": 48213,
"order": 1,
"created_at": "2026-09-18T16:20:04Z",
"favoriteable_type": "Product",
"favoriteable": {
"id": 48213,
"title": "Dunder Mifflin 20lb Copy Paper",
"slug": "20lb-copy-paper",
"sku": "DM-20LB-CASE",
"price": "54.99",
"image_url": "https://cdn.fluid.app/dunder-mifflin/products/20lb-copy-paper.jpg",
"active": true
}
}{
"message": "<string>"
}