curl --request POST \
--url https://your-instance.example.com/api/webhook/inbox-drop \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"emailData": {
"from": "alex.nguyen@example.com",
"to": [
"inbound+org-64a1b@inbound.tetherai.ca"
],
"subject": "Maple Court availability",
"body": "Hi — could you confirm the corner unit is still listed?"
},
"metadata": {
"receivedAt": "2026-05-20T15:04:01.135Z",
"source": "sendgrid_inbound"
}
}
'import requests
url = "https://your-instance.example.com/api/webhook/inbox-drop"
payload = {
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"emailData": {
"from": "alex.nguyen@example.com",
"to": ["inbound+org-64a1b@inbound.tetherai.ca"],
"subject": "Maple Court availability",
"body": "Hi — could you confirm the corner unit is still listed?"
},
"metadata": {
"receivedAt": "2026-05-20T15:04:01.135Z",
"source": "sendgrid_inbound"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
organizationId: '64a1b2c3d4e5f60012345678',
userId: '64a1b2c3d4e5f60012345679',
emailData: {
from: 'alex.nguyen@example.com',
to: ['inbound+org-64a1b@inbound.tetherai.ca'],
subject: 'Maple Court availability',
body: JSON.stringify('Hi — could you confirm the corner unit is still listed?')
},
metadata: {receivedAt: '2026-05-20T15:04:01.135Z', source: 'sendgrid_inbound'}
})
};
fetch('https://your-instance.example.com/api/webhook/inbox-drop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/webhook/inbox-drop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organizationId' => '64a1b2c3d4e5f60012345678',
'userId' => '64a1b2c3d4e5f60012345679',
'emailData' => [
'from' => 'alex.nguyen@example.com',
'to' => [
'inbound+org-64a1b@inbound.tetherai.ca'
],
'subject' => 'Maple Court availability',
'body' => 'Hi — could you confirm the corner unit is still listed?'
],
'metadata' => [
'receivedAt' => '2026-05-20T15:04:01.135Z',
'source' => 'sendgrid_inbound'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/webhook/inbox-drop"
payload := strings.NewReader("{\n \"organizationId\": \"64a1b2c3d4e5f60012345678\",\n \"userId\": \"64a1b2c3d4e5f60012345679\",\n \"emailData\": {\n \"from\": \"alex.nguyen@example.com\",\n \"to\": [\n \"inbound+org-64a1b@inbound.tetherai.ca\"\n ],\n \"subject\": \"Maple Court availability\",\n \"body\": \"Hi — could you confirm the corner unit is still listed?\"\n },\n \"metadata\": {\n \"receivedAt\": \"2026-05-20T15:04:01.135Z\",\n \"source\": \"sendgrid_inbound\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/webhook/inbox-drop")
.header("Content-Type", "application/json")
.body("{\n \"organizationId\": \"64a1b2c3d4e5f60012345678\",\n \"userId\": \"64a1b2c3d4e5f60012345679\",\n \"emailData\": {\n \"from\": \"alex.nguyen@example.com\",\n \"to\": [\n \"inbound+org-64a1b@inbound.tetherai.ca\"\n ],\n \"subject\": \"Maple Court availability\",\n \"body\": \"Hi — could you confirm the corner unit is still listed?\"\n },\n \"metadata\": {\n \"receivedAt\": \"2026-05-20T15:04:01.135Z\",\n \"source\": \"sendgrid_inbound\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/inbox-drop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"organizationId\": \"64a1b2c3d4e5f60012345678\",\n \"userId\": \"64a1b2c3d4e5f60012345679\",\n \"emailData\": {\n \"from\": \"alex.nguyen@example.com\",\n \"to\": [\n \"inbound+org-64a1b@inbound.tetherai.ca\"\n ],\n \"subject\": \"Maple Court availability\",\n \"body\": \"Hi — could you confirm the corner unit is still listed?\"\n },\n \"metadata\": {\n \"receivedAt\": \"2026-05-20T15:04:01.135Z\",\n \"source\": \"sendgrid_inbound\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"matchedCount": 1
}{
"success": false,
"message": "Invalid email data",
"errors": [
"emailData.from is required",
"emailData.subject is required"
]
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}Inbox Drop ingress — inbound email payload from provider adapter
Inbox Drop ingress that receives a parsed inbound email payload from a provider-specific adapter (today: the sendgrid-inbound service). The api evaluates which workflows’ InboxDropTrigger nodes match the email’s subject/from filters and enqueues one BullMQ job per match. Auth is the shared INTERNAL_SERVICE_TOKEN via the X-Internal-Token header — NOT user auth. Adapter services hold this token; external callers must not hit this endpoint directly. Returns 202 with matchedCount so the caller can decide whether to fall back to a non-workflow path when no workflow matched.
curl --request POST \
--url https://your-instance.example.com/api/webhook/inbox-drop \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"emailData": {
"from": "alex.nguyen@example.com",
"to": [
"inbound+org-64a1b@inbound.tetherai.ca"
],
"subject": "Maple Court availability",
"body": "Hi — could you confirm the corner unit is still listed?"
},
"metadata": {
"receivedAt": "2026-05-20T15:04:01.135Z",
"source": "sendgrid_inbound"
}
}
'import requests
url = "https://your-instance.example.com/api/webhook/inbox-drop"
payload = {
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"emailData": {
"from": "alex.nguyen@example.com",
"to": ["inbound+org-64a1b@inbound.tetherai.ca"],
"subject": "Maple Court availability",
"body": "Hi — could you confirm the corner unit is still listed?"
},
"metadata": {
"receivedAt": "2026-05-20T15:04:01.135Z",
"source": "sendgrid_inbound"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
organizationId: '64a1b2c3d4e5f60012345678',
userId: '64a1b2c3d4e5f60012345679',
emailData: {
from: 'alex.nguyen@example.com',
to: ['inbound+org-64a1b@inbound.tetherai.ca'],
subject: 'Maple Court availability',
body: JSON.stringify('Hi — could you confirm the corner unit is still listed?')
},
metadata: {receivedAt: '2026-05-20T15:04:01.135Z', source: 'sendgrid_inbound'}
})
};
fetch('https://your-instance.example.com/api/webhook/inbox-drop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/webhook/inbox-drop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organizationId' => '64a1b2c3d4e5f60012345678',
'userId' => '64a1b2c3d4e5f60012345679',
'emailData' => [
'from' => 'alex.nguyen@example.com',
'to' => [
'inbound+org-64a1b@inbound.tetherai.ca'
],
'subject' => 'Maple Court availability',
'body' => 'Hi — could you confirm the corner unit is still listed?'
],
'metadata' => [
'receivedAt' => '2026-05-20T15:04:01.135Z',
'source' => 'sendgrid_inbound'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/webhook/inbox-drop"
payload := strings.NewReader("{\n \"organizationId\": \"64a1b2c3d4e5f60012345678\",\n \"userId\": \"64a1b2c3d4e5f60012345679\",\n \"emailData\": {\n \"from\": \"alex.nguyen@example.com\",\n \"to\": [\n \"inbound+org-64a1b@inbound.tetherai.ca\"\n ],\n \"subject\": \"Maple Court availability\",\n \"body\": \"Hi — could you confirm the corner unit is still listed?\"\n },\n \"metadata\": {\n \"receivedAt\": \"2026-05-20T15:04:01.135Z\",\n \"source\": \"sendgrid_inbound\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/webhook/inbox-drop")
.header("Content-Type", "application/json")
.body("{\n \"organizationId\": \"64a1b2c3d4e5f60012345678\",\n \"userId\": \"64a1b2c3d4e5f60012345679\",\n \"emailData\": {\n \"from\": \"alex.nguyen@example.com\",\n \"to\": [\n \"inbound+org-64a1b@inbound.tetherai.ca\"\n ],\n \"subject\": \"Maple Court availability\",\n \"body\": \"Hi — could you confirm the corner unit is still listed?\"\n },\n \"metadata\": {\n \"receivedAt\": \"2026-05-20T15:04:01.135Z\",\n \"source\": \"sendgrid_inbound\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/inbox-drop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"organizationId\": \"64a1b2c3d4e5f60012345678\",\n \"userId\": \"64a1b2c3d4e5f60012345679\",\n \"emailData\": {\n \"from\": \"alex.nguyen@example.com\",\n \"to\": [\n \"inbound+org-64a1b@inbound.tetherai.ca\"\n ],\n \"subject\": \"Maple Court availability\",\n \"body\": \"Hi — could you confirm the corner unit is still listed?\"\n },\n \"metadata\": {\n \"receivedAt\": \"2026-05-20T15:04:01.135Z\",\n \"source\": \"sendgrid_inbound\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"matchedCount": 1
}{
"success": false,
"message": "Invalid email data",
"errors": [
"emailData.from is required",
"emailData.subject is required"
]
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}Body
Internal-service request body sent by inbound-email adapters (SendGrid, etc.) to fan out to matching workflows.
Parsed inbound email payload produced by a provider adapter (e.g. SendGrid Inbound Parse).
Show child attributes
Show child attributes
{
"from": "alex.nguyen@example.com",
"to": "inbound+org-64a1b@inbound.tetherai.ca",
"subject": "Maple Court availability",
"body": "Hi — could you confirm the corner unit is still listed for next month?",
"bodyHtml": "<p>Hi — could you confirm the corner unit is still listed for next month?</p>",
"headers": { "Message-ID": "<abc123@mail.example.com>" },
"attachments": []
}
Optional. Falls back to the workflow's owning user when missing.
Show child attributes
Show child attributes