Skip to main content
POST
/
action
/
send_message
Send Message
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/send_message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "email",
  "to": "current_user",
  "output_formatted": "<string>",
  "email_addresses": "<string>",
  "subject": "<string>"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
type
enum<string>
default:email
required

Select the type of message to send, such as 'Email'.

Available options:
email
to
enum<string>
default:current_user
required

Enter the recipient's address, such as '[email protected]' for emails.

Available options:
current_user,
email_addresses
output_formatted
string
required

Provide the message content, such as 'Hello, your order is confirmed!' or formatted HTML for emails.

email_addresses
string

Enter each email on a new line

subject
string

Provide a subject line for the email such as New message from {{agent.name}}

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action