Skip to main content
POST
/
internal
/
v1
/
spi
/
rail
/
inbound
Internal rail inbound callback
curl --request POST \
  --url https://spi.sandbox.lerian.net/internal/v1/spi/rail/inbound \
  --header 'Content-Type: application/json' \
  --data '
{
  "payloadHash": "<string>",
  "payloadRef": "<string>",
  "receivedAt": "<string>",
  "source": "<string>",
  "channel": "<string>",
  "headers": {},
  "payload": "<string>"
}
'
import requests

url = "https://spi.sandbox.lerian.net/internal/v1/spi/rail/inbound"

payload = {
"payloadHash": "<string>",
"payloadRef": "<string>",
"receivedAt": "<string>",
"source": "<string>",
"channel": "<string>",
"headers": {},
"payload": "<string>"
}
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({
payloadHash: '<string>',
payloadRef: '<string>',
receivedAt: '<string>',
source: '<string>',
channel: '<string>',
headers: {},
payload: '<string>'
})
};

fetch('https://spi.sandbox.lerian.net/internal/v1/spi/rail/inbound', 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://spi.sandbox.lerian.net/internal/v1/spi/rail/inbound",
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([
'payloadHash' => '<string>',
'payloadRef' => '<string>',
'receivedAt' => '<string>',
'source' => '<string>',
'channel' => '<string>',
'headers' => [

],
'payload' => '<string>'
]),
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://spi.sandbox.lerian.net/internal/v1/spi/rail/inbound"

payload := strings.NewReader("{\n \"payloadHash\": \"<string>\",\n \"payloadRef\": \"<string>\",\n \"receivedAt\": \"<string>\",\n \"source\": \"<string>\",\n \"channel\": \"<string>\",\n \"headers\": {},\n \"payload\": \"<string>\"\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://spi.sandbox.lerian.net/internal/v1/spi/rail/inbound")
.header("Content-Type", "application/json")
.body("{\n \"payloadHash\": \"<string>\",\n \"payloadRef\": \"<string>\",\n \"receivedAt\": \"<string>\",\n \"source\": \"<string>\",\n \"channel\": \"<string>\",\n \"headers\": {},\n \"payload\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spi.sandbox.lerian.net/internal/v1/spi/rail/inbound")

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 \"payloadHash\": \"<string>\",\n \"payloadRef\": \"<string>\",\n \"receivedAt\": \"<string>\",\n \"source\": \"<string>\",\n \"channel\": \"<string>\",\n \"headers\": {},\n \"payload\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "processingDecision": "<string>",
  "humanReason": "<string>",
  "messageRecordId": "<string>",
  "quarantineId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Headers

X-Internal-Callback
string

Internal callback shared secret

Body

application/json
payloadHash
string
required

SHA-256 hex digest of the referenced payload bytes

Example:

"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

payloadRef
string
required

Opaque reference to the payload bytes held in the server-side resolver

receivedAt
string
required

Timestamp the mesh received the rail message, RFC3339 UTC

Example:

"2026-06-14T12:00:00Z"

source
string
required

Originating rail/source identifier of the inbound message

channel
string

Optional channel discriminator routing the message to a handler

headers
object

Forwarded transport headers (e.g. Idempotency-Key), used for idempotency and routing

payload
string

Optional base64-encoded payload bytes; staged server-side after hash verification

Response

OK

processingDecision
string
required

Outcome of processing the inbound message (e.g. ACCEPTED, QUARANTINED)

Example:

"ACCEPTED"

humanReason
string

Safe-to-return human-readable explanation of the decision

messageRecordId
string

UUID of the persisted message record when the message was accepted

Example:

"550e8400-e29b-41d4-a716-446655440002"

quarantineId
string

UUID of the quarantine record when the message was quarantined

Example:

"550e8400-e29b-41d4-a716-446655440003"