---
title: "Create Session"
method: POST
path: "/session/create"
---

# Create Session

`POST /session/create`

Create a session for tembo to start working on in the background

## Request body

- union
  - object
    - `prompt` string, required — Description of the session to be performed. Supports tagging files.
    - `description` string — Detailed description of the session (alternative to prompt)
    - `agent` string — The agent to use for this session
    - `repositories` string[] — Array of code repository urls that this session relates to
    - `codeRepoIds` string[] — Array of Tembo code repository IDs to target directly
    - `targetBranch` string, nullable — The branch to open the pull request against (e.g. main, develop)
    - `branchName` string, nullable — The branch name to use for the work
    - `queueRightAway` boolean, nullable — Whether to immediately queue the session for processing (optional, defaults to true)
  - object
    - `prompt` string — Description of the session to be performed. Supports tagging files.
    - `description` string, required — Detailed description of the session (alternative to prompt)
    - `agent` string — The agent to use for this session
    - `repositories` string[] — Array of code repository urls that this session relates to
    - `codeRepoIds` string[] — Array of Tembo code repository IDs to target directly
    - `targetBranch` string, nullable — The branch to open the pull request against (e.g. main, develop)
    - `branchName` string, nullable — The branch name to use for the work
    - `queueRightAway` boolean, nullable — Whether to immediately queue the session for processing (optional, defaults to true)

## Response `200`

Session created successfully

- object
  - `id` string, uuid, required
  - `title` string, required
  - `description` string, required
  - `status` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `organizationId` string, uuid, required
  - `htmlUrl` string, uri, required — URL to view this session in the Tembo web application

## Other responses

- `400` — Bad request - invalid input or missing organization ID
- `500` — Internal server error

---

[API](https://skmtc.dev/tembo/apis/developer-api.md) · [All operations](https://skmtc.dev/tembo/apis/developer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tembo/developer-api/revisions/d3b5f4d6e911/schema)
