MetorialDocs

Session Template Providers

Session template providers define which providers should be included when a session is created from a template.

The Session Template Provider object

session_template_provider.json
{
  "object": "session.template.provider",
  "id": "stp_3cDeFgHjKlMnPqRs",
  "status": "active",
  "tool_filter": {
    "type": "allow_all",
    "ignore_parent_filters": false
  },
  "provider_id": "pro_5gHjKlMnPqRsTuVw",
  "session_template_id": "stm_2bCdEfGhJkLmNpQr",
  "deployment": {
    "object": "provider.deployment#preview",
    "id": "pde_1aBcDeFgHjKlMnPq",
    "is_default": false,
    "name": "Production",
    "description": "Production deployment",
    "metadata": {},
    "provider_id": "pro_5gHjKlMnPqRsTuVw",
    "created_at": "2025-09-15T10:30:00.000Z",
    "updated_at": "2026-01-10T14:45:00.000Z"
  },
  "config": {
    "object": "provider.config#preview",
    "id": "pcf_7dEfGhJkLmNpQrSt",
    "is_default": false,
    "name": "Production Config",
    "description": "Configuration for production environment",
    "metadata": {},
    "provider_id": "pro_5gHjKlMnPqRsTuVw",
    "created_at": "2025-09-15T10:30:00.000Z",
    "updated_at": "2026-01-10T14:45:00.000Z"
  },
  "auth_config": {
    "object": "provider.auth_config#preview",
    "id": "example_id"
  },
  "created_at": "2025-09-15T10:30:00.000Z",
  "updated_at": "2026-01-10T14:45:00.000Z"
}
object"session.template.provider"required
idstringrequired
status"active" | "archived" | "deleted"required
provider_idstringrequired
session_template_idstringrequired
created_atdaterequired
updated_atdaterequired

Endpoints

List session template providers

GET/session-template-providers

Returns a paginated list of providers configured for a session template.

Query parameters

status"active" | "archived" or "active" | "archived"[]optional
idstring or string[]optional

Filter by session template provider ID(s)

session_template_idstring or string[]optional

Filter by session template ID(s)

provider_idstring or string[]optional

Filter by provider ID(s)

provider_deployment_idstring or string[]optional

Filter by provider deployment ID(s)

provider_config_idstring or string[]optional

Filter by provider config ID(s)

provider_auth_config_idstring or string[]optional

Filter by provider auth config ID(s)

Example request

curl -X GET "https://api.metorial.com/session-template-providers" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Get session template provider

GET/session-template-providers/:session_template_provider_id

Retrieves a specific provider configuration from a session template.

Path parameters

session_template_provider_idstringrequired

The unique identifier for the session_template_provider

Example request

curl -X GET "https://api.metorial.com/session-template-providers/ses_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Create session template provider

POST/session-template-providers

Adds a new provider configuration to a session template.

Request body

session_template_idstringrequired
provider_deployment_idstringoptional
provider_config_idstringoptional
provider_config_vault_idstringoptional
provider_auth_config_idstringoptional

Example request

curl -X POST "https://api.metorial.com/session-template-providers" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "session_template_id": "example_session_template_id",
  "provider_deployment_id": "example_provider_deployment_id",
  "provider_config_id": "example_provider_config_id",
  "provider_config_vault_id": "example_provider_config_vault_id",
  "provider_auth_config_id": "example_provider_auth_config_id",
  "tool_filters": {
    "type": "tool_keys",
    "keys": [
      "example_keys"
    ]
  }
}'

Update session template provider

PATCH/session-template-providers/:session_template_provider_id

Updates a provider configuration in a session template.

Path parameters

session_template_provider_idstringrequired

The unique identifier for the session_template_provider

Request body

Example request

curl -X PATCH "https://api.metorial.com/session-template-providers/ses_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "tool_filters": {
    "type": "tool_keys",
    "keys": [
      "example_keys"
    ]
  }
}'

Delete session template provider

DELETE/session-template-providers/:session_template_provider_id

Removes a provider configuration from a session template.

Path parameters

session_template_provider_idstringrequired

The unique identifier for the session_template_provider

Example request

curl -X DELETE "https://api.metorial.com/session-template-providers/ses_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."