Update employee group
Replaces an existing employee group’s name and isDefault with the values provided in the request body. This is a full replace, not a partial update — both properties are overwritten. Setting isDefault to true automatically unsets the organization’s previous default group, if any. Returns 403 when the authenticated user is not an administrator of the organization. Returns 404 when the employee group does not exist, or belongs to a different organization.
curl --request PUT \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team Updated",
"isDefault": true
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}"
payload = {
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team Updated",
"isDefault": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c',
name: 'Sales Team Updated',
isDefault: true
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}', 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c',
'name' => 'Sales Team Updated',
'isDefault' => 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}"
payload := strings.NewReader("{\n \"id\": \"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c\",\n \"name\": \"Sales Team Updated\",\n \"isDefault\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c\",\n \"name\": \"Sales Team Updated\",\n \"isDefault\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c\",\n \"name\": \"Sales Team Updated\",\n \"isDefault\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team",
"isDefault": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
String. The organization's internal ID (32-character hex string).
"11adfe2a080040e3892ffb89c21ec44e"
String (32-character hex string). The internal ID of the employee group to update, as returned in the id field of the list, create, and update responses. Must match the id property in the request body.
"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c"
Body
This is a full replace, not a partial update: both name and isDefault are overwritten with the values provided in the request body.
The employee group's ID. Must match the employeeGroupId path parameter.
Display name of the employee group. Must not be blank, is trimmed, and must be unique within the organization (case-insensitive).
255Whether this group should become the organization's default group. When the organization uses employee groups, users newly added to the organization are automatically assigned to the default group. Existing users are not moved to the group when it is set as default. Setting this to true automatically unsets the organization's previous default group, if any. Treated as false when omitted.
Response
OK — returns the updated employee group
Unique internal identifier of the employee group.
Display name of the employee group.
Whether this is the organization's default employee group. When the organization uses employee groups, users newly added to the organization are automatically assigned to the default group, when one is set. Existing users are not moved to the group when it is set as default. At most one group per organization can be the default at a time.
curl --request PUT \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team Updated",
"isDefault": true
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}"
payload = {
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team Updated",
"isDefault": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c',
name: 'Sales Team Updated',
isDefault: true
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}', 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c',
'name' => 'Sales Team Updated',
'isDefault' => 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}"
payload := strings.NewReader("{\n \"id\": \"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c\",\n \"name\": \"Sales Team Updated\",\n \"isDefault\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c\",\n \"name\": \"Sales Team Updated\",\n \"isDefault\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c\",\n \"name\": \"Sales Team Updated\",\n \"isDefault\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team",
"isDefault": false
}
