curl --request PUT \
--url https://api.stigg.io/api/v1/customers/{id}/entities/entitlements \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"entityEntitlements": [
{
"entityId": "workspace-001",
"featureId": "compute-minutes",
"usageLimit": 1000,
"cadence": "P1M"
},
{
"entityId": "workspace-002",
"currencyId": "cred-type-tokens",
"usageLimit": 2000,
"cadence": "P1M",
"parentId": "workspace-001",
"scopeEntityIds": [
"user-1"
]
}
]
}
'import requests
url = "https://api.stigg.io/api/v1/customers/{id}/entities/entitlements"
payload = { "entityEntitlements": [
{
"entityId": "workspace-001",
"featureId": "compute-minutes",
"usageLimit": 1000,
"cadence": "P1M"
},
{
"entityId": "workspace-002",
"currencyId": "cred-type-tokens",
"usageLimit": 2000,
"cadence": "P1M",
"parentId": "workspace-001",
"scopeEntityIds": ["user-1"]
}
] }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityEntitlements: [
{
entityId: 'workspace-001',
featureId: 'compute-minutes',
usageLimit: 1000,
cadence: 'P1M'
},
{
entityId: 'workspace-002',
currencyId: 'cred-type-tokens',
usageLimit: 2000,
cadence: 'P1M',
parentId: 'workspace-001',
scopeEntityIds: ['user-1']
}
]
})
};
fetch('https://api.stigg.io/api/v1/customers/{id}/entities/entitlements', 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.stigg.io/api/v1/customers/{id}/entities/entitlements",
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([
'entityEntitlements' => [
[
'entityId' => 'workspace-001',
'featureId' => 'compute-minutes',
'usageLimit' => 1000,
'cadence' => 'P1M'
],
[
'entityId' => 'workspace-002',
'currencyId' => 'cred-type-tokens',
'usageLimit' => 2000,
'cadence' => 'P1M',
'parentId' => 'workspace-001',
'scopeEntityIds' => [
'user-1'
]
]
]
]),
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.stigg.io/api/v1/customers/{id}/entities/entitlements"
payload := strings.NewReader("{\n \"entityEntitlements\": [\n {\n \"entityId\": \"workspace-001\",\n \"featureId\": \"compute-minutes\",\n \"usageLimit\": 1000,\n \"cadence\": \"P1M\"\n },\n {\n \"entityId\": \"workspace-002\",\n \"currencyId\": \"cred-type-tokens\",\n \"usageLimit\": 2000,\n \"cadence\": \"P1M\",\n \"parentId\": \"workspace-001\",\n \"scopeEntityIds\": [\n \"user-1\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.stigg.io/api/v1/customers/{id}/entities/entitlements")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entityEntitlements\": [\n {\n \"entityId\": \"workspace-001\",\n \"featureId\": \"compute-minutes\",\n \"usageLimit\": 1000,\n \"cadence\": \"P1M\"\n },\n {\n \"entityId\": \"workspace-002\",\n \"currencyId\": \"cred-type-tokens\",\n \"usageLimit\": 2000,\n \"cadence\": \"P1M\",\n \"parentId\": \"workspace-001\",\n \"scopeEntityIds\": [\n \"user-1\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stigg.io/api/v1/customers/{id}/entities/entitlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityEntitlements\": [\n {\n \"entityId\": \"workspace-001\",\n \"featureId\": \"compute-minutes\",\n \"usageLimit\": 1000,\n \"cadence\": \"P1M\"\n },\n {\n \"entityId\": \"workspace-002\",\n \"currencyId\": \"cred-type-tokens\",\n \"usageLimit\": 2000,\n \"cadence\": \"P1M\",\n \"parentId\": \"workspace-001\",\n \"scopeEntityIds\": [\n \"user-1\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6f6b9c39-3a14-4a5e-9c6c-2a4f8d8d2f3f",
"entityId": "workspace-001",
"featureId": "feature-compute-minutes",
"scopeEntityIds": [],
"parentId": null,
"usageLimit": 1000,
"cadence": "P1M",
"createdAt": "2026-05-18T10:00:00.000Z",
"updatedAt": "2026-05-18T10:00:00.000Z"
}
]
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "CustomerNotFound"
}{
"message": "<string>",
"code": "DuplicatedEntityNotAllowed"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Upsert entity entitlements
Batched create-or-update of entity entitlements. Existing entity entitlements matched by (entityId, featureId or currencyId, scopeEntityIds) are updated; new ones are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required.
curl --request PUT \
--url https://api.stigg.io/api/v1/customers/{id}/entities/entitlements \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"entityEntitlements": [
{
"entityId": "workspace-001",
"featureId": "compute-minutes",
"usageLimit": 1000,
"cadence": "P1M"
},
{
"entityId": "workspace-002",
"currencyId": "cred-type-tokens",
"usageLimit": 2000,
"cadence": "P1M",
"parentId": "workspace-001",
"scopeEntityIds": [
"user-1"
]
}
]
}
'import requests
url = "https://api.stigg.io/api/v1/customers/{id}/entities/entitlements"
payload = { "entityEntitlements": [
{
"entityId": "workspace-001",
"featureId": "compute-minutes",
"usageLimit": 1000,
"cadence": "P1M"
},
{
"entityId": "workspace-002",
"currencyId": "cred-type-tokens",
"usageLimit": 2000,
"cadence": "P1M",
"parentId": "workspace-001",
"scopeEntityIds": ["user-1"]
}
] }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityEntitlements: [
{
entityId: 'workspace-001',
featureId: 'compute-minutes',
usageLimit: 1000,
cadence: 'P1M'
},
{
entityId: 'workspace-002',
currencyId: 'cred-type-tokens',
usageLimit: 2000,
cadence: 'P1M',
parentId: 'workspace-001',
scopeEntityIds: ['user-1']
}
]
})
};
fetch('https://api.stigg.io/api/v1/customers/{id}/entities/entitlements', 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.stigg.io/api/v1/customers/{id}/entities/entitlements",
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([
'entityEntitlements' => [
[
'entityId' => 'workspace-001',
'featureId' => 'compute-minutes',
'usageLimit' => 1000,
'cadence' => 'P1M'
],
[
'entityId' => 'workspace-002',
'currencyId' => 'cred-type-tokens',
'usageLimit' => 2000,
'cadence' => 'P1M',
'parentId' => 'workspace-001',
'scopeEntityIds' => [
'user-1'
]
]
]
]),
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.stigg.io/api/v1/customers/{id}/entities/entitlements"
payload := strings.NewReader("{\n \"entityEntitlements\": [\n {\n \"entityId\": \"workspace-001\",\n \"featureId\": \"compute-minutes\",\n \"usageLimit\": 1000,\n \"cadence\": \"P1M\"\n },\n {\n \"entityId\": \"workspace-002\",\n \"currencyId\": \"cred-type-tokens\",\n \"usageLimit\": 2000,\n \"cadence\": \"P1M\",\n \"parentId\": \"workspace-001\",\n \"scopeEntityIds\": [\n \"user-1\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.stigg.io/api/v1/customers/{id}/entities/entitlements")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entityEntitlements\": [\n {\n \"entityId\": \"workspace-001\",\n \"featureId\": \"compute-minutes\",\n \"usageLimit\": 1000,\n \"cadence\": \"P1M\"\n },\n {\n \"entityId\": \"workspace-002\",\n \"currencyId\": \"cred-type-tokens\",\n \"usageLimit\": 2000,\n \"cadence\": \"P1M\",\n \"parentId\": \"workspace-001\",\n \"scopeEntityIds\": [\n \"user-1\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stigg.io/api/v1/customers/{id}/entities/entitlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityEntitlements\": [\n {\n \"entityId\": \"workspace-001\",\n \"featureId\": \"compute-minutes\",\n \"usageLimit\": 1000,\n \"cadence\": \"P1M\"\n },\n {\n \"entityId\": \"workspace-002\",\n \"currencyId\": \"cred-type-tokens\",\n \"usageLimit\": 2000,\n \"cadence\": \"P1M\",\n \"parentId\": \"workspace-001\",\n \"scopeEntityIds\": [\n \"user-1\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6f6b9c39-3a14-4a5e-9c6c-2a4f8d8d2f3f",
"entityId": "workspace-001",
"featureId": "feature-compute-minutes",
"scopeEntityIds": [],
"parentId": null,
"usageLimit": 1000,
"cadence": "P1M",
"createdAt": "2026-05-18T10:00:00.000Z",
"updatedAt": "2026-05-18T10:00:00.000Z"
}
]
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "CustomerNotFound"
}{
"message": "<string>",
"code": "DuplicatedEntityNotAllowed"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Authorizations
Server API Key
Headers
Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.
Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).
Path Parameters
The customer identifier (owner) the entity entitlements belong to
1 - 255^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$Body
Request body for creating or updating entity entitlements in bulk for a single customer
Entity entitlements to upsert (1–100 per request)
1 - 100 elementsShow child attributes
Show child attributes
Response
Entity entitlements after upsert.
Entity entitlements after upsert.
Show child attributes
Show child attributes