MetorialDocs

Portal Consumer Profiles

Manage the consumers and effective group assignments for a portal.

The Portal Consumer Profile object

portal_consumer_profile.json
{
  "object": "consumer.profile",
  "id": "example_id",
  "name": "example_name",
  "email": "example_email",
  "image_url": "example_image_url",
  "consumer_id": "example_consumer_id",
  "user_id": "example_user_id",
  "status": "active",
  "created_at": "2026-10-17T09:50:02.685Z",
  "updated_at": "2026-10-17T09:50:02.685Z",
  "groups": [
    {
      "object": "consumer.profile.group_assignment",
      "group": {
        "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"
      },
      "assigned_via": "default"
    }
  ]
}
object"consumer.profile"required
idstringrequired
namestringrequired
emailstringrequired
image_urlstringrequired
consumer_idstringrequired
user_idstringrequirednullable
status"active" | "invited"required
created_atdaterequired
updated_atdaterequired

Endpoints

List portal consumer profiles

GET/portals/:portal_id/consumer-profile

Returns a paginated list of consumer profiles for a portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

Query parameters

searchstringoptional
emailstring or string[]optional
consumer_group_idstringoptional
status"active" | "invited" or "active" | "invited"[]optional

Example request

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

Get portal consumer profile

GET/portals/:portal_id/consumer-profile/:consumer_profile_id

Retrieves a portal consumer profile by ID.

Path parameters

portal_idstringrequired

The unique identifier for the portal

consumer_profile_idstringrequired

The unique identifier for the consumer_profile

Example request

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

Create portal consumer profile

POST/portals/:portal_id/consumer-profile

Creates a new portal consumer profile.

Path parameters

portal_idstringrequired

The unique identifier for the portal

Request body

emailstringrequired
namestringrequired

Example request

curl -X POST "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-profile" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "email": "example_email",
  "name": "example_name"
}'

Delete portal consumer profile

DELETE/portals/:portal_id/consumer-profile/:consumer_profile_id

Soft-deletes a portal consumer profile.

Path parameters

portal_idstringrequired

The unique identifier for the portal

consumer_profile_idstringrequired

The unique identifier for the consumer_profile

Example request

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

Assign portal consumer profile groups

POST/portals/:portal_id/consumer-profile/:consumer_profile_id/assign-groups

Assigns one or more groups to a portal consumer profile.

Path parameters

portal_idstringrequired

The unique identifier for the portal

consumer_profile_idstringrequired

The unique identifier for the consumer_profile

Request body

group_idsstring[]required

Example request

curl -X POST "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-profile/con_Rm4Mnheq2bfEPhBhP7SY/assign-groups" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "group_ids": [
    "example_group_ids"
  ]
}'

Unassign portal consumer profile groups

POST/portals/:portal_id/consumer-profile/:consumer_profile_id/unassign-groups

Removes one or more groups from a portal consumer profile.

Path parameters

portal_idstringrequired

The unique identifier for the portal

consumer_profile_idstringrequired

The unique identifier for the consumer_profile

Request body

group_idsstring[]required

Example request

curl -X POST "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/consumer-profile/con_Rm4Mnheq2bfEPhBhP7SY/unassign-groups" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "group_ids": [
    "example_group_ids"
  ]
}'