Skip to main content
POST
http://localhost:3000
/
tag-group-bindings
curl -X POST 'https://api.example.com/tag-group-bindings' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "tagGroupId": "tag_group_departments",
    "modelType": "subject"
  }'
{
  "id": "tag_binding_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
  "tagGroupId": "tag_group_departments",
  "modelType": "subject",
  "modelId": null
}

Request Body

id
string
Optional client-provided ID. Format: tag_binding_{uuidv7}
tagGroupId
string
required
ID of the tag group to bind
modelType
string
required
Type of model to bind to. One of: resource, resource_type, subject, role, permission
modelId
string
Optional specific model ID. If omitted, binding applies to all models of the specified type.

Response

Returns the created tag group binding object.
curl -X POST 'https://api.example.com/tag-group-bindings' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "tagGroupId": "tag_group_departments",
    "modelType": "subject"
  }'
{
  "id": "tag_binding_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
  "tagGroupId": "tag_group_departments",
  "modelType": "subject",
  "modelId": null
}

Examples

Bind to All Resources

curl -X POST 'https://api.example.com/tag-group-bindings' \
  -d '{
    "tagGroupId": "tag_group_sensitivity",
    "modelType": "resource"
  }'

Bind to Specific Resource Type

curl -X POST 'https://api.example.com/tag-group-bindings' \
  -d '{
    "tagGroupId": "tag_group_sensitivity",
    "modelType": "resource_type",
    "modelId": "resource_type_document"
  }'