Set credit and seat limits
curl --request PATCH \
--url https://api.sendler.ai/v1/client-workspaces/{id}/limits \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"monthlyLimit": 500,
"budgetRemaining": 300,
"seatCap": 3
}
'import requests
url = "https://api.sendler.ai/v1/client-workspaces/{id}/limits"
payload = {
"monthlyLimit": 500,
"budgetRemaining": 300,
"seatCap": 3
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({monthlyLimit: 500, budgetRemaining: 300, seatCap: 3})
};
fetch('https://api.sendler.ai/v1/client-workspaces/{id}/limits', 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.sendler.ai/v1/client-workspaces/{id}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'monthlyLimit' => 500,
'budgetRemaining' => 300,
'seatCap' => 3
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.sendler.ai/v1/client-workspaces/{id}/limits"
payload := strings.NewReader("{\n \"monthlyLimit\": 500,\n \"budgetRemaining\": 300,\n \"seatCap\": 3\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api.sendler.ai/v1/client-workspaces/{id}/limits")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"monthlyLimit\": 500,\n \"budgetRemaining\": 300,\n \"seatCap\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendler.ai/v1/client-workspaces/{id}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"monthlyLimit\": 500,\n \"budgetRemaining\": 300,\n \"seatCap\": 3\n}"
response = http.request(request)
puts response.read_body{
"id": "cmb1x2y3z0000abcd",
"name": "Acme Corp",
"note": "Retainer client",
"creditMode": "NONE",
"limit": 500,
"used": 120,
"remaining": 380,
"exhaustedAt": null,
"seatCap": 3,
"seatsUsed": 1,
"members": 2,
"invited": 1
}Client Workspaces
Set Client Workspace Limits
Set a client workspace’s credit rule and/or LinkedIn seat cap.
PATCH
/
v1
/
client-workspaces
/
{id}
/
limits
Set credit and seat limits
curl --request PATCH \
--url https://api.sendler.ai/v1/client-workspaces/{id}/limits \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"monthlyLimit": 500,
"budgetRemaining": 300,
"seatCap": 3
}
'import requests
url = "https://api.sendler.ai/v1/client-workspaces/{id}/limits"
payload = {
"monthlyLimit": 500,
"budgetRemaining": 300,
"seatCap": 3
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({monthlyLimit: 500, budgetRemaining: 300, seatCap: 3})
};
fetch('https://api.sendler.ai/v1/client-workspaces/{id}/limits', 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.sendler.ai/v1/client-workspaces/{id}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'monthlyLimit' => 500,
'budgetRemaining' => 300,
'seatCap' => 3
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.sendler.ai/v1/client-workspaces/{id}/limits"
payload := strings.NewReader("{\n \"monthlyLimit\": 500,\n \"budgetRemaining\": 300,\n \"seatCap\": 3\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api.sendler.ai/v1/client-workspaces/{id}/limits")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"monthlyLimit\": 500,\n \"budgetRemaining\": 300,\n \"seatCap\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendler.ai/v1/client-workspaces/{id}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"monthlyLimit\": 500,\n \"budgetRemaining\": 300,\n \"seatCap\": 3\n}"
response = http.request(request)
puts response.read_body{
"id": "cmb1x2y3z0000abcd",
"name": "Acme Corp",
"note": "Retainer client",
"creditMode": "NONE",
"limit": 500,
"used": 120,
"remaining": 380,
"exhaustedAt": null,
"seatCap": 3,
"seatsUsed": 1,
"members": 2,
"invited": 1
}Requires
client_workspaces:manage. Requires the master of an active personal (agency) workspace. A key created in a client workspace, or by a non-master, cannot use the client workspace endpoints. If the personal workspace becomes inactive, its keys lose client workspace access.
creditMode: "NONE"removes the credit limit.creditMode: "MONTHLY"needsmonthlyLimit, the credits allowed per billing cycle.creditMode: "FIXED"needsbudgetRemaining.seatCap: a number sets the cap,nullremoves it, and leaving it out keeps the current cap.
creditMode to change only the seat cap.
budgetRemaining is absolute
budgetRemaining means “this client now has exactly N credits left”, not “add N”. Sending the same request twice leaves the same balance, so a billing sync can retry it safely. To add credits, use Top Up Client Workspace.
Lowering a seat cap below the senders already connected does not disconnect anyone; it stops new senders from connecting until the count is under the cap. The body rejects unknown properties with 400.Authorizations
Body
application/json