> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withsutro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a message to the assistant

> Sends a user message to the assistant, which will process it asynchronously and may trigger changes to the application.
The user message is stored in the conversation history. The response includes a job ID for tracking the processing status.
The components that can be modified (frontend, backend, or both) are determined by the project's components
configuration set at project creation. This cannot be overridden.




## OpenAPI

````yaml /openapi.yaml post /projects/{projectId}/messages
openapi: 3.1.0
info:
  version: 0.0.5
  title: Sutro Public API
  description: >-
    The API through which apps can be generated, deployed, monitored and
    updated.
servers:
  - description: Production
    url: https://sapi.withsutro.com
security:
  - apiAuth: []
    builderAuth: []
    apiClientId: []
tags:
  - name: projects
    description: >
      Create and manage projects. Projects are the top-level container for all
      Sutro resources including applications,

      specifications, and team collaboration.
  - name: specifications
    description: >
      Generate and retrieve application specifications from attachments using
      AI. Specifications describe the data models,

      actions, and UI structure for your application.
  - name: applications
    description: >
      Generate applications, manage versions, and configure core settings.
      Applications are the executable implementations

      of your specifications.
  - name: attachments
    description: >
      Upload, manage, and delete file attachments for applications. Attachments
      can include Figma files,

      documents, and other assets used in application generation.
  - name: data-models
    description: >
      Define and manage data models and their fields. Models represent the
      entities in your application

      (e.g., Users, Products, Orders) and their properties.
  - name: actions-effects
    description: >
      Actions are things that your application can do, and an action is made up
      of effects.
  - name: triggers
    description: >
      Configure triggers that start workflows automatically based on events like
      schedules, webhooks, or data changes.
  - name: figma-integration
    description: >
      Import Figma designs and generate static code from frames. Connect your
      Figma files to automatically

      generate UI components.
  - name: deployments-assets
    description: >
      Deploy application versions and download generated code bundles. Manage
      your application releases

      and access generated artifacts.
  - name: secrets-configuration
    description: >
      Manage application secrets and environment variables securely. Secrets are
      encrypted and injected

      into your application at runtime.
  - name: ai-assistant
    description: >
      Assistant endpoints for making changes to an application using natural
      language.

      Messages are stored per project to maintain conversation history.
  - name: builders
    description: >
      Create and manage builders. Builders are end users or clients who build
      and run apps

      that integrate with Sutro.
  - name: storage
    description: >
      Upload, download, and manage files in object storage. Files are scoped to
      the authenticated

      customer and can optionally be associated with a builder.
paths:
  /projects/{projectId}/messages:
    parameters:
      - name: projectId
        in: path
        schema:
          type: string
          format: uuid
        required: true
    post:
      tags:
        - ai-assistant
      summary: Send a message to the assistant
      description: >
        Sends a user message to the assistant, which will process it
        asynchronously and may trigger changes to the application.

        The user message is stored in the conversation history. The response
        includes a job ID for tracking the processing status.

        The components that can be modified (frontend, backend, or both) are
        determined by the project's components

        configuration set at project creation. This cannot be overridden.
      operationId: sendMessage
      requestBody:
        description: The user message to send
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: array
                  items:
                    $ref: '#/components/schemas/MessagePart'
                  description: Array of message parts containing the user's message
      responses:
        '202':
          description: Message accepted and queued for processing
          headers:
            location:
              schema:
                type: string
                description: URL for checking the status of the job
          content:
            application/json:
              schema:
                type: object
                required:
                  - messageId
                  - jobId
                  - status
                properties:
                  messageId:
                    type: string
                    format: uuid
                    description: ID of the created message
                  jobId:
                    type: string
                    format: uuid
                    description: ID of the background job processing the message
                  status:
                    type: string
                    enum:
                      - queued
                    description: Current status of the job
        '400':
          description: Invalid or missing content
        '404':
          description: Project not found or no application exists
        '409':
          description: Follow-up job already in progress for this project
components:
  schemas:
    MessagePart:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
          description: The type of message part
        text:
          type: string
          description: The text content of the message part
  securitySchemes:
    apiAuth:
      description: >-
        Mutual TLS authentication using client certificates. Requires three
        certificate files from your security bundle: `ca.crt` (CA certificate to
        verify the server), `mtls.key` (client private key), and `mtls.crt`
        (client certificate). In curl, use: `--cacert ca.crt --key mtls.key
        --cert mtls.crt`
      type: mutualTLS
    builderAuth:
      description: Builder authentication and authorization
      type: http
      scheme: bearer
      bearerFormat: jwt
    apiClientId:
      description: A unique identifier for the API Client making a request
      type: apiKey
      in: header
      name: x-sutro-api-client

````