***

title: getSessionMetadata
slug: /reference/typescript/agents/configuration/session-manager/get-session-metadata
description: Retrieve metadata associated with a session.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Retrieve metadata associated with a session.

## **Parameters**

<ParamField path="sessionId" type="string" required={true} toc={true}>
  The session identifier.
</ParamField>

## **Returns**

`Record<string, unknown> | undefined` -- The metadata record, or `undefined`
if no metadata exists for this session.

## **Example**

```typescript {6}
import { SessionManager } from '@signalwire/sdk';

const sm = new SessionManager();
sm.setSessionMetadata('session-1', { caller: 'John', topic: 'billing' });

const meta = sm.getSessionMetadata('session-1');
console.log(meta); // { caller: "John", topic: "billing" }
```