Theme resources and files
Creates multiple file resources
Creates several files in one transaction; if any file fails, none are created (422). Each entry accepts the same source fields as creating a single file (content, file, or url with its metadata). Requires the file_resources update permission.
POST
/
api
/
file_resources
/
bulk_create
Creates multiple file resources
curl --request POST \
--url https://api.fluid.app/api/file_resources/bulk_create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_resources": [
{
"url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg",
"filename": "scranton-hero.jpg",
"content_type": "image/jpeg",
"content_size": 482113,
"alt_text": "Dunder Mifflin Scranton branch storefront",
"relateable_type": "ApplicationTheme",
"relateable_id": 7310
},
{
"filename": "brand.css",
"content": ":root { --dm-blue: #1f4e79; }",
"content_type": "text/css"
}
]
}
'import requests
url = "https://api.fluid.app/api/file_resources/bulk_create"
payload = { "file_resources": [
{
"url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg",
"filename": "scranton-hero.jpg",
"content_type": "image/jpeg",
"content_size": 482113,
"alt_text": "Dunder Mifflin Scranton branch storefront",
"relateable_type": "ApplicationTheme",
"relateable_id": 7310
},
{
"filename": "brand.css",
"content": ":root { --dm-blue: #1f4e79; }",
"content_type": "text/css"
}
] }
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({
file_resources: [
{
url: 'https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg',
filename: 'scranton-hero.jpg',
content_type: 'image/jpeg',
content_size: 482113,
alt_text: 'Dunder Mifflin Scranton branch storefront',
relateable_type: 'ApplicationTheme',
relateable_id: 7310
},
{
filename: 'brand.css',
content: ':root { --dm-blue: #1f4e79; }',
content_type: 'text/css'
}
]
})
};
fetch('https://api.fluid.app/api/file_resources/bulk_create', 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/file_resources/bulk_create",
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([
'file_resources' => [
[
'url' => 'https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg',
'filename' => 'scranton-hero.jpg',
'content_type' => 'image/jpeg',
'content_size' => 482113,
'alt_text' => 'Dunder Mifflin Scranton branch storefront',
'relateable_type' => 'ApplicationTheme',
'relateable_id' => 7310
],
[
'filename' => 'brand.css',
'content' => ':root { --dm-blue: #1f4e79; }',
'content_type' => 'text/css'
]
]
]),
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/file_resources/bulk_create"
payload := strings.NewReader("{\n \"file_resources\": [\n {\n \"url\": \"https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg\",\n \"filename\": \"scranton-hero.jpg\",\n \"content_type\": \"image/jpeg\",\n \"content_size\": 482113,\n \"alt_text\": \"Dunder Mifflin Scranton branch storefront\",\n \"relateable_type\": \"ApplicationTheme\",\n \"relateable_id\": 7310\n },\n {\n \"filename\": \"brand.css\",\n \"content\": \":root { --dm-blue: #1f4e79; }\",\n \"content_type\": \"text/css\"\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/file_resources/bulk_create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_resources\": [\n {\n \"url\": \"https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg\",\n \"filename\": \"scranton-hero.jpg\",\n \"content_type\": \"image/jpeg\",\n \"content_size\": 482113,\n \"alt_text\": \"Dunder Mifflin Scranton branch storefront\",\n \"relateable_type\": \"ApplicationTheme\",\n \"relateable_id\": 7310\n },\n {\n \"filename\": \"brand.css\",\n \"content\": \":root { --dm-blue: #1f4e79; }\",\n \"content_type\": \"text/css\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/file_resources/bulk_create")
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 \"file_resources\": [\n {\n \"url\": \"https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg\",\n \"filename\": \"scranton-hero.jpg\",\n \"content_type\": \"image/jpeg\",\n \"content_size\": 482113,\n \"alt_text\": \"Dunder Mifflin Scranton branch storefront\",\n \"relateable_type\": \"ApplicationTheme\",\n \"relateable_id\": 7310\n },\n {\n \"filename\": \"brand.css\",\n \"content\": \":root { --dm-blue: #1f4e79; }\",\n \"content_type\": \"text/css\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"file_resources": [
{
"id": 88214,
"url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg",
"preview_image_url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero-preview.jpg",
"alt_text": "Dunder Mifflin Scranton branch storefront",
"handle": "scranton-hero",
"content_type": "image/jpeg",
"content_size": 482113,
"content": null,
"relateable_id": 7310,
"relateable_type": "ApplicationTheme",
"metadata": {},
"created_at": "2026-09-08T14:22:31Z",
"updated_at": "2026-09-08T14:22:31Z",
"filename": "scranton-hero.jpg",
"version": "1",
"non_binary": false,
"dam_ready": true,
"dam_processing_status": "ready",
"dam_tags": [
"web"
],
"dam_upload_queued": false
},
{
"id": 88215,
"url": "https://dunder-mifflin.fluid.app/assets/public.application_themes.7310/brand.css",
"preview_image_url": null,
"alt_text": null,
"handle": "brand-css",
"content_type": "text/css",
"content_size": 31,
"content": ":root { --dm-blue: #1f4e79; }",
"relateable_id": null,
"relateable_type": null,
"metadata": {},
"created_at": "2026-09-21T16:05:47Z",
"updated_at": "2026-09-21T16:05:47Z",
"filename": "brand.css",
"version": "1",
"non_binary": true,
"dam_ready": true,
"dam_processing_status": "ready",
"dam_tags": [],
"dam_upload_queued": false
}
],
"meta": {
"request_id": "4f1c2a9e-7b3d-4e8a-9c61-2d5f8a0b3e17",
"timestamp": "2026-09-22T15:04:12Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Body
application/json
Request payload
Show child attributes
Show child attributes
⌘I
Creates multiple file resources
curl --request POST \
--url https://api.fluid.app/api/file_resources/bulk_create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_resources": [
{
"url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg",
"filename": "scranton-hero.jpg",
"content_type": "image/jpeg",
"content_size": 482113,
"alt_text": "Dunder Mifflin Scranton branch storefront",
"relateable_type": "ApplicationTheme",
"relateable_id": 7310
},
{
"filename": "brand.css",
"content": ":root { --dm-blue: #1f4e79; }",
"content_type": "text/css"
}
]
}
'import requests
url = "https://api.fluid.app/api/file_resources/bulk_create"
payload = { "file_resources": [
{
"url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg",
"filename": "scranton-hero.jpg",
"content_type": "image/jpeg",
"content_size": 482113,
"alt_text": "Dunder Mifflin Scranton branch storefront",
"relateable_type": "ApplicationTheme",
"relateable_id": 7310
},
{
"filename": "brand.css",
"content": ":root { --dm-blue: #1f4e79; }",
"content_type": "text/css"
}
] }
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({
file_resources: [
{
url: 'https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg',
filename: 'scranton-hero.jpg',
content_type: 'image/jpeg',
content_size: 482113,
alt_text: 'Dunder Mifflin Scranton branch storefront',
relateable_type: 'ApplicationTheme',
relateable_id: 7310
},
{
filename: 'brand.css',
content: ':root { --dm-blue: #1f4e79; }',
content_type: 'text/css'
}
]
})
};
fetch('https://api.fluid.app/api/file_resources/bulk_create', 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/file_resources/bulk_create",
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([
'file_resources' => [
[
'url' => 'https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg',
'filename' => 'scranton-hero.jpg',
'content_type' => 'image/jpeg',
'content_size' => 482113,
'alt_text' => 'Dunder Mifflin Scranton branch storefront',
'relateable_type' => 'ApplicationTheme',
'relateable_id' => 7310
],
[
'filename' => 'brand.css',
'content' => ':root { --dm-blue: #1f4e79; }',
'content_type' => 'text/css'
]
]
]),
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/file_resources/bulk_create"
payload := strings.NewReader("{\n \"file_resources\": [\n {\n \"url\": \"https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg\",\n \"filename\": \"scranton-hero.jpg\",\n \"content_type\": \"image/jpeg\",\n \"content_size\": 482113,\n \"alt_text\": \"Dunder Mifflin Scranton branch storefront\",\n \"relateable_type\": \"ApplicationTheme\",\n \"relateable_id\": 7310\n },\n {\n \"filename\": \"brand.css\",\n \"content\": \":root { --dm-blue: #1f4e79; }\",\n \"content_type\": \"text/css\"\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/file_resources/bulk_create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_resources\": [\n {\n \"url\": \"https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg\",\n \"filename\": \"scranton-hero.jpg\",\n \"content_type\": \"image/jpeg\",\n \"content_size\": 482113,\n \"alt_text\": \"Dunder Mifflin Scranton branch storefront\",\n \"relateable_type\": \"ApplicationTheme\",\n \"relateable_id\": 7310\n },\n {\n \"filename\": \"brand.css\",\n \"content\": \":root { --dm-blue: #1f4e79; }\",\n \"content_type\": \"text/css\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/file_resources/bulk_create")
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 \"file_resources\": [\n {\n \"url\": \"https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg\",\n \"filename\": \"scranton-hero.jpg\",\n \"content_type\": \"image/jpeg\",\n \"content_size\": 482113,\n \"alt_text\": \"Dunder Mifflin Scranton branch storefront\",\n \"relateable_type\": \"ApplicationTheme\",\n \"relateable_id\": 7310\n },\n {\n \"filename\": \"brand.css\",\n \"content\": \":root { --dm-blue: #1f4e79; }\",\n \"content_type\": \"text/css\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"file_resources": [
{
"id": 88214,
"url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero.jpg",
"preview_image_url": "https://cdn.fluid.app/dunder-mifflin/assets/scranton-hero-preview.jpg",
"alt_text": "Dunder Mifflin Scranton branch storefront",
"handle": "scranton-hero",
"content_type": "image/jpeg",
"content_size": 482113,
"content": null,
"relateable_id": 7310,
"relateable_type": "ApplicationTheme",
"metadata": {},
"created_at": "2026-09-08T14:22:31Z",
"updated_at": "2026-09-08T14:22:31Z",
"filename": "scranton-hero.jpg",
"version": "1",
"non_binary": false,
"dam_ready": true,
"dam_processing_status": "ready",
"dam_tags": [
"web"
],
"dam_upload_queued": false
},
{
"id": 88215,
"url": "https://dunder-mifflin.fluid.app/assets/public.application_themes.7310/brand.css",
"preview_image_url": null,
"alt_text": null,
"handle": "brand-css",
"content_type": "text/css",
"content_size": 31,
"content": ":root { --dm-blue: #1f4e79; }",
"relateable_id": null,
"relateable_type": null,
"metadata": {},
"created_at": "2026-09-21T16:05:47Z",
"updated_at": "2026-09-21T16:05:47Z",
"filename": "brand.css",
"version": "1",
"non_binary": true,
"dam_ready": true,
"dam_processing_status": "ready",
"dam_tags": [],
"dam_upload_queued": false
}
],
"meta": {
"request_id": "4f1c2a9e-7b3d-4e8a-9c61-2d5f8a0b3e17",
"timestamp": "2026-09-22T15:04:12Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}