Chat

Send a webchat message

Required scope: chat

Conditional sensitive scope: chat:admin

post/api/v1/chat

Request body

usernamestring

Caller-declared WebChat sender/session owner. Configured AstrBot administrator IDs require the chat:admin API key sub-scope.

session_idstring
conversation_idstring

Deprecated alias for session_id.

config_idstring
config_namestring
selected_providerstring
selected_modelstring
enable_streamingboolean

Deprecated compatibility field. It is used only when flags.enable_streaming is absent; otherwise flags.enable_streaming takes priority.

_skip_user_historyboolean

Internal WebUI flag for edit/regenerate flows.

_llm_checkpoint_idstring

Internal WebUI checkpoint override.

_platform_history_idstring

Internal WebUI platform history override.

_thread_selected_textstring

Internal WebUI side-thread context.

Response

Standard AstrBot success response

status'ok' required
messagestring
{"stackTrail":"components:schemas:SuccessEnvelope:properties:data","oasType":"schema","type":"unknown"}

Changes

Changed in 3 of the 13 revisions of this API.5929

    • added the new optional request property flags

      new-optional-request-property

    • added the new optional request property message/oneOf[subschema #2]/items/stored_filename

      new-optional-request-property

    • request property enable_streaming deprecated

      request-property-deprecated

  • 6b73b947caab1316See the full diff
    • removed the media type text/event-stream for the response with the status 200

      response-media-type-removed

    • removed the request property message/oneOf[subschema #2]/items/message_id

      request-property-removed

    • removed the request property message/oneOf[subschema #2]/items/path

      request-property-removed

    • removed the request property message/oneOf[subschema #2]/items/selected_text

      request-property-removed

    • api operation id sendChatMessage was added

      api-operation-id-added

    • the endpoint scheme security ApiKeyHeader was removed from the API

      api-security-removed

    • api tag Chat added

      api-tag-added

    • api tag Open API removed

      api-tag-removed

    • added the new optional request property _llm_checkpoint_id

      new-optional-request-property

    • added the new optional request property _platform_history_id

      new-optional-request-property

    • added the new optional request property _skip_user_history

      new-optional-request-property

    • added the new optional request property _thread_selected_text

      new-optional-request-property

    • added the new optional request property message/oneOf[subschema #2]/items/mime_type

      new-optional-request-property

    • added the new optional request property message/oneOf[subschema #2]/items/url

      new-optional-request-property

    • the request property username became optional

      request-property-became-optional

    • added the new audio enum value to the request property message/oneOf[subschema #2]/items/type

      request-property-enum-value-added

    • added the new text enum value to the request property message/oneOf[subschema #2]/items/type

      request-property-enum-value-added

    • added the media type application/json for the response with the status 200

      response-media-type-added

    • removed the non-success response with the status 401

      response-non-success-status-removed

    • removed the non-success response with the status 403

      response-non-success-status-removed

    This revision also has 13 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 3d43cee2622a4610See the full diff
    • the request property username became required

      request-property-became-required

    • removed the enum value audio of the request property message/oneOf[subschema #2]/items/type

      request-property-enum-value-removed

    • removed the enum value text of the request property message/oneOf[subschema #2]/items/type

      request-property-enum-value-removed

    • removed the media type application/json for the response with the status 200

      response-media-type-removed

    • removed the request property _llm_checkpoint_id

      request-property-removed

    • removed the request property _platform_history_id

      request-property-removed

    • removed the request property _skip_user_history

      request-property-removed

    • removed the request property _thread_selected_text

      request-property-removed

    • removed the request property message/oneOf[subschema #2]/items/mime_type

      request-property-removed

    • removed the request property message/oneOf[subschema #2]/items/url

      request-property-removed

    • api operation id sendChatMessage removed and replaced with

      api-operation-id-removed

    • the endpoint scheme security ApiKeyHeader was added to the API

      api-security-added

    • api tag Open API added

      api-tag-added

    • api tag Chat removed

      api-tag-removed

    • added the new optional request property message/oneOf[subschema #2]/items/message_id

      new-optional-request-property

    • added the new optional request property message/oneOf[subschema #2]/items/path

      new-optional-request-property

    • added the new optional request property message/oneOf[subschema #2]/items/selected_text

      new-optional-request-property

    • added the media type text/event-stream for the response with the status 200

      response-media-type-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    This revision also has 48 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog