Submit SpiderMail Job
/api/v1/jobs/spiderMail/submitOverview
SpiderMail processes email send, reply, and forward operations through the standard job queue. Emails are sent via SMTP from registered mailboxes and outbound copies are stored in the database for thread continuity.
Request Body
payloadobjectrequiredSpiderMail job configuration
payload.actionstringrequiredEmail action: send, reply, or forward
payload.from_emailstringrequiredSender email address (must be a registered mailbox)
payload.toarrayRecipient email addresses. Required for send and forward actions.
payload.ccarrayCC recipient email addresses
payload.subjectstringEmail subject line. Required for send action.
payload.body_textstringrequiredPlain text email body (required as fallback for clients that don't render HTML)
payload.body_htmlstringHTML email body. When provided, the email is sent as multipart/alternative with both text and HTML versions. Most email clients will display the HTML version.
payload.reply_to_message_idintegerDatabase ID of the message to reply to. Required for reply and forward actions.
payload.reply_allbooleandefault: falseReply to all recipients (only used with reply action)
priorityintegerdefault: 0Job priority (0-10, higher = processed first)
Send Email (Plain Text)
- cURL
- Python
curl -X POST https://spideriq.ai/api/v1/jobs/spiderMail/submit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <client_id>:<api_key>:<api_secret>" \
-d '{
"payload": {
"action": "send",
"from_email": "alice@company.com",
"to": ["bob@prospect.com"],
"subject": "Quick question about your services",
"body_text": "Hi Bob,\n\nI noticed your company is expanding..."
}
}'
import requests
response = requests.post(
"https://spideriq.ai/api/v1/jobs/spiderMail/submit",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer <client_id>:<api_key>:<api_secret>"
},
json={
"payload": {
"action": "send",
"from_email": "alice@company.com",
"to": ["bob@prospect.com"],
"subject": "Quick question about your services",
"body_text": "Hi Bob,\n\nI noticed your company is expanding..."
}
}
)
print(response.json())
Send Email (HTML + Plain Text)
For rich formatting, include both body_text (required fallback) and body_html. The email is sent as multipart/alternative — most email clients display the HTML version.
- cURL
- Python
curl -X POST https://spideriq.ai/api/v1/jobs/spiderMail/submit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <client_id>:<api_key>:<api_secret>" \
-d '{
"payload": {
"action": "send",
"from_email": "alice@company.com",
"to": ["bob@prospect.com"],
"subject": "Quick question about your services",
"body_text": "Hi Bob,\n\nI noticed your company is expanding...",
"body_html": "<p>Hi Bob,</p><p>I noticed your company is <strong>expanding</strong>...</p>"
}
}'
import requests
response = requests.post(
"https://spideriq.ai/api/v1/jobs/spiderMail/submit",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer <client_id>:<api_key>:<api_secret>"
},
json={
"payload": {
"action": "send",
"from_email": "alice@company.com",
"to": ["bob@prospect.com"],
"subject": "Quick question about your services",
"body_text": "Hi Bob,\n\nI noticed your company is expanding...",
"body_html": "<p>Hi Bob,</p><p>I noticed your company is <strong>expanding</strong>...</p>"
}
}
)
print(response.json())
Reply to Email
- cURL
curl -X POST https://spideriq.ai/api/v1/jobs/spiderMail/submit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <client_id>:<api_key>:<api_secret>" \
-d '{
"payload": {
"action": "reply",
"from_email": "alice@company.com",
"reply_to_message_id": 1234,
"body_text": "Thanks for getting back to me! I would love to schedule a call."
}
}'
Forward Email
- cURL
curl -X POST https://spideriq.ai/api/v1/jobs/spiderMail/submit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <client_id>:<api_key>:<api_secret>" \
-d '{
"payload": {
"action": "forward",
"from_email": "alice@company.com",
"to": ["manager@company.com"],
"reply_to_message_id": 1234,
"body_text": "FYI — this prospect is interested."
}
}'
Response
{
"success": true,
"job_id": "job_abc123",
"type": "spiderMail",
"status": "queued",
"message": "SpiderMail job queued successfully"
}
Validation Rules
| Action | Required Fields |
|---|---|
send | from_email, to, subject, body_text |
reply | from_email, reply_to_message_id, body_text |
forward | from_email, to, reply_to_message_id, body_text |