---
title: "Create Chat"
method: POST
path: "/v1/chats"
tags: ["Chats"]
---

# Create Chat

`POST /v1/chats`

Creates a new chat session with the specified agent and sends the initial message. Returns the agent’s reply along with the chatId for subsequent completion, update, and end-session calls.

## Request body

- CreateChatRequest
  - `agentId` string, required — The unique identifier of the Agent assigned to handle the chat completion.
  - `input` string, required — Input message from the customer or conversation history.
  - `dynamicVariables` object — Dynamic key-value pairs required by the selected Agent for personalisation (e.g. customer name, account details).
  - `previousChatId` string — Unique ID of a previous chat session to use as context for this chat.

## Response `201`

Created

- ChatCompletionResponse
  - `chatId` string — Unique identity for a chat
  - `createdAt` string, date-time — The timestamp when the call record was created.
  - `status` 'in_progress' | 'ended' | 'error' — Status of the chat
  - `response` ChatMessage[] — Agent response of the last user message
    - `id` string — Unique identity for a chat message
    - `role` 'user' | 'assistant' — Role of the chat message
    - `type` 'message' — Type of the chat message
    - `content` string[] — Chat message content
  - `agent` AgentResponse — Agent assigned to handle all calls in this campaign. Contains the agent's ID, name, and current status. All contacts in the campaign's contact list will be called using this agent.
    - `name` string — The display name of the assigned agent.
    - `agentId` string — The unique identifier of the agent within the system.
    - `status` 'Live' | 'Testing' | 'Disabled' — The current operational status of the agent.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/sigmamind/apis/sigmamind-apis.md) · [All operations](https://skmtc.net/sigmamind/apis/sigmamind-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sigmamind/sigmamind-apis/versions/d00f52b5123f/schema)
