Create a company activity
Adds an activity to a member’s activity feed, for example to surface an event from an external system. Identify the member with an affiliate object, inside activity or at the top level, using one of id, external_id, username, email, or legacy_number. When email is sent with another key, it must belong to the same member. title is required. To link the activity to a contact, send relation_type: Contact and the contact’s ID as relation_id; other relation types are ignored. The activity is stored with the imported slug and returned as stored. Returns 400 for a missing title or invalid affiliate data, and 404 when no member matches. Requires a company admin, company API, or partner token with the dashboard update permission.
curl --request POST \
--url https://api.fluid.app/api/company/activities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"activity": {
"title": "Paper order shipped",
"description": "Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.",
"relation_type": "Contact",
"relation_id": "48213",
"affiliate": {
"email": "dwight.schrute@dundermifflin.com"
}
}
}
EOFimport requests
url = "https://api.fluid.app/api/company/activities"
payload = { "activity": {
"title": "Paper order shipped",
"description": "Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.",
"relation_type": "Contact",
"relation_id": "48213",
"affiliate": { "email": "dwight.schrute@dundermifflin.com" }
} }
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({
activity: {
title: 'Paper order shipped',
description: 'Holly Flax\'s order of 4 cases of 20lb copy paper left the Scranton warehouse.',
relation_type: 'Contact',
relation_id: '48213',
affiliate: {email: 'dwight.schrute@dundermifflin.com'}
}
})
};
fetch('https://api.fluid.app/api/company/activities', 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/activities",
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([
'activity' => [
'title' => 'Paper order shipped',
'description' => 'Holly Flax\'s order of 4 cases of 20lb copy paper left the Scranton warehouse.',
'relation_type' => 'Contact',
'relation_id' => '48213',
'affiliate' => [
'email' => 'dwight.schrute@dundermifflin.com'
]
]
]),
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/activities"
payload := strings.NewReader("{\n \"activity\": {\n \"title\": \"Paper order shipped\",\n \"description\": \"Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.\",\n \"relation_type\": \"Contact\",\n \"relation_id\": \"48213\",\n \"affiliate\": {\n \"email\": \"dwight.schrute@dundermifflin.com\"\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/activities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity\": {\n \"title\": \"Paper order shipped\",\n \"description\": \"Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.\",\n \"relation_type\": \"Contact\",\n \"relation_id\": \"48213\",\n \"affiliate\": {\n \"email\": \"dwight.schrute@dundermifflin.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/activities")
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 \"activity\": {\n \"title\": \"Paper order shipped\",\n \"description\": \"Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.\",\n \"relation_type\": \"Contact\",\n \"relation_id\": \"48213\",\n \"affiliate\": {\n \"email\": \"dwight.schrute@dundermifflin.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 90452,
"user_id": 3120,
"company_id": 1405,
"contact_id": null,
"visitor_id": null,
"title": "Paper order shipped",
"description": "Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.",
"slug": "imported",
"relation_type": "Contact",
"relation_id": 48213,
"read_at": null,
"notification_sent": false,
"payload": {},
"uuid_v7": "01926f3a-8c4e-7b21-9d5f-3e8a1c6b2f47",
"created_at": "2026-09-18T14:05:22Z",
"updated_at": "2026-09-18T14:05:22Z"
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}Response
Created
An activity created through the company API, returned as stored.
curl --request POST \
--url https://api.fluid.app/api/company/activities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"activity": {
"title": "Paper order shipped",
"description": "Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.",
"relation_type": "Contact",
"relation_id": "48213",
"affiliate": {
"email": "dwight.schrute@dundermifflin.com"
}
}
}
EOFimport requests
url = "https://api.fluid.app/api/company/activities"
payload = { "activity": {
"title": "Paper order shipped",
"description": "Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.",
"relation_type": "Contact",
"relation_id": "48213",
"affiliate": { "email": "dwight.schrute@dundermifflin.com" }
} }
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({
activity: {
title: 'Paper order shipped',
description: 'Holly Flax\'s order of 4 cases of 20lb copy paper left the Scranton warehouse.',
relation_type: 'Contact',
relation_id: '48213',
affiliate: {email: 'dwight.schrute@dundermifflin.com'}
}
})
};
fetch('https://api.fluid.app/api/company/activities', 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/activities",
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([
'activity' => [
'title' => 'Paper order shipped',
'description' => 'Holly Flax\'s order of 4 cases of 20lb copy paper left the Scranton warehouse.',
'relation_type' => 'Contact',
'relation_id' => '48213',
'affiliate' => [
'email' => 'dwight.schrute@dundermifflin.com'
]
]
]),
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/activities"
payload := strings.NewReader("{\n \"activity\": {\n \"title\": \"Paper order shipped\",\n \"description\": \"Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.\",\n \"relation_type\": \"Contact\",\n \"relation_id\": \"48213\",\n \"affiliate\": {\n \"email\": \"dwight.schrute@dundermifflin.com\"\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/activities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity\": {\n \"title\": \"Paper order shipped\",\n \"description\": \"Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.\",\n \"relation_type\": \"Contact\",\n \"relation_id\": \"48213\",\n \"affiliate\": {\n \"email\": \"dwight.schrute@dundermifflin.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/activities")
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 \"activity\": {\n \"title\": \"Paper order shipped\",\n \"description\": \"Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.\",\n \"relation_type\": \"Contact\",\n \"relation_id\": \"48213\",\n \"affiliate\": {\n \"email\": \"dwight.schrute@dundermifflin.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 90452,
"user_id": 3120,
"company_id": 1405,
"contact_id": null,
"visitor_id": null,
"title": "Paper order shipped",
"description": "Holly Flax's order of 4 cases of 20lb copy paper left the Scranton warehouse.",
"slug": "imported",
"relation_type": "Contact",
"relation_id": 48213,
"read_at": null,
"notification_sent": false,
"payload": {},
"uuid_v7": "01926f3a-8c4e-7b21-9d5f-3e8a1c6b2f47",
"created_at": "2026-09-18T14:05:22Z",
"updated_at": "2026-09-18T14:05:22Z"
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}