Legacy (v0)
Create Company User
Adds a rep to the company, creating the underlying user when the email is new. If the email already belongs to a member of the company, that member is returned. Requires a company admin token with permission to update users. email and country_code are required (400 when missing). Pass affiliate with one of id, external_id, username, or email to set the new member’s sponsor; an existing sponsor is not replaced. Returns 422 when the member cannot be created, for example when rank_id belongs to another company.
POST
/
api
/
company
/
users
Create Company User
curl --request POST \
--url https://api.fluid.app/api/company/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "dwight.schrute@dundermifflin.com",
"first_name": "Dwight",
"last_name": "Schrute",
"phone": "+15705550142",
"username": "dwight-schrute",
"external_id": "DM-REP-1042",
"active": true,
"country_code": "US",
"language_code": "en",
"time_zone": "America/New_York",
"affiliate": {
"username": "michael-scott"
}
}
'import requests
url = "https://api.fluid.app/api/company/users"
payload = {
"email": "dwight.schrute@dundermifflin.com",
"first_name": "Dwight",
"last_name": "Schrute",
"phone": "+15705550142",
"username": "dwight-schrute",
"external_id": "DM-REP-1042",
"active": True,
"country_code": "US",
"language_code": "en",
"time_zone": "America/New_York",
"affiliate": { "username": "michael-scott" }
}
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({
email: 'dwight.schrute@dundermifflin.com',
first_name: 'Dwight',
last_name: 'Schrute',
phone: '+15705550142',
username: 'dwight-schrute',
external_id: 'DM-REP-1042',
active: true,
country_code: 'US',
language_code: 'en',
time_zone: 'America/New_York',
affiliate: {username: 'michael-scott'}
})
};
fetch('https://api.fluid.app/api/company/users', 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/users",
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([
'email' => 'dwight.schrute@dundermifflin.com',
'first_name' => 'Dwight',
'last_name' => 'Schrute',
'phone' => '+15705550142',
'username' => 'dwight-schrute',
'external_id' => 'DM-REP-1042',
'active' => true,
'country_code' => 'US',
'language_code' => 'en',
'time_zone' => 'America/New_York',
'affiliate' => [
'username' => 'michael-scott'
]
]),
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/users"
payload := strings.NewReader("{\n \"email\": \"dwight.schrute@dundermifflin.com\",\n \"first_name\": \"Dwight\",\n \"last_name\": \"Schrute\",\n \"phone\": \"+15705550142\",\n \"username\": \"dwight-schrute\",\n \"external_id\": \"DM-REP-1042\",\n \"active\": true,\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"time_zone\": \"America/New_York\",\n \"affiliate\": {\n \"username\": \"michael-scott\"\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/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"dwight.schrute@dundermifflin.com\",\n \"first_name\": \"Dwight\",\n \"last_name\": \"Schrute\",\n \"phone\": \"+15705550142\",\n \"username\": \"dwight-schrute\",\n \"external_id\": \"DM-REP-1042\",\n \"active\": true,\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"time_zone\": \"America/New_York\",\n \"affiliate\": {\n \"username\": \"michael-scott\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/users")
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 \"email\": \"dwight.schrute@dundermifflin.com\",\n \"first_name\": \"Dwight\",\n \"last_name\": \"Schrute\",\n \"phone\": \"+15705550142\",\n \"username\": \"dwight-schrute\",\n \"external_id\": \"DM-REP-1042\",\n \"active\": true,\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"time_zone\": \"America/New_York\",\n \"affiliate\": {\n \"username\": \"michael-scott\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 48213,
"company_id": 1405,
"active": true,
"external_id": "DM-REP-1042",
"username": "dwight-schrute",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg",
"mysite_url": "https://dunder-mifflin.fluid.app/dwight-schrute",
"legacy_number": null,
"metadata": {
"branch": "Scranton",
"territory": "Lackawanna County"
},
"roles": "rep",
"share_guid": "dwight-schrute",
"affiliate": {
"id": 48102,
"external_id": "DM-REP-1001",
"username": "michael-scott",
"email": "michael.scott@dundermifflin.com",
"credit": "michael-scott"
},
"rank": "senior-sales-rep",
"member_id": "0192f3a8-7c41-7d2e-9b6a-3f1e2d4c5b61",
"user": {
"id": 20977,
"email": "dwight.schrute@dundermifflin.com",
"first_name": "Dwight",
"last_name": "Schrute",
"avatar": null,
"phone": "+15705550142",
"google_id": null,
"bio": "Assistant to the Regional Manager. Top paper salesman, Scranton branch.",
"facebook": null,
"instagram": null,
"twitter": null,
"linkedin": "https://www.linkedin.com/in/dwight-schrute",
"whatsapp": null,
"wechat": null,
"youtube": null,
"zip_code": "18505",
"dob": "1970-01-20",
"gender": "male",
"time_zone": "America/New_York",
"dnd": "off",
"language": {
"name": "English",
"iso": "en"
},
"country": {
"name": "United States",
"iso": "US",
"num_code": 840
}
}
}{
"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
}
}Query Parameters
Body
application/json
Response
Created
A company member (rep or admin) with the user profile it belongs to. On a sandbox test store, a droplet or OAuth token receives no username, image_url, mysite_url, legacy_number, roles, share_guid, affiliate or user.
⌘I
Create Company User
curl --request POST \
--url https://api.fluid.app/api/company/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "dwight.schrute@dundermifflin.com",
"first_name": "Dwight",
"last_name": "Schrute",
"phone": "+15705550142",
"username": "dwight-schrute",
"external_id": "DM-REP-1042",
"active": true,
"country_code": "US",
"language_code": "en",
"time_zone": "America/New_York",
"affiliate": {
"username": "michael-scott"
}
}
'import requests
url = "https://api.fluid.app/api/company/users"
payload = {
"email": "dwight.schrute@dundermifflin.com",
"first_name": "Dwight",
"last_name": "Schrute",
"phone": "+15705550142",
"username": "dwight-schrute",
"external_id": "DM-REP-1042",
"active": True,
"country_code": "US",
"language_code": "en",
"time_zone": "America/New_York",
"affiliate": { "username": "michael-scott" }
}
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({
email: 'dwight.schrute@dundermifflin.com',
first_name: 'Dwight',
last_name: 'Schrute',
phone: '+15705550142',
username: 'dwight-schrute',
external_id: 'DM-REP-1042',
active: true,
country_code: 'US',
language_code: 'en',
time_zone: 'America/New_York',
affiliate: {username: 'michael-scott'}
})
};
fetch('https://api.fluid.app/api/company/users', 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/users",
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([
'email' => 'dwight.schrute@dundermifflin.com',
'first_name' => 'Dwight',
'last_name' => 'Schrute',
'phone' => '+15705550142',
'username' => 'dwight-schrute',
'external_id' => 'DM-REP-1042',
'active' => true,
'country_code' => 'US',
'language_code' => 'en',
'time_zone' => 'America/New_York',
'affiliate' => [
'username' => 'michael-scott'
]
]),
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/users"
payload := strings.NewReader("{\n \"email\": \"dwight.schrute@dundermifflin.com\",\n \"first_name\": \"Dwight\",\n \"last_name\": \"Schrute\",\n \"phone\": \"+15705550142\",\n \"username\": \"dwight-schrute\",\n \"external_id\": \"DM-REP-1042\",\n \"active\": true,\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"time_zone\": \"America/New_York\",\n \"affiliate\": {\n \"username\": \"michael-scott\"\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/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"dwight.schrute@dundermifflin.com\",\n \"first_name\": \"Dwight\",\n \"last_name\": \"Schrute\",\n \"phone\": \"+15705550142\",\n \"username\": \"dwight-schrute\",\n \"external_id\": \"DM-REP-1042\",\n \"active\": true,\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"time_zone\": \"America/New_York\",\n \"affiliate\": {\n \"username\": \"michael-scott\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/users")
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 \"email\": \"dwight.schrute@dundermifflin.com\",\n \"first_name\": \"Dwight\",\n \"last_name\": \"Schrute\",\n \"phone\": \"+15705550142\",\n \"username\": \"dwight-schrute\",\n \"external_id\": \"DM-REP-1042\",\n \"active\": true,\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"time_zone\": \"America/New_York\",\n \"affiliate\": {\n \"username\": \"michael-scott\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 48213,
"company_id": 1405,
"active": true,
"external_id": "DM-REP-1042",
"username": "dwight-schrute",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg",
"mysite_url": "https://dunder-mifflin.fluid.app/dwight-schrute",
"legacy_number": null,
"metadata": {
"branch": "Scranton",
"territory": "Lackawanna County"
},
"roles": "rep",
"share_guid": "dwight-schrute",
"affiliate": {
"id": 48102,
"external_id": "DM-REP-1001",
"username": "michael-scott",
"email": "michael.scott@dundermifflin.com",
"credit": "michael-scott"
},
"rank": "senior-sales-rep",
"member_id": "0192f3a8-7c41-7d2e-9b6a-3f1e2d4c5b61",
"user": {
"id": 20977,
"email": "dwight.schrute@dundermifflin.com",
"first_name": "Dwight",
"last_name": "Schrute",
"avatar": null,
"phone": "+15705550142",
"google_id": null,
"bio": "Assistant to the Regional Manager. Top paper salesman, Scranton branch.",
"facebook": null,
"instagram": null,
"twitter": null,
"linkedin": "https://www.linkedin.com/in/dwight-schrute",
"whatsapp": null,
"wechat": null,
"youtube": null,
"zip_code": "18505",
"dob": "1970-01-20",
"gender": "male",
"time_zone": "America/New_York",
"dnd": "off",
"language": {
"name": "English",
"iso": "en"
},
"country": {
"name": "United States",
"iso": "US",
"num_code": 840
}
}
}{
"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
}
}