---
title: "Open an agent session"
method: POST
path: "/v1/sessions"
tags: ["sessions"]
---

# Open an agent session

`POST /v1/sessions`

## Request

- Base URL: `https://api.typenode.ai`
- URL: `https://api.typenode.ai/v1/sessions`
- Auth: HTTP bearer

## Request body

- CreateSession
  - `ai_agent_id` string, uuid, required
  - `backend_type` 'agents-sdk'
  - `current_workflow_id` string, uuid
  - `workflow_id` string, uuid

## Response `201`

The created session.

- Session
  - `ai_agent_id` string, uuid, required
  - `cost_usd_total` number, required
  - `created_at` string, date-time, required
  - `current_workflow_id` string, uuid, nullable, required
  - `id` string, uuid, required
  - `last_message_at` string, date-time, nullable, required
  - `last_turn_status` string, nullable, required
  - `title` string, required
  - `updated_at` string, date-time, required
  - `workflow_id` string, uuid, nullable, required

## Other responses

- `401`: Authentication required.
- `default`: An error occurred (RFC 9457 problem+json).

---

[API](https://skmtc.dev/typenode/apis/typenode-management-api.md) · [All operations](https://skmtc.dev/typenode/apis/typenode-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/typenode/apis/typenode-management-api/revisions/9b943024aa98?raw)
