Creates and invites a user
Adds a user to the token’s company, places them under their sponsor, and then emails them an invitation; the invitation is sent only after the member is created and placed. The company is always the one the Bearer token belongs to; company_id may be omitted, and when sent it must be that company’s ID. When the email already belongs to a user, that user is added to the company instead of a new one being created; the invitation is sent only when this is the user’s first company. When the email already holds a member or admin seat in the company, nothing is written, no invitation is sent, and the response carries already_member: true. Set active to false to create the member without sending an invitation. dob is saved only when this request creates the user account, so a linked existing account keeps its date of birth. rank_id must be one of the company’s ranks. sponsor_id is a member or admin UUID, or a legacy bigint ID, of the company; it is not allowed with roles admin. address accepts only name, address1, address2, city, state, postal_code and country_code, and requires address1, city, state, postal_code and country_code. roles sets the member type (default rep); admin also grants the company’s default admin role, and admin_roles adds further admin role IDs of the same company (admins only). Making someone an admin requires the caller to hold every permission of the roles granted; droplet tokens cannot create admins. Country and language fall back to the company’s defaults when country_code / language_code are omitted. Requires a company admin Bearer token with permission to update users.
curl --request POST \
--url https://api.fluid.app/api/users/create_and_invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country_code": "US",
"language_code": "en",
"user": {
"email": "pam.beesly@dundermifflin.com",
"first_name": "Pam",
"last_name": "Beesly",
"company_id": 1405,
"roles": "rep",
"phone": "+15705550163",
"dob": "1979-03-25",
"external_id": "DM-REP-1044",
"username": "pam-beesly",
"active": true,
"rank_id": 3021,
"sponsor_id": "7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f",
"address": {
"name": "Pam Beesly",
"address1": "1725 Slough Avenue",
"city": "Scranton",
"state": "PA",
"postal_code": "18505",
"country_code": "US"
}
}
}
'import requests
url = "https://api.fluid.app/api/users/create_and_invite"
payload = {
"country_code": "US",
"language_code": "en",
"user": {
"email": "pam.beesly@dundermifflin.com",
"first_name": "Pam",
"last_name": "Beesly",
"company_id": 1405,
"roles": "rep",
"phone": "+15705550163",
"dob": "1979-03-25",
"external_id": "DM-REP-1044",
"username": "pam-beesly",
"active": True,
"rank_id": 3021,
"sponsor_id": "7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f",
"address": {
"name": "Pam Beesly",
"address1": "1725 Slough Avenue",
"city": "Scranton",
"state": "PA",
"postal_code": "18505",
"country_code": "US"
}
}
}
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({
country_code: 'US',
language_code: 'en',
user: {
email: 'pam.beesly@dundermifflin.com',
first_name: 'Pam',
last_name: 'Beesly',
company_id: 1405,
roles: 'rep',
phone: '+15705550163',
dob: '1979-03-25',
external_id: 'DM-REP-1044',
username: 'pam-beesly',
active: true,
rank_id: 3021,
sponsor_id: '7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f',
address: {
name: 'Pam Beesly',
address1: '1725 Slough Avenue',
city: 'Scranton',
state: 'PA',
postal_code: '18505',
country_code: 'US'
}
}
})
};
fetch('https://api.fluid.app/api/users/create_and_invite', 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/users/create_and_invite",
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([
'country_code' => 'US',
'language_code' => 'en',
'user' => [
'email' => 'pam.beesly@dundermifflin.com',
'first_name' => 'Pam',
'last_name' => 'Beesly',
'company_id' => 1405,
'roles' => 'rep',
'phone' => '+15705550163',
'dob' => '1979-03-25',
'external_id' => 'DM-REP-1044',
'username' => 'pam-beesly',
'active' => true,
'rank_id' => 3021,
'sponsor_id' => '7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f',
'address' => [
'name' => 'Pam Beesly',
'address1' => '1725 Slough Avenue',
'city' => 'Scranton',
'state' => 'PA',
'postal_code' => '18505',
'country_code' => 'US'
]
]
]),
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/users/create_and_invite"
payload := strings.NewReader("{\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"user\": {\n \"email\": \"pam.beesly@dundermifflin.com\",\n \"first_name\": \"Pam\",\n \"last_name\": \"Beesly\",\n \"company_id\": 1405,\n \"roles\": \"rep\",\n \"phone\": \"+15705550163\",\n \"dob\": \"1979-03-25\",\n \"external_id\": \"DM-REP-1044\",\n \"username\": \"pam-beesly\",\n \"active\": true,\n \"rank_id\": 3021,\n \"sponsor_id\": \"7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f\",\n \"address\": {\n \"name\": \"Pam Beesly\",\n \"address1\": \"1725 Slough Avenue\",\n \"city\": \"Scranton\",\n \"state\": \"PA\",\n \"postal_code\": \"18505\",\n \"country_code\": \"US\"\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/users/create_and_invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"user\": {\n \"email\": \"pam.beesly@dundermifflin.com\",\n \"first_name\": \"Pam\",\n \"last_name\": \"Beesly\",\n \"company_id\": 1405,\n \"roles\": \"rep\",\n \"phone\": \"+15705550163\",\n \"dob\": \"1979-03-25\",\n \"external_id\": \"DM-REP-1044\",\n \"username\": \"pam-beesly\",\n \"active\": true,\n \"rank_id\": 3021,\n \"sponsor_id\": \"7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f\",\n \"address\": {\n \"name\": \"Pam Beesly\",\n \"address1\": \"1725 Slough Avenue\",\n \"city\": \"Scranton\",\n \"state\": \"PA\",\n \"postal_code\": \"18505\",\n \"country_code\": \"US\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/users/create_and_invite")
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 \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"user\": {\n \"email\": \"pam.beesly@dundermifflin.com\",\n \"first_name\": \"Pam\",\n \"last_name\": \"Beesly\",\n \"company_id\": 1405,\n \"roles\": \"rep\",\n \"phone\": \"+15705550163\",\n \"dob\": \"1979-03-25\",\n \"external_id\": \"DM-REP-1044\",\n \"username\": \"pam-beesly\",\n \"active\": true,\n \"rank_id\": 3021,\n \"sponsor_id\": \"7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f\",\n \"address\": {\n \"name\": \"Pam Beesly\",\n \"address1\": \"1725 Slough Avenue\",\n \"city\": \"Scranton\",\n \"state\": \"PA\",\n \"postal_code\": \"18505\",\n \"country_code\": \"US\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"user": {
"id": 20990,
"email": "pam.beesly@dundermifflin.com",
"first_name": "Pam",
"last_name": "Beesly"
},
"meta": {
"request_id": "5f0c2a7e-3b1d-4c8e-9a6f-2d7b1e4c9a03",
"timestamp": "2026-09-30T14:12:45Z"
}
}{
"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
}
}{
"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
}
}{
"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
}
}{
"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
The member was created and invited, or, with already_member true, the email already held a member or admin seat in the company and nothing was written.
curl --request POST \
--url https://api.fluid.app/api/users/create_and_invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country_code": "US",
"language_code": "en",
"user": {
"email": "pam.beesly@dundermifflin.com",
"first_name": "Pam",
"last_name": "Beesly",
"company_id": 1405,
"roles": "rep",
"phone": "+15705550163",
"dob": "1979-03-25",
"external_id": "DM-REP-1044",
"username": "pam-beesly",
"active": true,
"rank_id": 3021,
"sponsor_id": "7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f",
"address": {
"name": "Pam Beesly",
"address1": "1725 Slough Avenue",
"city": "Scranton",
"state": "PA",
"postal_code": "18505",
"country_code": "US"
}
}
}
'import requests
url = "https://api.fluid.app/api/users/create_and_invite"
payload = {
"country_code": "US",
"language_code": "en",
"user": {
"email": "pam.beesly@dundermifflin.com",
"first_name": "Pam",
"last_name": "Beesly",
"company_id": 1405,
"roles": "rep",
"phone": "+15705550163",
"dob": "1979-03-25",
"external_id": "DM-REP-1044",
"username": "pam-beesly",
"active": True,
"rank_id": 3021,
"sponsor_id": "7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f",
"address": {
"name": "Pam Beesly",
"address1": "1725 Slough Avenue",
"city": "Scranton",
"state": "PA",
"postal_code": "18505",
"country_code": "US"
}
}
}
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({
country_code: 'US',
language_code: 'en',
user: {
email: 'pam.beesly@dundermifflin.com',
first_name: 'Pam',
last_name: 'Beesly',
company_id: 1405,
roles: 'rep',
phone: '+15705550163',
dob: '1979-03-25',
external_id: 'DM-REP-1044',
username: 'pam-beesly',
active: true,
rank_id: 3021,
sponsor_id: '7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f',
address: {
name: 'Pam Beesly',
address1: '1725 Slough Avenue',
city: 'Scranton',
state: 'PA',
postal_code: '18505',
country_code: 'US'
}
}
})
};
fetch('https://api.fluid.app/api/users/create_and_invite', 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/users/create_and_invite",
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([
'country_code' => 'US',
'language_code' => 'en',
'user' => [
'email' => 'pam.beesly@dundermifflin.com',
'first_name' => 'Pam',
'last_name' => 'Beesly',
'company_id' => 1405,
'roles' => 'rep',
'phone' => '+15705550163',
'dob' => '1979-03-25',
'external_id' => 'DM-REP-1044',
'username' => 'pam-beesly',
'active' => true,
'rank_id' => 3021,
'sponsor_id' => '7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f',
'address' => [
'name' => 'Pam Beesly',
'address1' => '1725 Slough Avenue',
'city' => 'Scranton',
'state' => 'PA',
'postal_code' => '18505',
'country_code' => 'US'
]
]
]),
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/users/create_and_invite"
payload := strings.NewReader("{\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"user\": {\n \"email\": \"pam.beesly@dundermifflin.com\",\n \"first_name\": \"Pam\",\n \"last_name\": \"Beesly\",\n \"company_id\": 1405,\n \"roles\": \"rep\",\n \"phone\": \"+15705550163\",\n \"dob\": \"1979-03-25\",\n \"external_id\": \"DM-REP-1044\",\n \"username\": \"pam-beesly\",\n \"active\": true,\n \"rank_id\": 3021,\n \"sponsor_id\": \"7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f\",\n \"address\": {\n \"name\": \"Pam Beesly\",\n \"address1\": \"1725 Slough Avenue\",\n \"city\": \"Scranton\",\n \"state\": \"PA\",\n \"postal_code\": \"18505\",\n \"country_code\": \"US\"\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/users/create_and_invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"user\": {\n \"email\": \"pam.beesly@dundermifflin.com\",\n \"first_name\": \"Pam\",\n \"last_name\": \"Beesly\",\n \"company_id\": 1405,\n \"roles\": \"rep\",\n \"phone\": \"+15705550163\",\n \"dob\": \"1979-03-25\",\n \"external_id\": \"DM-REP-1044\",\n \"username\": \"pam-beesly\",\n \"active\": true,\n \"rank_id\": 3021,\n \"sponsor_id\": \"7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f\",\n \"address\": {\n \"name\": \"Pam Beesly\",\n \"address1\": \"1725 Slough Avenue\",\n \"city\": \"Scranton\",\n \"state\": \"PA\",\n \"postal_code\": \"18505\",\n \"country_code\": \"US\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/users/create_and_invite")
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 \"country_code\": \"US\",\n \"language_code\": \"en\",\n \"user\": {\n \"email\": \"pam.beesly@dundermifflin.com\",\n \"first_name\": \"Pam\",\n \"last_name\": \"Beesly\",\n \"company_id\": 1405,\n \"roles\": \"rep\",\n \"phone\": \"+15705550163\",\n \"dob\": \"1979-03-25\",\n \"external_id\": \"DM-REP-1044\",\n \"username\": \"pam-beesly\",\n \"active\": true,\n \"rank_id\": 3021,\n \"sponsor_id\": \"7f3c2d9e-5b1a-4e8c-9d46-0a1b2c3d4e5f\",\n \"address\": {\n \"name\": \"Pam Beesly\",\n \"address1\": \"1725 Slough Avenue\",\n \"city\": \"Scranton\",\n \"state\": \"PA\",\n \"postal_code\": \"18505\",\n \"country_code\": \"US\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"user": {
"id": 20990,
"email": "pam.beesly@dundermifflin.com",
"first_name": "Pam",
"last_name": "Beesly"
},
"meta": {
"request_id": "5f0c2a7e-3b1d-4c8e-9a6f-2d7b1e4c9a03",
"timestamp": "2026-09-30T14:12:45Z"
}
}{
"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
}
}{
"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
}
}{
"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
}
}{
"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
}
}