Session Providers
Session providers represent the providers that are actively connected to a session. Each session can have multiple providers, and providers can be added or removed during the session lifecycle.
Session Providers object
Attributes
object
StringString representing the object's type
id
StringUnique session provider identifier
name
StringNullableDisplay name
description
StringNullableDescription
status
StringNullableProvider status
metadata
ObjectNullableCustom key-value pairs
session_id
StringParent session ID
provider_id
StringProvider ID
provider_deployment_id
StringNullableProvider deployment ID
created_at
DateTimestamp when created
updated_at
DateTimestamp when last updated
{"object": "session.provider","id": "spr_3cDeFgHjKlMnPqRs","name": "GitHub Provider","description": "Active GitHub provider instance","status": "active","metadata": {"version": "1.0"},"session_id": "ses_4dEfGhJkLmNpQrSt","provider_id": "pro_5gHjKlMnPqRsTuVw","provider_deployment_id": "pde_1aBcDeFgHjKlMnPq","created_at": "2025-09-15T10:30:00.000Z","updated_at": "2026-01-10T14:45:00.000Z"}
List session providers
Returns a paginated list of providers connected to a session.
URL Parameters
session_id
StringThe unique identifier for the session
Query Parameters
limit
NumberOptionalMaximum number of items to return (1-100)
after
StringOptionalReturn items after this ID
before
StringOptionalReturn items before this ID
cursor
StringOptionalPagination cursor from a previous response
order
EnumOptionalSort order for results
provider_id
UnionOptionalFilter by provider ID(s)
status
StringOptionalFilter by provider status
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/providers" \-H "Authorization: Bearer metorial_sk_..."
Get session provider
Retrieves a specific provider connected to a session.
URL Parameters
session_id
StringThe unique identifier for the session
session_provider_id
StringThe unique identifier for the session_provider
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/providers/ses_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
Create session provider
Adds a new provider to an active session.
URL Parameters
session_id
StringThe unique identifier for the session
Request Body
name
StringOptionaldescription
StringOptionalmetadata
ObjectOptionalCustom key-value pairs
provider_deployment
Objectprovider_config
ObjectOptionalprovider_auth_config
ObjectOptionaltool_filters
ObjectOptionalcurl -X POST "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/providers" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"name": "example_name","description": "example_description","metadata": {},"provider_deployment": {"type": "example_type","provider_deployment_id": "example_provider_deployment_id"},"provider_config": {"type": "example_type","provider_config_id": "example_provider_config_id"},"provider_auth_config": {"type": "example_type","provider_auth_config_id": "example_provider_auth_config_id"},"tool_filters": {"tool_keys": ["example_item"]}}'
Update session provider
Updates a provider connected to a session.
URL Parameters
session_id
StringThe unique identifier for the session
session_provider_id
StringThe unique identifier for the session_provider
Request Body
name
StringOptionaldescription
StringOptionalmetadata
ObjectOptionalCustom key-value pairs
curl -X PATCH "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/providers/ses_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"name": "example_name","description": "example_description","metadata": {}}'
Delete session provider
Removes a provider from a session.
URL Parameters
session_id
StringThe unique identifier for the session
session_provider_id
StringThe unique identifier for the session_provider
curl -X DELETE "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/providers/ses_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."