Send an e-mail
Sends one e-mail (including replies) from the user's connected mailbox; it joins the thread and project under the web rules. Returns 400 send when no mailbox is connected. JSON body only.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Scope:
crm.writeBody application/json
tostringrequiredRecipient(s), comma separated.
subjectstringrequiredSubject.
bodystringrequiredBody (plain text).
ccstringoptionalCc.
customer_id / contact_id / opp_idintegeroptionalRecords to link.
in_reply_tostringoptionalMessage-ID being replied to (
reply.in_reply_to).Errors
| HTTP | error | Meaning |
|---|---|---|
400 | invalid | Missing or invalid field (`message` explains). |
400 | send | The e-mail could not be sent (no mailbox, bad recipient…). |
Request
curl -X POST https://ornek.solk.app/api/v1/emails/send \
-H "Authorization: Bearer $SOLK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "x@ornek.com",
"subject": "Deneme",
"body": ""
}'const res = await fetch("https://ornek.solk.app/api/v1/emails/send", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"to": "x@ornek.com",
"subject": "Deneme",
"body": ""
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/v1/emails/send",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
json={
"to": "x@ornek.com",
"subject": "Deneme",
"body": ""
},
)
print(r.json())Response
{
"error": "invalid",
"message": "E-posta metni boş.",
"ok": false
}Example responses were captured from a v22 installation running sample data; lists are shortened to two items.