---
title: "Create a new session"
method: POST
path: "/v2/agents/{agentId}/sessions"
tags: ["Agents Sessions V2"]
---

# Create a new session

`POST /v2/agents/{agentId}/sessions`

Creates a new streaming session for an Expressive Agent and returns the credentials needed to connect to the room.

## Path parameters

- `agentId` string, required

## Request body

- InitSessionV2Request
  - `chat_persist` boolean — whether to persist the chat

## Response `201`

Created session

- InitSessionV2Response
  - `id` string, required — Session ID for the session
  - `session_url` string, required — Session URL for connecting to the session
  - `session_token` string, required — Session token for authentication
  - `interrupt_enabled` boolean, required — Whether interrupt is enabled for this session

## Other responses

- `400` — BadRequest
- `401` — AuthorizationError
- `404` — NotFound

---

[API](https://skmtc.net/d-id/apis/realtime-endpoints.md) · [All operations](https://skmtc.net/d-id/apis/realtime-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/d-id/realtime-endpoints/revisions/2f2425e1b6b6/schema)
