MetorialDocs

Portal Consumer Groups

Manage the consumer groups that drive portal visibility and access rules.

The Portal Consumer Group object

portal_consumer_group.json
{
  "object": "consumer.group",
  "id": "example_id",
  "status": "active",
  "name": "example_name",
  "description": "example_description",
  "is_default": false,
  "created_at": "2026-10-17T09:50:02.685Z",
  "updated_at": "2026-10-17T09:50:02.685Z"
}
object"consumer.group"required
idstringrequired
status"active" | "archived" | "deleted"required
namestringrequired
descriptionstringrequirednullable
is_defaultbooleanrequired
created_atdaterequired
updated_atdaterequired

Endpoints

List portal consumer groups

GET/portals/:portal_id/consumer-groups

Returns a paginated list of consumer groups for a portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

Query parameters

status"active" | "archived" | "deleted" or "active" | "archived" | "deleted"[]optional
searchstringoptional

Example request

curl -X GET "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-groups" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Get portal consumer group

GET/portals/:portal_id/consumer-groups/:consumer_group_id

Retrieves a portal consumer group by ID.

Path parameters

portal_idstringrequired

The unique identifier for the portal

consumer_group_idstringrequired

The unique identifier for the consumer_group

Example request

curl -X GET "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-groups/con_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Create portal consumer group

POST/portals/:portal_id/consumer-groups

Creates a new consumer group for the portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

Request body

namestringrequired
descriptionstringoptional
is_defaultbooleanoptional

Example request

curl -X POST "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-groups" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "example_name",
  "description": "example_description",
  "is_default": false
}'

Update portal consumer group

PATCH/portals/:portal_id/consumer-groups/:consumer_group_id

Updates a consumer group for the portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

consumer_group_idstringrequired

The unique identifier for the consumer_group

Request body

namestringoptional
descriptionstringoptional
is_defaultbooleanoptional

Example request

curl -X PATCH "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-groups/con_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "example_name",
  "description": "example_description",
  "is_default": false
}'

Delete portal consumer group

DELETE/portals/:portal_id/consumer-groups/:consumer_group_id

Archives a consumer group for the portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

consumer_group_idstringrequired

The unique identifier for the consumer_group

Example request

curl -X DELETE "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-groups/con_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."