Create a host group (the unit policy and enrollment tokens target hosts by).
POST
Secret API key operationId: create_host_group/v1/os/host-groups Authorization
Server-to-server. Send a secret key as a Bearer token plus the x-application-id header.
Request body · required
descriptionstringnamestring required
Responses
201 Created
{
"data": {
"created_at": "2026-01-15T09:30:00Z",
"description": "string",
"id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
"name": "string",
"updated_at": "2026-01-15T09:30:00Z"
},
"error": {
"code": "string",
"message": "string"
},
"meta": {
"timestamp": "string"
},
"success": false
} 409 Name already exists
422 Invalid request
Request
curl -X POST "https://api.identrahq.com/v1/os/host-groups" \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"name": "bastions"
}'Try it
live requestPOST
https://api.identrahq.com/v1/os/host-groups