---
title: "Send a user message and start a run"
method: POST
path: "/v1/assistant/threads/{threadId}/messages"
tags: ["assistant"]
---

# Send a user message and start a run

`POST /v1/assistant/threads/{threadId}/messages`

## Request

- Base URL: `https://sandbox.api.infinite.dev`
- URL: `https://sandbox.api.infinite.dev/v1/assistant/threads/{threadId}/messages`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/infinite/apis/infinite-api/docs/v1/assistant/threads/:threadId/messages/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `threadId` string, required

## Request body

- union
  - object
    - `text` string, required
  - object
    - `attachment` AssistantMessageAttachmentDto, required
      - `fileBase64` string, required: Base64-encoded file bytes (raw or data: URI). Max 4MB decoded. PDF or image only.
      - `fileName` string, required
      - `contentType` string, required
  - object
    - `pendingAttachmentId` string, required
  - object
    - `text` string, required
    - `attachment` AssistantMessageAttachmentDto, required
      - `fileBase64` string, required: Base64-encoded file bytes (raw or data: URI). Max 4MB decoded. PDF or image only.
      - `fileName` string, required
      - `contentType` string, required
  - object
    - `text` string, required
    - `pendingAttachmentId` string, required

## Response `201`

- SendAssistantMessageResponseDto
  - `message` AssistantMessageResponseDto, required
    - `id` string, required
    - `threadId` string, required
    - `runId` string, nullable
    - `role` 'user' | 'assistant' | 'tool', required
    - `parts` AssistantMessagePartDto[], required
      - `type` string, required
      - `text` string
      - `toolCallId` string
      - `tool` string
      - `argsSummary` string
      - `status` string
      - `preview` string
      - `pendingAttachmentId` string
      - `fileName` string
      - `contentType` string
      - `sizeBytes` number
    - `tokensIn` number, nullable
    - `tokensOut` number, nullable
    - `createdAt` string, date-time, required
  - `run` AssistantRunResponseDto, required
    - `id` string, required
    - `threadId` string, required
    - `userId` string, required
    - `organizationId` string, required
    - `app` 'console' | 'admin' | 'compliance', required
    - `status` 'queued' | 'running' | 'awaiting_confirmation' | 'completed' | 'failed' | 'cancelled', required
    - `model` string, nullable
    - `provider` string, nullable
    - `costUsd` string, nullable
    - `cancelRequestedAt` string, date-time, nullable
    - `startedAt` string, date-time, nullable
    - `endedAt` string, date-time, nullable
    - `error` string, nullable
    - `tokensIn` number, nullable
    - `tokensOut` number, nullable
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `401`: Unauthorized - Invalid or missing JWT token

## Changes

- **2026-10-27** `7b1871b77854`: 1 breaking, 1 warning, 5 info
  - the request's body type changed from `object` to no type
  - removed the request property `text`
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5` to the request body `oneOf` list
  - added the optional property `message/parts/items/contentType` to the response with the `201` status
  - …3 more
- **2026-10-16** `f48e031634f4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/infinite/apis/infinite-api/changes/v1/assistant/threads/:threadId/messages/post.md)

---

[API](https://skmtc.dev/infinite/apis/infinite-api.md) - [All operations](https://skmtc.dev/infinite/apis/infinite-api/llms.txt) - [OpenAPI document](https://skmtc.dev/infinite/apis/infinite-api/revisions/90065d3e6974?raw)
