company-events
Create company event
Add a new event for the company with details like title, dates, venue, and optional media content.
POST
/
api
/
company
/
events
Create company event
curl --request POST \
--url https://api.fluid.app/api/company/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": {
"title": "<string>",
"description": "<string>",
"venue": "<string>",
"url": "<string>",
"user_id": 123,
"company_id": 123,
"start_date": "<string>",
"end_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"active": true,
"time_zone": "<string>",
"send_notification": true,
"available_countries": [
"<string>"
],
"country_ids": [
123
],
"images_attributes": [
{
"id": 123,
"image_url": "<string>",
"position": 123,
"_destroy": true
}
]
}
}
'import requests
url = "https://api.fluid.app/api/company/events"
payload = { "event": {
"title": "<string>",
"description": "<string>",
"venue": "<string>",
"url": "<string>",
"user_id": 123,
"company_id": 123,
"start_date": "<string>",
"end_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"active": True,
"time_zone": "<string>",
"send_notification": True,
"available_countries": ["<string>"],
"country_ids": [123],
"images_attributes": [
{
"id": 123,
"image_url": "<string>",
"position": 123,
"_destroy": True
}
]
} }
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({
event: {
title: '<string>',
description: '<string>',
venue: '<string>',
url: '<string>',
user_id: 123,
company_id: 123,
start_date: '<string>',
end_date: '<string>',
start_time: '<string>',
end_time: '<string>',
active: true,
time_zone: '<string>',
send_notification: true,
available_countries: ['<string>'],
country_ids: [123],
images_attributes: [{id: 123, image_url: '<string>', position: 123, _destroy: true}]
}
})
};
fetch('https://api.fluid.app/api/company/events', 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/events",
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([
'event' => [
'title' => '<string>',
'description' => '<string>',
'venue' => '<string>',
'url' => '<string>',
'user_id' => 123,
'company_id' => 123,
'start_date' => '<string>',
'end_date' => '<string>',
'start_time' => '<string>',
'end_time' => '<string>',
'active' => true,
'time_zone' => '<string>',
'send_notification' => true,
'available_countries' => [
'<string>'
],
'country_ids' => [
123
],
'images_attributes' => [
[
'id' => 123,
'image_url' => '<string>',
'position' => 123,
'_destroy' => true
]
]
]
]),
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/events"
payload := strings.NewReader("{\n \"event\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"venue\": \"<string>\",\n \"url\": \"<string>\",\n \"user_id\": 123,\n \"company_id\": 123,\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"active\": true,\n \"time_zone\": \"<string>\",\n \"send_notification\": true,\n \"available_countries\": [\n \"<string>\"\n ],\n \"country_ids\": [\n 123\n ],\n \"images_attributes\": [\n {\n \"id\": 123,\n \"image_url\": \"<string>\",\n \"position\": 123,\n \"_destroy\": true\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/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"venue\": \"<string>\",\n \"url\": \"<string>\",\n \"user_id\": 123,\n \"company_id\": 123,\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"active\": true,\n \"time_zone\": \"<string>\",\n \"send_notification\": true,\n \"available_countries\": [\n \"<string>\"\n ],\n \"country_ids\": [\n 123\n ],\n \"images_attributes\": [\n {\n \"id\": 123,\n \"image_url\": \"<string>\",\n \"position\": 123,\n \"_destroy\": true\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/events")
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 \"event\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"venue\": \"<string>\",\n \"url\": \"<string>\",\n \"user_id\": 123,\n \"company_id\": 123,\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"active\": true,\n \"time_zone\": \"<string>\",\n \"send_notification\": true,\n \"available_countries\": [\n \"<string>\"\n ],\n \"country_ids\": [\n 123\n ],\n \"images_attributes\": [\n {\n \"id\": 123,\n \"image_url\": \"<string>\",\n \"position\": 123,\n \"_destroy\": true\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"canonical_time_zone": "<string>",
"color": "<string>",
"countries": [
"<string>"
],
"description": {
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"locale": null,
"name": "<string>",
"record_id": 123,
"record_type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"end": "2023-11-07T05:31:56Z",
"id": 123,
"image_url": null,
"images": [
"<string>"
],
"is_all_day": true,
"notification_sent_at": null,
"send_notification": true,
"start": "2023-11-07T05:31:56Z",
"status": null,
"time_zone": "<string>",
"title": "<string>",
"url": null,
"user_id": null,
"venue": null
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"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
Event attributes are nested under a required event key; omitting it returns 400.
Event attributes accepted by the controller. title, description, start, end, and time_zone are required by the Event model, so an event missing any of them returns 422.
Show child attributes
Show child attributes
Response
Event created
Any valid JSON value for provider, integration, theme, metadata, or other dynamic payloads whose keys are not fixed by the API contract.
Show child attributes
Show child attributes
Any valid JSON value for provider, integration, theme, metadata, or other dynamic payloads whose keys are not fixed by the API contract.
⌘I
Create company event
curl --request POST \
--url https://api.fluid.app/api/company/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": {
"title": "<string>",
"description": "<string>",
"venue": "<string>",
"url": "<string>",
"user_id": 123,
"company_id": 123,
"start_date": "<string>",
"end_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"active": true,
"time_zone": "<string>",
"send_notification": true,
"available_countries": [
"<string>"
],
"country_ids": [
123
],
"images_attributes": [
{
"id": 123,
"image_url": "<string>",
"position": 123,
"_destroy": true
}
]
}
}
'import requests
url = "https://api.fluid.app/api/company/events"
payload = { "event": {
"title": "<string>",
"description": "<string>",
"venue": "<string>",
"url": "<string>",
"user_id": 123,
"company_id": 123,
"start_date": "<string>",
"end_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"active": True,
"time_zone": "<string>",
"send_notification": True,
"available_countries": ["<string>"],
"country_ids": [123],
"images_attributes": [
{
"id": 123,
"image_url": "<string>",
"position": 123,
"_destroy": True
}
]
} }
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({
event: {
title: '<string>',
description: '<string>',
venue: '<string>',
url: '<string>',
user_id: 123,
company_id: 123,
start_date: '<string>',
end_date: '<string>',
start_time: '<string>',
end_time: '<string>',
active: true,
time_zone: '<string>',
send_notification: true,
available_countries: ['<string>'],
country_ids: [123],
images_attributes: [{id: 123, image_url: '<string>', position: 123, _destroy: true}]
}
})
};
fetch('https://api.fluid.app/api/company/events', 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/events",
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([
'event' => [
'title' => '<string>',
'description' => '<string>',
'venue' => '<string>',
'url' => '<string>',
'user_id' => 123,
'company_id' => 123,
'start_date' => '<string>',
'end_date' => '<string>',
'start_time' => '<string>',
'end_time' => '<string>',
'active' => true,
'time_zone' => '<string>',
'send_notification' => true,
'available_countries' => [
'<string>'
],
'country_ids' => [
123
],
'images_attributes' => [
[
'id' => 123,
'image_url' => '<string>',
'position' => 123,
'_destroy' => true
]
]
]
]),
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/events"
payload := strings.NewReader("{\n \"event\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"venue\": \"<string>\",\n \"url\": \"<string>\",\n \"user_id\": 123,\n \"company_id\": 123,\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"active\": true,\n \"time_zone\": \"<string>\",\n \"send_notification\": true,\n \"available_countries\": [\n \"<string>\"\n ],\n \"country_ids\": [\n 123\n ],\n \"images_attributes\": [\n {\n \"id\": 123,\n \"image_url\": \"<string>\",\n \"position\": 123,\n \"_destroy\": true\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/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"venue\": \"<string>\",\n \"url\": \"<string>\",\n \"user_id\": 123,\n \"company_id\": 123,\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"active\": true,\n \"time_zone\": \"<string>\",\n \"send_notification\": true,\n \"available_countries\": [\n \"<string>\"\n ],\n \"country_ids\": [\n 123\n ],\n \"images_attributes\": [\n {\n \"id\": 123,\n \"image_url\": \"<string>\",\n \"position\": 123,\n \"_destroy\": true\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/events")
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 \"event\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"venue\": \"<string>\",\n \"url\": \"<string>\",\n \"user_id\": 123,\n \"company_id\": 123,\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"active\": true,\n \"time_zone\": \"<string>\",\n \"send_notification\": true,\n \"available_countries\": [\n \"<string>\"\n ],\n \"country_ids\": [\n 123\n ],\n \"images_attributes\": [\n {\n \"id\": 123,\n \"image_url\": \"<string>\",\n \"position\": 123,\n \"_destroy\": true\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"canonical_time_zone": "<string>",
"color": "<string>",
"countries": [
"<string>"
],
"description": {
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"locale": null,
"name": "<string>",
"record_id": 123,
"record_type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"end": "2023-11-07T05:31:56Z",
"id": 123,
"image_url": null,
"images": [
"<string>"
],
"is_all_day": true,
"notification_sent_at": null,
"send_notification": true,
"start": "2023-11-07T05:31:56Z",
"status": null,
"time_zone": "<string>",
"title": "<string>",
"url": null,
"user_id": null,
"venue": null
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}