Skip to main content
POST
/
api
/
v1
/
groups
/
Create a new group
curl --request POST \
  --url https://services.pref.rio/heimdall-admin/api/v1/groups/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Engineering team with access to development resources",
  "name": "engineering_team:backend"
}'
{
  "id": 1,
  "name": "engineering_team:backend",
  "description": "Engineering team with access to development resources",
  "created_by": "12345678901",
  "created_at": "2024-01-15T10:30:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for creating a new group.

name
string
required

Unique name for the group (lowercase letters, numbers, underscores, and colons only)

Required string length: 1 - 100
Example:

"engineering_team:backend"

description
string
required

Human-readable description of the group's purpose

Required string length: 1 - 500
Example:

"Engineering team with access to development resources"

Response

Group created successfully

Response model for group information.

id
integer
required

Unique identifier for the group

Example:

1

name
string
required

Group name

Example:

"engineering_team:backend"

description
string
required

Group description

Example:

"Engineering team with access to development resources"

created_at
string
required

ISO timestamp when the group was created

Example:

"2024-01-15T10:30:00Z"

created_by
string | null

CPF of the user who created this group

Example:

"12345678901"