v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBTag Policies
Create a tag policy
Create a new tag policy for the organization. The caller's organization is derived from the authenticated user; cross-organization creation is not supported. Fields such as policy_id, version, and the timestamp/audit fields are assigned by the server.
post/api/v2/tag-policies
Request body
Example request
{
"data": {
"attributes": {
"enabled": true,
"policy_name": "Service tag must be one of api or web",
"policy_type": "surfacing",
"required": true,
"scope": "env",
"source": "logs",
"tag_key": "service",
"tag_value_patterns": [
"api",
"web"
]
},
"type": "tag_policy"
}
}Response
Created
Example response
{
"data": {
"attributes": {
"created_at": "2026-05-21T22:11:06.108696Z",
"created_by": "test-user",
"enabled": true,
"modified_at": "2026-05-21T22:11:06.108696Z",
"modified_by": "test-user",
"policy_name": "Service tag must be one of api or web",
"policy_type": "surfacing",
"required": true,
"scope": "env",
"source": "logs",
"tag_key": "service",
"tag_value_patterns": [
"api",
"web"
],
"version": 1
},
"id": "123",
"relationships": {
"score": {
"data": {
"id": "123-v1-1779315066097-1779401466097",
"type": "tag_policy_score"
}
}
},
"type": "tag_policy"
},
"included": [
{
"attributes": {
"score": 80,
"ts_end": 1779401466097,
"ts_start": 1779315066097,
"version": 1
},
"id": "123-v1-1779315066097-1779401466097",
"type": "tag_policy_score"
}
]
}