Security policies

Conditional access. A policy either requires two-step sign-in or blocks sign-in, for everyone or for chosen people and groups, optionally only from (or except from) named locations — lists of countries and IP ranges. Also the session length (how long people stay signed in).

MethodPathSummary
PATCH/v1/admin/tenant/session-policySet how long people stay signed in
GET/v1/admin/tenant/security-policiesList the tenant's Conditional Access-style security policies
POST/v1/admin/tenant/security-policiesCreate a security policy
PATCH/v1/admin/tenant/security-policies/:idUpdate a security policy
DELETE/v1/admin/tenant/security-policies/:idDelete a security policy
POST/v1/admin/tenant/security-policies/:id/subjectsAdd an include/exclude subject (user or group) to a security policy
DELETE/v1/admin/tenant/security-policies/:id/subjects/:subjectRowIdRemove a subject entry from a security policy
POST/v1/admin/tenant/security-policies/:id/locationsAdd an include/exclude named-location condition to a security policy
DELETE/v1/admin/tenant/security-policies/:id/locations/:locationRowIdRemove a location condition from a security policy
GET/v1/admin/tenant/named-locationsList the tenant's named locations
POST/v1/admin/tenant/named-locationsCreate a named location
PATCH/v1/admin/tenant/named-locations/:idRename/update a named location
DELETE/v1/admin/tenant/named-locations/:idDelete a named location
POST/v1/admin/tenant/named-locations/:id/entriesAdd a country or CIDR match entry to a named location
DELETE/v1/admin/tenant/named-locations/:id/entries/:entryIdRemove a match entry from a named location

#Set how long people stay signed in

PATCH/v1/admin/tenant/session-policy

Set the tenant's login session TTL. Requires the GLOBAL_ADMIN role. session_ttl_days must be an integer between 1 and 90, or null/empty to reset to the platform default (7 days).

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/session-policy
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Request body JSON

NameTypeDescription
session_ttl_daysintegerDays a sign-in lasts, 1–90. null uses the platform default (7).

Response 200

FieldTypeDescription
successboolean
session_ttl_daysinteger
Example response
JSON
{
  "success": true,
  "session_ttl_days": 1
}

Errors

StatusMessage
400session_ttl_days must be an integer between 1 and 90, or null for the platform default

Example request

Bash
curl -X PATCH 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/session-policy' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"session_ttl_days":1}'

#List the tenant's Conditional Access-style security policies

GET/v1/admin/tenant/security-policies

List the tenant's Conditional Access-style security policies. Requires the GLOBAL_ADMIN role. Each policy includes its include/exclude subjects (users/groups) and named-location conditions.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Response 200

FieldTypeDescription
policiesarray of any
Example response
JSON
{
  "policies": []
}

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Create a security policy

POST/v1/admin/tenant/security-policies

Create a security policy. Requires the GLOBAL_ADMIN role. control must be require_mfa or block; target_scope must be all or specific.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Request body JSON

NameTypeDescription
namerequiredstringA name admins will recognise.
descriptionstringOptional notes.
controlstring: "require_mfa" | "block"require_mfa asks for two-step sign-in; block refuses the sign-in.
target_scopeany: "all" | "specific"all applies to everyone; specific only to the people and groups added as subjects.
applies_to_user_typesarray of anyWhich kinds of account it covers, e.g. ["staff", "guest"].

Response 201

FieldTypeDescription
successboolean
idinteger
Example response
JSON
{
  "success": true,
  "id": 42
}

Errors

StatusMessage
400name is required
400control must be 'require_mfa' or 'block'
400target_scope must be 'all' or 'specific'

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example name","description":"string","control":"require_mfa","target_scope":"all","applies_to_user_types":[]}'

#Update a security policy

PATCH/v1/admin/tenant/security-policies/:id

Update a security policy. Requires the GLOBAL_ADMIN role. All fields optional; omitted fields keep their existing value.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
namestring
descriptionstring
enabledboolean
controlstring: "require_mfa" | "block"
target_scopestring: "all" | "specific"
applies_to_user_typesarray of any

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
400control must be 'require_mfa' or 'block'
400target_scope must be 'all' or 'specific'
404Policy not found

Example request

Bash
curl -X PATCH 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example name","description":"string","enabled":true,"control":"require_mfa","target_scope":"all","applies_to_user_types":[]}'

#Delete a security policy

DELETE/v1/admin/tenant/security-policies/:id

Delete a security policy. Requires the GLOBAL_ADMIN role. Cascades to the policy's subject and location rows in a transaction.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Policy not found

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Add an include/exclude subject (user or group) to a security policy

POST/v1/admin/tenant/security-policies/:id/subjects

Add an include/exclude subject (user or group) to a security policy. Requires the GLOBAL_ADMIN role. Validates that the subject belongs to the caller's tenant before adding it.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/subjects
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
modestring: "include" | "exclude"include applies the policy to them; exclude exempts them.
subject_typestring: "user" | "group"user or group.
subject_idrequiredintegerThe person's or group's id.

Response 201

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
400mode must be 'include' or 'exclude'
400subject_type ('user'|'group') and subject_id are required
400User not found on this tenant
400Group not found on this tenant
404Policy not found

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"include","subject_type":"user","subject_id":7}'

#Remove a subject entry from a security policy

DELETE/v1/admin/tenant/security-policies/:id/subjects/:subjectRowId

Remove a subject entry from a security policy. Requires the GLOBAL_ADMIN role.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/subjects/:subjectRowId
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger
subjectRowIdrequiredinteger

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Policy not found
404Subject entry not found

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects/1' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Add an include/exclude named-location condition to a security policy

POST/v1/admin/tenant/security-policies/:id/locations

Add an include/exclude named-location condition to a security policy. Requires the GLOBAL_ADMIN role. Validates the named location belongs to the caller's tenant.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/locations
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
modestring: "include" | "exclude"include: only sign-ins from this location; exclude: everywhere except it.
named_location_idrequiredintegerA named location's id.

Response 201

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
400mode must be 'include' or 'exclude'
400named_location_id is required
400Named location not found on this tenant
404Policy not found

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"include","named_location_id":7}'

#Remove a location condition from a security policy

DELETE/v1/admin/tenant/security-policies/:id/locations/:locationRowId

Remove a location condition from a security policy. Requires the GLOBAL_ADMIN role.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/locations/:locationRowId
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger
locationRowIdrequiredinteger

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Policy not found
404Location entry not found

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations/1' \
  -H "X-API-Key: $BRAMBLE_KEY"

#List the tenant's named locations

GET/v1/admin/tenant/named-locations

List the tenant's named locations. Requires the GLOBAL_ADMIN role. Each location includes its country/CIDR match entries.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Response 200

FieldTypeDescription
locationsarray of any
Example response
JSON
{
  "locations": []
}

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Create a named location

POST/v1/admin/tenant/named-locations

Create a named location. Requires the GLOBAL_ADMIN role. name is required.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Request body JSON

NameTypeDescription
namerequiredstring
descriptionstring

Response 201

FieldTypeDescription
successboolean
idinteger
Example response
JSON
{
  "success": true,
  "id": 42
}

Errors

StatusMessage
400name is required

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example name","description":"string"}'

#Rename/update a named location

PATCH/v1/admin/tenant/named-locations/:id

Rename/update a named location. Requires the GLOBAL_ADMIN role. name is required.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
namerequiredstring
descriptionstring

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
400name is required
404Named location not found

Example request

Bash
curl -X PATCH 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example name","description":"string"}'

#Delete a named location

DELETE/v1/admin/tenant/named-locations/:id

Delete a named location. Requires the GLOBAL_ADMIN role. Cascades — any security policy referencing this location loses that condition, and the location's match entries are deleted too.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Named location not found

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Add a country or CIDR match entry to a named location

POST/v1/admin/tenant/named-locations/:id/entries

Add a country or CIDR match entry to a named location. Requires the GLOBAL_ADMIN role. match_type=country requires a 2-letter ISO code; match_type=cidr requires a CIDR range e.g. 203.0.113.0/24.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id/entries
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
match_typestring: "country" | "cidr"country or cidr.
valuestringA two-letter country code (GB) or an IP range (203.0.113.0/24).

Response 201

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
400match_type must be 'country' or 'cidr'
400value must be a 2-letter ISO country code
400value must be a CIDR range, e.g. 203.0.113.0/24
404Named location not found

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_type":"country","value":"string"}'

#Remove a match entry from a named location

DELETE/v1/admin/tenant/named-locations/:id/entries/:entryId

Remove a match entry from a named location. Requires the GLOBAL_ADMIN role.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id/entries/:entryId
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger
entryIdrequiredinteger

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Named location not found
404Entry not found

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries/1' \
  -H "X-API-Key: $BRAMBLE_KEY"