---
title: "Send Message"
method: POST
path: "/chats/{chatId}/messages"
tags: ["Messages"]
---

# Send Message

`POST /chats/{chatId}/messages`

Sends a new message to an existing chat. Blocks until the model response is complete and returns the message response.

## Path parameters

- `chatId` string, required — The unique identifier of the chat.

## Request body

- object
  - `message` string, required — The prompt or instruction to send to the model.
  - `systemPrompt` string — System-level context for the chat, such as frameworks or development environment details.
  - `modelConfiguration` object — Overrides for the model behavior.
    - `modelId` 'v0-mini' | 'v0-pro' | 'v0-max' | 'v0-max-fast', required — Model to use for the generation.
    - `imageGenerations` boolean, required — Enables image generations to generate up to 5 images per version.
  - `mcpServerIds` string[] — MCP server IDs to enable. When omitted, uses default enabled servers.
  - `attachments` object[] — Files or assets to include with the message.
    - `url` string, required — URL of the attachment.
  - `skills` union[] — Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.
    - union — A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo.
      - object
        - `type` 'remote', required — Discriminator: a skills.sh skill.
        - `id` string, required — Skill ID from skills.sh.
      - object
        - `type` 'memory', required — Discriminator: a user- or team-scoped memory skill.
        - `scope` 'user' | 'team', required — Whether the skill lives in user or team memory.
        - `skillName` string, required — Name of the memory skill to attach.
      - object
        - `type` 'project', required — Discriminator: a skill defined in the project repo.
        - `skillName` string, required — Name of the project skill to attach.

## Response `200`

A single message in a chat.

- Message — A single message in a chat.
  - `id` string, required — Unique message identifier.
  - `chatId` string, required — ID of the chat this message belongs to.
  - `role` 'user' | 'assistant', required — Who produced this message.
  - `createdAt` string, date-time, required — ISO timestamp when the message was created.
  - `updatedAt` string, date-time, required — ISO timestamp when the message was last updated.
  - `content` string, required — The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose.
  - `parts` union[], required — Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose.
    - union — A single entry in the ordered narrative of a message. Iterate `parts` in order to render the full transcript.
      - object — A block of text output by the agent.
        - `type` 'text', required
        - `text` string, required — Markdown prose written by the agent or user.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — Extended thinking output by the agent.
        - `type` 'thinking', required
        - `text` string, required — The agent's reasoning trace.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — Files read by the agent.
        - `type` 'file-read', required
        - `paths` string[], required — The file paths the agent read in this step.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent created, modified, deleted, renamed, or patched a file.
        - `type` 'file-edit', required
        - `operation` 'create' | 'update' | 'delete' | 'rename' | 'patch', required — The type of file edit performed.
        - `path` string, required — The target file path.
        - `toPath` string — The new path when operation is "rename".
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent searched for something.
        - `type` 'search', required
        - `scope` 'repo' | 'web', required — Whether the agent searched the repository or the web.
        - `query` string, required — The search query.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent ran a shell command.
        - `type` 'bash', required
        - `command` string, required — The shell command that was executed.
        - `output` string — Combined stdout/stderr captured from the terminal. May be empty if the command produced no output.
        - `exitCode` integer, nullable — Process exit code, when available. Reserved for future use; currently always omitted.
        - `isDangerous` boolean — True if the command was flagged as potentially dangerous and required explicit user approval.
        - `timeoutMs` integer — Command timeout in milliseconds, when configured.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent invoked a tool (MCP, integration, or other dynamic tool). For shell commands, use the "bash" part instead.
        - `type` 'tool-call', required
        - `name` string, required — The name of the tool that was invoked (e.g. an MCP tool name or built-in tool identifier).
        - `input` unknown
        - `output` unknown
        - `status` 'ok' | 'error', required — Whether the tool call succeeded or returned an error.
        - `suggestedPermissions` object[] — Present when the agent is blocked waiting for you to approve this tool call (for example, running a setup or migration script). Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task to approve. Omitted once the tool has run.
          - `type` 'ALLOW_DYNAMIC_TOOL_STRICT', required — Permission grant type.
          - `toolName` string, required — The tool this permission authorizes.
          - `input` unknown
          - `taskNameActive` string, nullable — Internal label for the in-progress task. Pass back unchanged.
          - `taskNameComplete` string, nullable — Internal label for the completed task. Pass back unchanged.
          - `userMessage` string — Optional message associated with the permission.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — A typed escape hatch for agent actions that don’t fit the other part types. Forward-compatible: new action types may appear without API version changes.
        - `type` 'agent-action', required
        - `name` string, required — Stable identifier for the action (e.g. "generate_image", "manage_todos", "diagnostics"). See documentation for the registry of known names.
        - `summary` string, required — A short human-readable summary of what happened. Always populated so clients can render something even without knowing the action name.
        - `data` union — Structured payload for input-requesting actions. Present on `ask_user_questions`, `exit_plan_mode`, `get_or_request_integration`, and `configure_vercel_connect` parts when the agent is waiting on you; narrow by the part `name`. Omitted for actions that do not carry structured data.
          - object — Structured payload for an `ask_user_questions` agent action.
            - `questions` object[], required — The questions the agent is waiting for answers to. Resolve with an `answered-questions` task.
              - …
          - object — Structured payload for an `exit_plan_mode` agent action.
            - `plan` string, required — The full proposed plan, as Markdown.
            - `summary` string — A concise summary of the plan, when available.
            - `path` string, required — The path the plan applies to.
          - object — Structured payload for a `get_or_request_integration` agent action.
            - `requestedIntegrations` string[], required — Integration names the agent is asking you to connect (for example, "Neon"). Pass these back in `connectedIntegrationNames` when resolving with a `confirmed-steps` task.
            - `requestedMcpPresets` string[], required — MCP preset names the agent is asking you to add. Pass these back in `connectedMcpPresetNames` when resolving with a `confirmed-steps` task.
          - union
            - object — Connector setup is pending. Complete setup at `setupUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-setup` task.
              - …
            - object — The Connect action finished; no user input is needed.
              - …
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
  - `finishReason` 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other', nullable, required — The reason why message generation finished, including standard completion reasons and error states.
  - `restorable` boolean, required — True when this is an assistant message that produced restorable code and is not the currently active code.
  - `attachments` object[] — Files attached to this message.
    - `url` string, required — URL to the attachment.
    - `name` string — Original filename, when available.
    - `contentType` string — MIME type.
    - `size` integer — Size in bytes.
  - `authorId` string, nullable, required — ID of the user who authored a user message; null for assistant messages.
  - `usage` object, required — Token usage and credit cost. All values are zero on user messages and on assistant messages that have not yet generated tokens.
    - `tokens` object, required — Token counts for this message.
      - `input` number, required — Prompt input value (non-cached).
      - `output` number, required — Completion output value.
      - `cacheRead` number, required — Cache-read input value.
      - `cacheWrite` number, required — Cache-write input value.
      - `total` number, required — Sum of input, output, cacheRead, and cacheWrite.
    - `creditsCost` object, required — Credit cost for this message.
      - `input` number, required — Prompt input value (non-cached).
      - `output` number, required — Completion output value.
      - `cacheRead` number, required — Cache-read input value.
      - `cacheWrite` number, required — Cache-write input value.
      - `total` number, required — Sum of input, output, cacheRead, and cacheWrite.

## Other responses

- `401` — Response for status 401
- `403` — Response for status 403
- `404` — Response for status 404
- `422` — Response for status 422
- `500` — Response for status 500

---

[API](https://skmtc.net/vercel/apis/v0-platform-api-beta.md) · [All operations](https://skmtc.net/vercel/apis/v0-platform-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/v0-platform-api-beta/versions/7c7a496f8022/schema)
