Skip to main content
POST
/
actions
/
send_email
Send an email
curl --request POST \
  --url https://api.hyperspell.com/actions/send_email \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": [
    "<string>"
  ],
  "subject": "<string>",
  "body": "<string>",
  "provider": "gmail_actions",
  "connection": "<string>",
  "cc": [
    "<string>"
  ],
  "bcc": [
    "<string>"
  ]
}
'
{
  "success": true,
  "error": "<string>",
  "provider_response": {}
}

Authorizations

Authorization
string
header
required

API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.

Body

application/json

Send an email via Gmail.

to
string[]
required

Recipient email addresses

subject
string
required

Email subject line

body
string
required

Email body (plain text)

provider
enum<string>
default:gmail_actions

Integration provider

Available options:
reddit,
notion,
slack,
google_calendar,
google_mail,
box,
dropbox,
google_drive,
github,
vault,
web_crawler,
trace,
microsoft_teams,
gmail_actions
connection
string | null

Connection ID. If omitted, auto-resolved from provider + user.

cc
string[] | null

CC recipients

bcc
string[] | null

BCC recipients

Response

Successful Response

Result from executing an integration action.

success
boolean
required
error
string | null
provider_response
Provider Response · object