Consumers

Manage instance consumers independently from portals and inspect the profiles linked to each consumer.

Consumers object

Attributes

object

String

id

String

name

String

email

String

created_at

Date

updated_at

Date
{
"object": "consumer"
}

List consumers

Returns a paginated list of consumers for an instance.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

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

Get consumer

Retrieves a consumer by ID.

URL Parameters

consumer_id

String

The unique identifier for the consumer

GEThttp://api.metorial.com/consumers/:consumer_id
curl -X GET "https://api.metorial.com/consumers/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Create consumer

Creates or links a consumer for an instance.

Request Body

name

String

email

String
POSThttp://api.metorial.com/consumers
curl -X POST "https://api.metorial.com/consumers" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"email": "example_email"
}'

Update consumer

Updates a consumer for an instance.

URL Parameters

consumer_id

String

The unique identifier for the consumer

Request Body

name

StringOptional

email

StringOptional
PATCHhttp://api.metorial.com/consumers/:consumer_id
curl -X PATCH "https://api.metorial.com/consumers/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"email": "example_email"
}'

List consumer profiles

Returns a paginated list of profiles for a consumer in an instance.

URL Parameters

consumer_id

String

The unique identifier for the consumer

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional
GEThttp://api.metorial.com/consumers/:consumer_id/profiles
curl -X GET "https://api.metorial.com/consumers/con_Rm4Mnheq2bfEPhBhP7SY/profiles" \
-H "Authorization: Bearer metorial_sk_..."

Get consumer profile

Retrieves a consumer profile by ID for a consumer.

URL Parameters

consumer_id

String

The unique identifier for the consumer

consumer_profile_id

String

The unique identifier for the consumer_profile

GEThttp://api.metorial.com/consumers/:consumer_id/profiles/:consumer_profile_id
curl -X GET "https://api.metorial.com/consumers/con_Rm4Mnheq2bfEPhBhP7SY/profiles/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."