MetorialDocs

Portal Access

Manage which consumer groups can access portal provider templates and MCP servers.

The Portal Access object

portal_access.json
{
  "object": "consumer.access",
  "id": "example_id",
  "access_level": "read",
  "name": "example_name",
  "description": "example_description",
  "readme": "example_readme",
  "listing": {
    "id": "example_id",
    "name": "example_name",
    "description": "example_description"
  },
  "access": {
    "type": "provider_template",
    "provider_template": {
      "object": "provider.template#preview",
      "id": "example_id",
      "status": "active",
      "name": "example_name",
      "description": "example_description",
      "metadata": {},
      "integration_id": "example_integration_id",
      "created_at": "2026-09-11T20:30:32.788Z",
      "updated_at": "2026-09-11T20:30:32.788Z"
    }
  },
  "consumer_group": {
    "object": "consumer.group",
    "id": "example_id",
    "status": "active",
    "name": "example_name",
    "description": "example_description",
    "is_default": false,
    "created_at": "2026-09-11T20:30:32.789Z",
    "updated_at": "2026-09-11T20:30:32.789Z"
  },
  "created_at": "2026-09-11T20:30:32.789Z",
  "updated_at": "2026-09-11T20:30:32.789Z"
}
object"consumer.access"required
idstringrequired
access_level"read" | "manage"requirednullable
namestringrequired
descriptionstringrequirednullable
readmestringrequirednullable
created_atdaterequired
updated_atdaterequired

Endpoints

List portal access

GET/portals/:portal_id/access

Returns a paginated list of consumer access rules for a portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

Query parameters

searchstringoptional
consumer_group_idstring or string[]optional
provider_template_idstring or string[]optional
magic_mcp_server_idstring or string[]optional
skill_idstring or string[]optional
skill_template_idstring or string[]optional
skill_group_idstring or string[]optional
skill_marketplace_idstring or string[]optional
skill_plugin_idstring or string[]optional
consumer_access_listing_idstring or string[]optional
type"provider_template" | "magic_mcp_server" | "skill" | "skill_template" | "skill_group" | "skill_marketplace" | "skill_plugin" or "provider_template" | "magic_mcp_server" | "skill" | "skill_template" | "skill_group" | "skill_marketplace" | "skill_plugin"[]optional

Example request

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

Get portal access

GET/portals/:portal_id/access/:access_id

Retrieves a portal access rule by ID.

Path parameters

portal_idstringrequired

The unique identifier for the portal

access_idstringrequired

The unique identifier for the access

Example request

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

Create portal access

POST/portals/:portal_id/access

Creates a new consumer access rule for the portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

Request body

consumer_group_idstringrequired
namestringoptional
descriptionstringoptionalnullable
readmestringoptionalnullable

Example request

curl -X POST "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/access" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "consumer_group_id": "example_consumer_group_id",
  "name": "example_name",
  "description": "example_description",
  "readme": "example_readme",
  "access": {
    "type": "provider_template",
    "provider_template_id": "example_provider_template_id"
  }
}'

Update portal access

PATCH/portals/:portal_id/access/:access_id

Updates the shared listing fields for a portal access rule.

Path parameters

portal_idstringrequired

The unique identifier for the portal

access_idstringrequired

The unique identifier for the access

Request body

namestringoptional
descriptionstringoptionalnullable
readmestringoptionalnullable

Example request

curl -X PATCH "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/access/acc_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "example_name",
  "description": "example_description",
  "readme": "example_readme"
}'

Delete portal access

DELETE/portals/:portal_id/access/:access_id

Deletes a consumer access rule from the portal.

Path parameters

portal_idstringrequired

The unique identifier for the portal

access_idstringrequired

The unique identifier for the access

Example request

curl -X DELETE "https://api.metorial.com/portals/por_Rm4Mnheq2bfEPhBhP7SY/access/acc_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."