curl --request POST \
--url https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"mode": "EXPLICIT",
"employeeIds": [
"employee-avery"
]
},
"expectedCount": 1
}
'import requests
url = "https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members"
payload = {
"selection": {
"mode": "EXPLICIT",
"employeeIds": ["employee-avery"]
},
"expectedCount": 1
}
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({
selection: {mode: 'EXPLICIT', employeeIds: ['employee-avery']},
expectedCount: 1
})
};
fetch('https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members', 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.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members",
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([
'selection' => [
'mode' => 'EXPLICIT',
'employeeIds' => [
'employee-avery'
]
],
'expectedCount' => 1
]),
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.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members"
payload := strings.NewReader("{\n \"selection\": {\n \"mode\": \"EXPLICIT\",\n \"employeeIds\": [\n \"employee-avery\"\n ]\n },\n \"expectedCount\": 1\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.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"mode\": \"EXPLICIT\",\n \"employeeIds\": [\n \"employee-avery\"\n ]\n },\n \"expectedCount\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members")
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 \"selection\": {\n \"mode\": \"EXPLICIT\",\n \"employeeIds\": [\n \"employee-avery\"\n ]\n },\n \"expectedCount\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "<string>",
"requestId": "<string>"
}
}Add employees to a manual group
Adds employees to a MANUAL group that you can edit. EXPLICIT accepts 1–1000 unique employee IDs. ALL_MATCHING selects employees you can access using the employee API filter; status defaults to CURRENT. Put exclusions in filter.excludedEmployeeIds. expectedCount must match all selected employees, including existing members, before any changes are saved. It does not count only new memberships. Existing members are retained. A missing employee or stale count fails the whole request without changes. FILTER, SYNCED, SCIM, and integration-managed groups reject manual membership changes.
curl --request POST \
--url https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"mode": "EXPLICIT",
"employeeIds": [
"employee-avery"
]
},
"expectedCount": 1
}
'import requests
url = "https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members"
payload = {
"selection": {
"mode": "EXPLICIT",
"employeeIds": ["employee-avery"]
},
"expectedCount": 1
}
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({
selection: {mode: 'EXPLICIT', employeeIds: ['employee-avery']},
expectedCount: 1
})
};
fetch('https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members', 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.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members",
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([
'selection' => [
'mode' => 'EXPLICIT',
'employeeIds' => [
'employee-avery'
]
],
'expectedCount' => 1
]),
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.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members"
payload := strings.NewReader("{\n \"selection\": {\n \"mode\": \"EXPLICIT\",\n \"employeeIds\": [\n \"employee-avery\"\n ]\n },\n \"expectedCount\": 1\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.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"mode\": \"EXPLICIT\",\n \"employeeIds\": [\n \"employee-avery\"\n ]\n },\n \"expectedCount\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gowindmill.com/api/v2/c/{companyId}/groups/{groupId}/members")
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 \"selection\": {\n \"mode\": \"EXPLICIT\",\n \"employeeIds\": [\n \"employee-avery\"\n ]\n },\n \"expectedCount\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "<string>",
"requestId": "<string>"
}
}Authorizations
Use an API key or OAuth access token. Enter only the token in the authorization dialog; requests send it as Authorization: Bearer <TOKEN>.
Create an API key in your workspace's Settings → API keys. Keys start with wm_api_ and only work in the workspace where they were created. Read-only keys can read data; creating, updating, or deleting data requires a read-write key.
Authorization: Bearer wm_api_example
OAuth access tokens are issued for connected Windmill applications.
Authorization: Bearer <OAUTH_ACCESS_TOKEN>
Both token types use the authenticated user's workspace permissions. Each endpoint's permission requirements and the sharing settings of the requested items still apply.
Path Parameters
Body
Select employee IDs or all employees matching the API filter. expectedCount counts selected employees, including existing group members, rather than new memberships.
Was this page helpful?