Consumer Providers

Browse and configure portal providers from the consumer side.

Consumer Providers object

Attributes

object

String

id

String

name

String

description

StringNullable

index

Number

created_at

Date

updated_at

Date
{
"object": "consumer.surface.provider_group"
}

List consumer provider groups

Returns the ordered provider groups for the current consumer surface.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional
GEThttp://api.metorial.com/consumer/providers/groups
curl -X GET "https://api.metorial.com/consumer/providers/groups" \
-H "Authorization: Bearer metorial_sk_..."

Get portal OAuth client

Returns one portal OAuth client visible to the current portal consumer.

URL Parameters

portal_auth_client_id

String

The unique identifier for the portal_auth_client

GEThttp://api.metorial.com/consumer/portal-oauth-clients/:portal_auth_client_id
curl -X GET "https://api.metorial.com/consumer/portal-oauth-clients/por_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Get portal OAuth authorization

Returns the current portal OAuth authorization request for the active consumer.

URL Parameters

portal_auth_attempt_id

String

The unique identifier for the portal_auth_attempt

GEThttp://api.metorial.com/consumer/portal-oauth-attempts/:portal_auth_attempt_id
curl -X GET "https://api.metorial.com/consumer/portal-oauth-attempts/por_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Accept portal OAuth authorization

Approves a pending portal OAuth authorization request and returns the redirect URL.

URL Parameters

portal_auth_attempt_id

String

The unique identifier for the portal_auth_attempt

POSThttp://api.metorial.com/consumer/portal-oauth-attempts/:portal_auth_attempt_id/accept
curl -X POST "https://api.metorial.com/consumer/portal-oauth-attempts/por_Rm4Mnheq2bfEPhBhP7SY/accept" \
-H "Authorization: Bearer metorial_sk_..."

Connect portal OAuth authorization to magic MCP endpoint

Links a pending portal OAuth authorization request to a consumer-owned magic MCP endpoint.

URL Parameters

portal_auth_attempt_id

String

The unique identifier for the portal_auth_attempt

Request Body

magic_mcp_endpoint_id

String
POSThttp://api.metorial.com/consumer/portal-oauth-attempts/:portal_auth_attempt_id/connect-magic-mcp-endpoint
curl -X POST "https://api.metorial.com/consumer/portal-oauth-attempts/por_Rm4Mnheq2bfEPhBhP7SY/connect-magic-mcp-endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"magic_mcp_endpoint_id": "example_magic_mcp_endpoint_id"
}'

Reject portal OAuth authorization

Rejects a pending portal OAuth authorization request and returns the redirect URL.

URL Parameters

portal_auth_attempt_id

String

The unique identifier for the portal_auth_attempt

POSThttp://api.metorial.com/consumer/portal-oauth-attempts/:portal_auth_attempt_id/reject
curl -X POST "https://api.metorial.com/consumer/portal-oauth-attempts/por_Rm4Mnheq2bfEPhBhP7SY/reject" \
-H "Authorization: Bearer metorial_sk_..."

List consumer providers

Returns the unified portal catalog with consumer availability.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

search

StringOptional

provider_group_id

StringOptional
GEThttp://api.metorial.com/consumer/providers
curl -X GET "https://api.metorial.com/consumer/providers" \
-H "Authorization: Bearer metorial_sk_..."

Get consumer provider

Returns one portal catalog item with any available setup capability data.

URL Parameters

catalog_item_id

String

The unique identifier for the catalog_item

GEThttp://api.metorial.com/consumer/providers/:catalog_item_id
curl -X GET "https://api.metorial.com/consumer/providers/cat_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Request consumer provider access

Creates an access request for a portal catalog item.

URL Parameters

catalog_item_id

String

The unique identifier for the catalog_item

Request Body

message

StringOptional

metadata

ObjectOptional

A key-value map

POSThttp://api.metorial.com/consumer/providers/:catalog_item_id/request-access
curl -X POST "https://api.metorial.com/consumer/providers/cat_Rm4Mnheq2bfEPhBhP7SY/request-access" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"message": "example_message",
"metadata": {}
}'

Start consumer provider setup

Starts an OAuth setup flow for a portal provider template.

URL Parameters

catalog_item_id

String

The unique identifier for the catalog_item

Request Body

provider_auth_method_id

StringOptional
POSThttp://api.metorial.com/consumer/providers/:catalog_item_id/setup
curl -X POST "https://api.metorial.com/consumer/providers/cat_Rm4Mnheq2bfEPhBhP7SY/setup" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"provider_auth_method_id": "example_provider_auth_method_id"
}'

Get consumer provider setup

Reads the status of an OAuth setup flow for a portal provider template.

URL Parameters

catalog_item_id

String

The unique identifier for the catalog_item

provider_setup_session_id

String

The unique identifier for the provider_setup_session

GEThttp://api.metorial.com/consumer/providers/:catalog_item_id/setup/:provider_setup_session_id
curl -X GET "https://api.metorial.com/consumer/providers/cat_Rm4Mnheq2bfEPhBhP7SY/setup/pro_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Deploy consumer provider

Creates an owned Magic MCP server from a portal provider template.

URL Parameters

catalog_item_id

String

The unique identifier for the catalog_item

Request Body

name

StringOptional

description

StringOptional

metadata

ObjectOptional

A key-value map

config

ObjectOptional

A key-value map

auth

ObjectOptional
POSThttp://api.metorial.com/consumer/providers/:catalog_item_id/deploy
curl -X POST "https://api.metorial.com/consumer/providers/cat_Rm4Mnheq2bfEPhBhP7SY/deploy" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"metadata": {},
"config": {},
"auth": {
"type": "example_type",
"provider_setup_session_id": "example_provider_setup_session_id"
}
}'