---
title: "Submit a message with attachments"
method: POST
path: "/messages/submit"
tags: ["Message"]
---

# Submit a message with attachments

`POST /messages/submit`

Send a multipart message with optional file uploads and enqueue generation.

## Query parameters

- `cookie_name` string, nullable

## Response `200`

Successful Response

- Message
  - `state` string, nullable — Current lifecycle state of the record.
  - `state_reason` string, nullable — Optional explanation for the current state.
  - `state_changed_at` string, date-time, nullable — UTC timestamp when the state last changed.
  - `id` integer, nullable — Primary key for the message.
  - `created_at` string, date-time — Timestamp when the message was created.
  - `updated_at` string, date-time — Timestamp when the message was last updated.
  - `creator_user_id` integer, required — ID of the user who created the message.
  - `chat_id` integer, required — ID of the chat the message belongs to.
  - `role` string, required — Role of the message author (see llama-index MessageRole values).
  - `content` string, required — Rendered content of the message.
  - `sent_user_msg` string, nullable, required — Original user-sent message text, if applicable.
  - `parent_id` integer, nullable, required — ID of the parent message in a threaded conversation.
  - `completed` boolean — DEPRECATED. Whether the message has finished processing.
  - `error` string, nullable, required — DEPRECATED. Error message captured during processing, if any.
  - `hint` string, nullable, required — Hint shown to the user about the next action.
  - `llm_catalog_id` integer, nullable — ID of the LLM catalog entry used for this message.
  - `llm_settings_id` integer, nullable — ID of the LLM settings used for this message.
  - `usage` object, nullable — Token usage metadata recorded for this message.
  - `celery_task_id` string, nullable — ID of the Celery task processing this message, if any.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — No access to the chat/project/assistant, or usage budget exceeded.
- `404` — Referenced chat or assistant does not exist.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/revisions/b53e89b98c2b/schema)
