# Add a user message

> Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Add a user message"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v1/sessions/{session_id}/messages"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
>
  <Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

<ParamsDetails
  {...require("./add-session-message.ParamsDetails.json")}
>
  
</ParamsDetails>

<RequestSchema
  {...require("./add-session-message.RequestSchema.json")}
>
  
</RequestSchema>

<StatusCodes
  {...require("./add-session-message.StatusCodes.json")}
>
  
</StatusCodes>
