Publish a widget recipe from one of the member's sites
Not released yet: every request answers 404 until Fluid turns on the widget library and recipes for the member’s company.
Publishes a recipe from a site the member owns, or, with widgetId, a new version of their own published recipe. Every publish is a new version that never changes. Before anything is stored, the files pass the publish checks (no URL to another host, no remote script, no eval-like code or framing element, every Fluid API call’s scope declared, the recipe folder’s layout and limits) and the secret scan. Each refusal names its code in details.error, with path, line and fix where there are any; a secret is named by its file, line and detector, never its value. These checks are a filter, not a sandbox.
visibility is people (chosen members, the author’s downline, or a segment by member type and country) or company. A version a company admin who may edit themes publishes is official at once. A recipe unpublished while a version is being published gets no new version.
Bearer only: the cookie mount refuses it with 403.
curl --request POST \
--url https://api.fluid.app/api/member/v2026-10/widgets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"siteId": "0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f",
"widgetId": "0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f",
"files": {
"recipe.json": {
"content": "{\"version\":1,\"name\":\"Event countdown with RSVP\",\"slug\":\"event_countdown\",\"purpose\":\"Counts down to one event and takes RSVPs from signed-in visitors\",\"whenToUse\":\"A page for one dated event\",\"behaviour\":\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\",\"states\":[{\"name\":\"counting\",\"description\":\"Before startsAt\"},{\"name\":\"started\",\"description\":\"After startsAt\"},{\"name\":\"rsvp_sent\",\"description\":\"This visitor has RSVPed\"}],\"props\":{\"eventName\":{\"type\":\"text\",\"required\":true,\"description\":\"The event's name\"},\"startsAt\":{\"type\":\"timestamp\",\"required\":true,\"description\":\"When it starts\"}},\"data\":{\"scopes\":[],\"delegated\":[],\"schema\":{\"version\":1,\"tables\":{\"rsvps\":{\"columns\":{\"guests\":{\"type\":\"integer\"}},\"rules\":{\"insert\":\"signed_in\",\"read\":\"owner\"},\"unique\":[[\"created_by\"]]}}}},\"cssProperties\":[{\"name\":\"--countdown-accent\",\"description\":\"Digit colour\"}]}"
},
"skeleton.html": {
"content": "<section class=\"countdown\"><p class=\"digits\"></p></section>"
},
"reference/plain.js": {
"content": "export default class Countdown extends HTMLElement {}"
},
"screenshots/1.png": {
"contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA="
}
},
"visibility": {
"kind": "company"
}
}
EOFimport requests
url = "https://api.fluid.app/api/member/v2026-10/widgets"
payload = {
"siteId": "0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f",
"widgetId": "0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f",
"files": {
"recipe.json": { "content": "{\"version\":1,\"name\":\"Event countdown with RSVP\",\"slug\":\"event_countdown\",\"purpose\":\"Counts down to one event and takes RSVPs from signed-in visitors\",\"whenToUse\":\"A page for one dated event\",\"behaviour\":\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\",\"states\":[{\"name\":\"counting\",\"description\":\"Before startsAt\"},{\"name\":\"started\",\"description\":\"After startsAt\"},{\"name\":\"rsvp_sent\",\"description\":\"This visitor has RSVPed\"}],\"props\":{\"eventName\":{\"type\":\"text\",\"required\":true,\"description\":\"The event's name\"},\"startsAt\":{\"type\":\"timestamp\",\"required\":true,\"description\":\"When it starts\"}},\"data\":{\"scopes\":[],\"delegated\":[],\"schema\":{\"version\":1,\"tables\":{\"rsvps\":{\"columns\":{\"guests\":{\"type\":\"integer\"}},\"rules\":{\"insert\":\"signed_in\",\"read\":\"owner\"},\"unique\":[[\"created_by\"]]}}}},\"cssProperties\":[{\"name\":\"--countdown-accent\",\"description\":\"Digit colour\"}]}" },
"skeleton.html": { "content": "<section class=\"countdown\"><p class=\"digits\"></p></section>" },
"reference/plain.js": { "content": "export default class Countdown extends HTMLElement {}" },
"screenshots/1.png": { "contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=" }
},
"visibility": { "kind": "company" }
}
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({
siteId: '0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f',
widgetId: '0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f',
files: {
'recipe.json': {
content: '{"version":1,"name":"Event countdown with RSVP","slug":"event_countdown","purpose":"Counts down to one event and takes RSVPs from signed-in visitors","whenToUse":"A page for one dated event","behaviour":"Shows days, hours and minutes until startsAt, then \'started\'. A signed-in visitor RSVPs once.","states":[{"name":"counting","description":"Before startsAt"},{"name":"started","description":"After startsAt"},{"name":"rsvp_sent","description":"This visitor has RSVPed"}],"props":{"eventName":{"type":"text","required":true,"description":"The event\'s name"},"startsAt":{"type":"timestamp","required":true,"description":"When it starts"}},"data":{"scopes":[],"delegated":[],"schema":{"version":1,"tables":{"rsvps":{"columns":{"guests":{"type":"integer"}},"rules":{"insert":"signed_in","read":"owner"},"unique":[["created_by"]]}}}},"cssProperties":[{"name":"--countdown-accent","description":"Digit colour"}]}'
},
'skeleton.html': {content: '<section class="countdown"><p class="digits"></p></section>'},
'reference/plain.js': {content: 'export default class Countdown extends HTMLElement {}'},
'screenshots/1.png': {contentBase64: 'iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA='}
},
visibility: {kind: 'company'}
})
};
fetch('https://api.fluid.app/api/member/v2026-10/widgets', 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/member/v2026-10/widgets",
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([
'siteId' => '0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f',
'widgetId' => '0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f',
'files' => [
'recipe.json' => [
'content' => '{"version":1,"name":"Event countdown with RSVP","slug":"event_countdown","purpose":"Counts down to one event and takes RSVPs from signed-in visitors","whenToUse":"A page for one dated event","behaviour":"Shows days, hours and minutes until startsAt, then \'started\'. A signed-in visitor RSVPs once.","states":[{"name":"counting","description":"Before startsAt"},{"name":"started","description":"After startsAt"},{"name":"rsvp_sent","description":"This visitor has RSVPed"}],"props":{"eventName":{"type":"text","required":true,"description":"The event\'s name"},"startsAt":{"type":"timestamp","required":true,"description":"When it starts"}},"data":{"scopes":[],"delegated":[],"schema":{"version":1,"tables":{"rsvps":{"columns":{"guests":{"type":"integer"}},"rules":{"insert":"signed_in","read":"owner"},"unique":[["created_by"]]}}}},"cssProperties":[{"name":"--countdown-accent","description":"Digit colour"}]}'
],
'skeleton.html' => [
'content' => '<section class="countdown"><p class="digits"></p></section>'
],
'reference/plain.js' => [
'content' => 'export default class Countdown extends HTMLElement {}'
],
'screenshots/1.png' => [
'contentBase64' => 'iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA='
]
],
'visibility' => [
'kind' => 'company'
]
]),
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/member/v2026-10/widgets"
payload := strings.NewReader("{\n \"siteId\": \"0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f\",\n \"widgetId\": \"0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f\",\n \"files\": {\n \"recipe.json\": {\n \"content\": \"{\\\"version\\\":1,\\\"name\\\":\\\"Event countdown with RSVP\\\",\\\"slug\\\":\\\"event_countdown\\\",\\\"purpose\\\":\\\"Counts down to one event and takes RSVPs from signed-in visitors\\\",\\\"whenToUse\\\":\\\"A page for one dated event\\\",\\\"behaviour\\\":\\\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\\\",\\\"states\\\":[{\\\"name\\\":\\\"counting\\\",\\\"description\\\":\\\"Before startsAt\\\"},{\\\"name\\\":\\\"started\\\",\\\"description\\\":\\\"After startsAt\\\"},{\\\"name\\\":\\\"rsvp_sent\\\",\\\"description\\\":\\\"This visitor has RSVPed\\\"}],\\\"props\\\":{\\\"eventName\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"The event's name\\\"},\\\"startsAt\\\":{\\\"type\\\":\\\"timestamp\\\",\\\"required\\\":true,\\\"description\\\":\\\"When it starts\\\"}},\\\"data\\\":{\\\"scopes\\\":[],\\\"delegated\\\":[],\\\"schema\\\":{\\\"version\\\":1,\\\"tables\\\":{\\\"rsvps\\\":{\\\"columns\\\":{\\\"guests\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"rules\\\":{\\\"insert\\\":\\\"signed_in\\\",\\\"read\\\":\\\"owner\\\"},\\\"unique\\\":[[\\\"created_by\\\"]]}}}},\\\"cssProperties\\\":[{\\\"name\\\":\\\"--countdown-accent\\\",\\\"description\\\":\\\"Digit colour\\\"}]}\"\n },\n \"skeleton.html\": {\n \"content\": \"<section class=\\\"countdown\\\"><p class=\\\"digits\\\"></p></section>\"\n },\n \"reference/plain.js\": {\n \"content\": \"export default class Countdown extends HTMLElement {}\"\n },\n \"screenshots/1.png\": {\n \"contentBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=\"\n }\n },\n \"visibility\": {\n \"kind\": \"company\"\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/member/v2026-10/widgets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": \"0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f\",\n \"widgetId\": \"0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f\",\n \"files\": {\n \"recipe.json\": {\n \"content\": \"{\\\"version\\\":1,\\\"name\\\":\\\"Event countdown with RSVP\\\",\\\"slug\\\":\\\"event_countdown\\\",\\\"purpose\\\":\\\"Counts down to one event and takes RSVPs from signed-in visitors\\\",\\\"whenToUse\\\":\\\"A page for one dated event\\\",\\\"behaviour\\\":\\\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\\\",\\\"states\\\":[{\\\"name\\\":\\\"counting\\\",\\\"description\\\":\\\"Before startsAt\\\"},{\\\"name\\\":\\\"started\\\",\\\"description\\\":\\\"After startsAt\\\"},{\\\"name\\\":\\\"rsvp_sent\\\",\\\"description\\\":\\\"This visitor has RSVPed\\\"}],\\\"props\\\":{\\\"eventName\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"The event's name\\\"},\\\"startsAt\\\":{\\\"type\\\":\\\"timestamp\\\",\\\"required\\\":true,\\\"description\\\":\\\"When it starts\\\"}},\\\"data\\\":{\\\"scopes\\\":[],\\\"delegated\\\":[],\\\"schema\\\":{\\\"version\\\":1,\\\"tables\\\":{\\\"rsvps\\\":{\\\"columns\\\":{\\\"guests\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"rules\\\":{\\\"insert\\\":\\\"signed_in\\\",\\\"read\\\":\\\"owner\\\"},\\\"unique\\\":[[\\\"created_by\\\"]]}}}},\\\"cssProperties\\\":[{\\\"name\\\":\\\"--countdown-accent\\\",\\\"description\\\":\\\"Digit colour\\\"}]}\"\n },\n \"skeleton.html\": {\n \"content\": \"<section class=\\\"countdown\\\"><p class=\\\"digits\\\"></p></section>\"\n },\n \"reference/plain.js\": {\n \"content\": \"export default class Countdown extends HTMLElement {}\"\n },\n \"screenshots/1.png\": {\n \"contentBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=\"\n }\n },\n \"visibility\": {\n \"kind\": \"company\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/member/v2026-10/widgets")
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 \"siteId\": \"0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f\",\n \"widgetId\": \"0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f\",\n \"files\": {\n \"recipe.json\": {\n \"content\": \"{\\\"version\\\":1,\\\"name\\\":\\\"Event countdown with RSVP\\\",\\\"slug\\\":\\\"event_countdown\\\",\\\"purpose\\\":\\\"Counts down to one event and takes RSVPs from signed-in visitors\\\",\\\"whenToUse\\\":\\\"A page for one dated event\\\",\\\"behaviour\\\":\\\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\\\",\\\"states\\\":[{\\\"name\\\":\\\"counting\\\",\\\"description\\\":\\\"Before startsAt\\\"},{\\\"name\\\":\\\"started\\\",\\\"description\\\":\\\"After startsAt\\\"},{\\\"name\\\":\\\"rsvp_sent\\\",\\\"description\\\":\\\"This visitor has RSVPed\\\"}],\\\"props\\\":{\\\"eventName\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"The event's name\\\"},\\\"startsAt\\\":{\\\"type\\\":\\\"timestamp\\\",\\\"required\\\":true,\\\"description\\\":\\\"When it starts\\\"}},\\\"data\\\":{\\\"scopes\\\":[],\\\"delegated\\\":[],\\\"schema\\\":{\\\"version\\\":1,\\\"tables\\\":{\\\"rsvps\\\":{\\\"columns\\\":{\\\"guests\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"rules\\\":{\\\"insert\\\":\\\"signed_in\\\",\\\"read\\\":\\\"owner\\\"},\\\"unique\\\":[[\\\"created_by\\\"]]}}}},\\\"cssProperties\\\":[{\\\"name\\\":\\\"--countdown-accent\\\",\\\"description\\\":\\\"Digit colour\\\"}]}\"\n },\n \"skeleton.html\": {\n \"content\": \"<section class=\\\"countdown\\\"><p class=\\\"digits\\\"></p></section>\"\n },\n \"reference/plain.js\": {\n \"content\": \"export default class Countdown extends HTMLElement {}\"\n },\n \"screenshots/1.png\": {\n \"contentBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=\"\n }\n },\n \"visibility\": {\n \"kind\": \"company\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"data": {
"widget": {
"id": "0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f",
"kind": "recipe",
"name": "Event countdown with RSVP",
"slug": "event_countdown",
"prefix": "event_countdown_8f04d3",
"purpose": "Counts down to one event and takes RSVPs from signed-in visitors",
"publisher": {
"memberId": "0199e9c8-1111-7b1e-9f3c-1a2b3c4d5e6f",
"name": "Riley Rep"
},
"official": false,
"officialVersion": null,
"readableVersion": 2,
"visibility": "company",
"latestVersion": 2,
"screenshots": [],
"actions": [
"adapt",
"set_visibility",
"unpublish"
]
},
"version": 2
},
"meta": {
"request_uuid": "0192f4c8-5b6c-7d74-a3e8-0f1a2b3c4d5e",
"timestamp": "2026-11-30T15:08:21Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
A member credential in the Authorization: Bearer header: a member
session JWT, a portal JWT whose login is linked to a membership in
that company, an opaque member token, or a verified One Auth identity
access token. The credential alone identifies the member and company.
Member session JWTs, and portal JWTs the server minted read-only, are
refused with 403 on every write.
Body
A recipe version to publish.
curl --request POST \
--url https://api.fluid.app/api/member/v2026-10/widgets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"siteId": "0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f",
"widgetId": "0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f",
"files": {
"recipe.json": {
"content": "{\"version\":1,\"name\":\"Event countdown with RSVP\",\"slug\":\"event_countdown\",\"purpose\":\"Counts down to one event and takes RSVPs from signed-in visitors\",\"whenToUse\":\"A page for one dated event\",\"behaviour\":\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\",\"states\":[{\"name\":\"counting\",\"description\":\"Before startsAt\"},{\"name\":\"started\",\"description\":\"After startsAt\"},{\"name\":\"rsvp_sent\",\"description\":\"This visitor has RSVPed\"}],\"props\":{\"eventName\":{\"type\":\"text\",\"required\":true,\"description\":\"The event's name\"},\"startsAt\":{\"type\":\"timestamp\",\"required\":true,\"description\":\"When it starts\"}},\"data\":{\"scopes\":[],\"delegated\":[],\"schema\":{\"version\":1,\"tables\":{\"rsvps\":{\"columns\":{\"guests\":{\"type\":\"integer\"}},\"rules\":{\"insert\":\"signed_in\",\"read\":\"owner\"},\"unique\":[[\"created_by\"]]}}}},\"cssProperties\":[{\"name\":\"--countdown-accent\",\"description\":\"Digit colour\"}]}"
},
"skeleton.html": {
"content": "<section class=\"countdown\"><p class=\"digits\"></p></section>"
},
"reference/plain.js": {
"content": "export default class Countdown extends HTMLElement {}"
},
"screenshots/1.png": {
"contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA="
}
},
"visibility": {
"kind": "company"
}
}
EOFimport requests
url = "https://api.fluid.app/api/member/v2026-10/widgets"
payload = {
"siteId": "0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f",
"widgetId": "0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f",
"files": {
"recipe.json": { "content": "{\"version\":1,\"name\":\"Event countdown with RSVP\",\"slug\":\"event_countdown\",\"purpose\":\"Counts down to one event and takes RSVPs from signed-in visitors\",\"whenToUse\":\"A page for one dated event\",\"behaviour\":\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\",\"states\":[{\"name\":\"counting\",\"description\":\"Before startsAt\"},{\"name\":\"started\",\"description\":\"After startsAt\"},{\"name\":\"rsvp_sent\",\"description\":\"This visitor has RSVPed\"}],\"props\":{\"eventName\":{\"type\":\"text\",\"required\":true,\"description\":\"The event's name\"},\"startsAt\":{\"type\":\"timestamp\",\"required\":true,\"description\":\"When it starts\"}},\"data\":{\"scopes\":[],\"delegated\":[],\"schema\":{\"version\":1,\"tables\":{\"rsvps\":{\"columns\":{\"guests\":{\"type\":\"integer\"}},\"rules\":{\"insert\":\"signed_in\",\"read\":\"owner\"},\"unique\":[[\"created_by\"]]}}}},\"cssProperties\":[{\"name\":\"--countdown-accent\",\"description\":\"Digit colour\"}]}" },
"skeleton.html": { "content": "<section class=\"countdown\"><p class=\"digits\"></p></section>" },
"reference/plain.js": { "content": "export default class Countdown extends HTMLElement {}" },
"screenshots/1.png": { "contentBase64": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=" }
},
"visibility": { "kind": "company" }
}
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({
siteId: '0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f',
widgetId: '0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f',
files: {
'recipe.json': {
content: '{"version":1,"name":"Event countdown with RSVP","slug":"event_countdown","purpose":"Counts down to one event and takes RSVPs from signed-in visitors","whenToUse":"A page for one dated event","behaviour":"Shows days, hours and minutes until startsAt, then \'started\'. A signed-in visitor RSVPs once.","states":[{"name":"counting","description":"Before startsAt"},{"name":"started","description":"After startsAt"},{"name":"rsvp_sent","description":"This visitor has RSVPed"}],"props":{"eventName":{"type":"text","required":true,"description":"The event\'s name"},"startsAt":{"type":"timestamp","required":true,"description":"When it starts"}},"data":{"scopes":[],"delegated":[],"schema":{"version":1,"tables":{"rsvps":{"columns":{"guests":{"type":"integer"}},"rules":{"insert":"signed_in","read":"owner"},"unique":[["created_by"]]}}}},"cssProperties":[{"name":"--countdown-accent","description":"Digit colour"}]}'
},
'skeleton.html': {content: '<section class="countdown"><p class="digits"></p></section>'},
'reference/plain.js': {content: 'export default class Countdown extends HTMLElement {}'},
'screenshots/1.png': {contentBase64: 'iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA='}
},
visibility: {kind: 'company'}
})
};
fetch('https://api.fluid.app/api/member/v2026-10/widgets', 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/member/v2026-10/widgets",
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([
'siteId' => '0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f',
'widgetId' => '0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f',
'files' => [
'recipe.json' => [
'content' => '{"version":1,"name":"Event countdown with RSVP","slug":"event_countdown","purpose":"Counts down to one event and takes RSVPs from signed-in visitors","whenToUse":"A page for one dated event","behaviour":"Shows days, hours and minutes until startsAt, then \'started\'. A signed-in visitor RSVPs once.","states":[{"name":"counting","description":"Before startsAt"},{"name":"started","description":"After startsAt"},{"name":"rsvp_sent","description":"This visitor has RSVPed"}],"props":{"eventName":{"type":"text","required":true,"description":"The event\'s name"},"startsAt":{"type":"timestamp","required":true,"description":"When it starts"}},"data":{"scopes":[],"delegated":[],"schema":{"version":1,"tables":{"rsvps":{"columns":{"guests":{"type":"integer"}},"rules":{"insert":"signed_in","read":"owner"},"unique":[["created_by"]]}}}},"cssProperties":[{"name":"--countdown-accent","description":"Digit colour"}]}'
],
'skeleton.html' => [
'content' => '<section class="countdown"><p class="digits"></p></section>'
],
'reference/plain.js' => [
'content' => 'export default class Countdown extends HTMLElement {}'
],
'screenshots/1.png' => [
'contentBase64' => 'iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA='
]
],
'visibility' => [
'kind' => 'company'
]
]),
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/member/v2026-10/widgets"
payload := strings.NewReader("{\n \"siteId\": \"0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f\",\n \"widgetId\": \"0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f\",\n \"files\": {\n \"recipe.json\": {\n \"content\": \"{\\\"version\\\":1,\\\"name\\\":\\\"Event countdown with RSVP\\\",\\\"slug\\\":\\\"event_countdown\\\",\\\"purpose\\\":\\\"Counts down to one event and takes RSVPs from signed-in visitors\\\",\\\"whenToUse\\\":\\\"A page for one dated event\\\",\\\"behaviour\\\":\\\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\\\",\\\"states\\\":[{\\\"name\\\":\\\"counting\\\",\\\"description\\\":\\\"Before startsAt\\\"},{\\\"name\\\":\\\"started\\\",\\\"description\\\":\\\"After startsAt\\\"},{\\\"name\\\":\\\"rsvp_sent\\\",\\\"description\\\":\\\"This visitor has RSVPed\\\"}],\\\"props\\\":{\\\"eventName\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"The event's name\\\"},\\\"startsAt\\\":{\\\"type\\\":\\\"timestamp\\\",\\\"required\\\":true,\\\"description\\\":\\\"When it starts\\\"}},\\\"data\\\":{\\\"scopes\\\":[],\\\"delegated\\\":[],\\\"schema\\\":{\\\"version\\\":1,\\\"tables\\\":{\\\"rsvps\\\":{\\\"columns\\\":{\\\"guests\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"rules\\\":{\\\"insert\\\":\\\"signed_in\\\",\\\"read\\\":\\\"owner\\\"},\\\"unique\\\":[[\\\"created_by\\\"]]}}}},\\\"cssProperties\\\":[{\\\"name\\\":\\\"--countdown-accent\\\",\\\"description\\\":\\\"Digit colour\\\"}]}\"\n },\n \"skeleton.html\": {\n \"content\": \"<section class=\\\"countdown\\\"><p class=\\\"digits\\\"></p></section>\"\n },\n \"reference/plain.js\": {\n \"content\": \"export default class Countdown extends HTMLElement {}\"\n },\n \"screenshots/1.png\": {\n \"contentBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=\"\n }\n },\n \"visibility\": {\n \"kind\": \"company\"\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/member/v2026-10/widgets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": \"0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f\",\n \"widgetId\": \"0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f\",\n \"files\": {\n \"recipe.json\": {\n \"content\": \"{\\\"version\\\":1,\\\"name\\\":\\\"Event countdown with RSVP\\\",\\\"slug\\\":\\\"event_countdown\\\",\\\"purpose\\\":\\\"Counts down to one event and takes RSVPs from signed-in visitors\\\",\\\"whenToUse\\\":\\\"A page for one dated event\\\",\\\"behaviour\\\":\\\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\\\",\\\"states\\\":[{\\\"name\\\":\\\"counting\\\",\\\"description\\\":\\\"Before startsAt\\\"},{\\\"name\\\":\\\"started\\\",\\\"description\\\":\\\"After startsAt\\\"},{\\\"name\\\":\\\"rsvp_sent\\\",\\\"description\\\":\\\"This visitor has RSVPed\\\"}],\\\"props\\\":{\\\"eventName\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"The event's name\\\"},\\\"startsAt\\\":{\\\"type\\\":\\\"timestamp\\\",\\\"required\\\":true,\\\"description\\\":\\\"When it starts\\\"}},\\\"data\\\":{\\\"scopes\\\":[],\\\"delegated\\\":[],\\\"schema\\\":{\\\"version\\\":1,\\\"tables\\\":{\\\"rsvps\\\":{\\\"columns\\\":{\\\"guests\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"rules\\\":{\\\"insert\\\":\\\"signed_in\\\",\\\"read\\\":\\\"owner\\\"},\\\"unique\\\":[[\\\"created_by\\\"]]}}}},\\\"cssProperties\\\":[{\\\"name\\\":\\\"--countdown-accent\\\",\\\"description\\\":\\\"Digit colour\\\"}]}\"\n },\n \"skeleton.html\": {\n \"content\": \"<section class=\\\"countdown\\\"><p class=\\\"digits\\\"></p></section>\"\n },\n \"reference/plain.js\": {\n \"content\": \"export default class Countdown extends HTMLElement {}\"\n },\n \"screenshots/1.png\": {\n \"contentBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=\"\n }\n },\n \"visibility\": {\n \"kind\": \"company\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/member/v2026-10/widgets")
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 \"siteId\": \"0199e9c8-2222-7b1e-9f3c-1a2b3c4d5e6f\",\n \"widgetId\": \"0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f\",\n \"files\": {\n \"recipe.json\": {\n \"content\": \"{\\\"version\\\":1,\\\"name\\\":\\\"Event countdown with RSVP\\\",\\\"slug\\\":\\\"event_countdown\\\",\\\"purpose\\\":\\\"Counts down to one event and takes RSVPs from signed-in visitors\\\",\\\"whenToUse\\\":\\\"A page for one dated event\\\",\\\"behaviour\\\":\\\"Shows days, hours and minutes until startsAt, then 'started'. A signed-in visitor RSVPs once.\\\",\\\"states\\\":[{\\\"name\\\":\\\"counting\\\",\\\"description\\\":\\\"Before startsAt\\\"},{\\\"name\\\":\\\"started\\\",\\\"description\\\":\\\"After startsAt\\\"},{\\\"name\\\":\\\"rsvp_sent\\\",\\\"description\\\":\\\"This visitor has RSVPed\\\"}],\\\"props\\\":{\\\"eventName\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"The event's name\\\"},\\\"startsAt\\\":{\\\"type\\\":\\\"timestamp\\\",\\\"required\\\":true,\\\"description\\\":\\\"When it starts\\\"}},\\\"data\\\":{\\\"scopes\\\":[],\\\"delegated\\\":[],\\\"schema\\\":{\\\"version\\\":1,\\\"tables\\\":{\\\"rsvps\\\":{\\\"columns\\\":{\\\"guests\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"rules\\\":{\\\"insert\\\":\\\"signed_in\\\",\\\"read\\\":\\\"owner\\\"},\\\"unique\\\":[[\\\"created_by\\\"]]}}}},\\\"cssProperties\\\":[{\\\"name\\\":\\\"--countdown-accent\\\",\\\"description\\\":\\\"Digit colour\\\"}]}\"\n },\n \"skeleton.html\": {\n \"content\": \"<section class=\\\"countdown\\\"><p class=\\\"digits\\\"></p></section>\"\n },\n \"reference/plain.js\": {\n \"content\": \"export default class Countdown extends HTMLElement {}\"\n },\n \"screenshots/1.png\": {\n \"contentBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAA=\"\n }\n },\n \"visibility\": {\n \"kind\": \"company\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"data": {
"widget": {
"id": "0199e9c8-6d2a-7b1e-9f3c-1a2b3c4d5e6f",
"kind": "recipe",
"name": "Event countdown with RSVP",
"slug": "event_countdown",
"prefix": "event_countdown_8f04d3",
"purpose": "Counts down to one event and takes RSVPs from signed-in visitors",
"publisher": {
"memberId": "0199e9c8-1111-7b1e-9f3c-1a2b3c4d5e6f",
"name": "Riley Rep"
},
"official": false,
"officialVersion": null,
"readableVersion": 2,
"visibility": "company",
"latestVersion": 2,
"screenshots": [],
"actions": [
"adapt",
"set_visibility",
"unpublish"
]
},
"version": 2
},
"meta": {
"request_uuid": "0192f4c8-5b6c-7d74-a3e8-0f1a2b3c4d5e",
"timestamp": "2026-11-30T15:08:21Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"error": {
"message": "<string>",
"details": {}
},
"meta": {
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}