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

# Send Message

> Send a message to a specified recipient, such as an email with formatted content.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/send_message
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/send_message:
    post:
      tags:
        - Outputs
      summary: Send Message
      description: >-
        Send a message to a specified recipient, such as an email with formatted
        content.
      operationId: sendMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - email
                  description: Select the type of message to send, such as 'Email'.
                  default: email
                to:
                  type: string
                  enum:
                    - current_user
                    - email_addresses
                  description: >-
                    Enter the recipient's address, such as
                    'john.doe@example.com' for emails.
                  default: current_user
                email_addresses:
                  type: string
                  x-ui: textarea
                  description: Enter each email on a new line
                subject:
                  type: string
                  description: >-
                    Provide a subject line for the email such as New message
                    from {{agent.name}}
                output_formatted:
                  type: string
                  x-ui: textarea
                  description: >-
                    Provide the message content, such as 'Hello, your order is
                    confirmed!' or formatted HTML for emails.
              required:
                - type
                - to
                - output_formatted
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          description: Unauthorized - invalid or missing bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````