Sessions

Update session

Updates a session.

patch/sessions/{session_id}

Request

  • Base URL
    https://api.metorial.com
  • Auth
    HTTP bearer

Path parameters

session_idstring required

Unique identifier of the session.

Headers

Metorial-Versionstring
Example:2025-01-01

Pin the dated API version for this request, e.g. 2025-01-01. Defaults to the version configured for the environment.

Request body

namestring
descriptionstring
metadataobject

Custom key-value pairs for storing additional information

Example request

{
  "name": "My updated session",
  "description": "Updated session description"
}

Response

Successful response

object'session' required

String representing the object's type

idstring required

Unique session identifier

status'active' | 'archived' | 'deleted' required

Session status

namestring nullable required

Display name

descriptionstring nullable required

Description

metadataobject nullable required

Custom key-value pairs for storing additional information

connection_state'connected' | 'disconnected' required

Session connection state

connection_urlstring required

MCP connection URL for this session

client_secretstring nullable required

Session-scoped fine grained client secret token

from_template_idsstring[] required

Template IDs this session was created from

has_errorsboolean required

Whether the session has any errors

has_warningsboolean required

Whether the session has any warnings

identity_actor_idstring nullable required
identity_idstring nullable required
created_atstring date-time required

Timestamp when created

updated_atstring date-time required

Timestamp when last updated

Example response

{
  "id": "ses_4dEfGhJkLmNpQrSt",
  "name": "Production Session",
  "description": "Session for production environment",
  "connection_url": "https://mcp.metorial.com/mcp/ses_4dEfGhJkLmNpQrSt",
  "client_secret": "metorial_fk_4eC39HqLyjWDarjtT1zdp7dc",
  "providers": [
    {
      "id": "spr_3cDeFgHjKlMnPqRs",
      "provider_id": "pro_5gHjKlMnPqRsTuVw",
      "session_id": "ses_4dEfGhJkLmNpQrSt",
      "from_template_id": "stm_2bCdEfGhJkLmNpQr",
      "from_template_provider_id": "stp_3cDeFgHjKlMnPqRs",
      "deployment": {
        "id": "pde_1aBcDeFgHjKlMnPq",
        "name": "Production",
        "description": "Production deployment",
        "provider_id": "pro_5gHjKlMnPqRsTuVw",
        "created_at": "2025-09-15T10:30:00.000Z",
        "updated_at": "2026-01-10T14:45:00.000Z"
      },
      "config": {
        "id": "pcf_7dEfGhJkLmNpQrSt",
        "name": "Production Config",
        "description": "Configuration for production environment",
        "provider_id": "pro_5gHjKlMnPqRsTuVw",
        "created_at": "2025-09-15T10:30:00.000Z",
        "updated_at": "2026-01-10T14:45:00.000Z"
      },
      "created_at": "2025-09-15T10:30:00.000Z",
      "updated_at": "2026-01-10T14:45:00.000Z"
    }
  ],
  "created_at": "2025-09-15T10:30:00.000Z",
  "updated_at": "2026-01-10T14:45:00.000Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.