POST
/
v1
/
run
/
{flow}
Run a published automation
curl --request POST \
  --url https://api.jinbatrail.indx.jp/v1/run/{flow} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "inputs": {
    "orderId": "NW-100423"
  }
}
'
import requests

url = "https://api.jinbatrail.indx.jp/v1/run/{flow}"

payload = { "inputs": { "orderId": "NW-100423" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({inputs: {orderId: 'NW-100423'}})
};

fetch('https://api.jinbatrail.indx.jp/v1/run/{flow}', 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://api.jinbatrail.indx.jp/v1/run/{flow}",
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([
'inputs' => [
'orderId' => 'NW-100423'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.jinbatrail.indx.jp/v1/run/{flow}"

payload := strings.NewReader("{\n \"inputs\": {\n \"orderId\": \"NW-100423\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://api.jinbatrail.indx.jp/v1/run/{flow}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {\n \"orderId\": \"NW-100423\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.jinbatrail.indx.jp/v1/run/{flow}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputs\": {\n \"orderId\": \"NW-100423\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "run_id": "run_01hz…",
  "status": "succeeded",
  "flow_digest": "sha256:7f3a…",
  "output": {
    "shipped": true
  }
}

承認

Authorization
string
header
必須

An org-scoped API key, format jbt_live_<rand> or jbt_test_<rand> (packages/service/src/auth.ts's issueApiKey). Minted via POST /api/keys; the plaintext is shown exactly once. Two boundaries are enforced on every call: (1) test/live — a jbt_test_* key is rejected with 403 test_key_forbidden on any automation that declares a secret-typed input, even unsupplied; only a jbt_live_* key can exercise production credentials. (2) per-key scope — an optional automation-name allowlist set at mint time; an unscoped key (the default) reaches every published automation in its org. Used ONLY on POST /v1/run/:flow and POST /mcp — every other route uses cookieAuth.

パスパラメータ

flow
string
必須

The automation's name — the URL-safe slug chosen at creation, e.g. get-order-status.

ボディ

application/json

The automation's typed, non-secret inputs, wrapped in { inputs }. An empty/absent body is the no-inputs shorthand. Secret-typed slots are never supplied here — they are resolved server-side from the caller's org secret store.

inputs
object

The automation's typed, non-secret inputs by name.

レスポンス

The run's result — either a completed run (sync dispatch) or a queued acknowledgment (queue dispatch). Both are HTTP 200; discriminate on status.

A synchronous run's result.

run_id
string
必須

The engine Run id.

status
enum<string>
必須
利用可能なオプション:
pending,
running,
succeeded,
failed,
canceled
flow_digest
string
必須
output
any
必須

The automation's output, or null until/unless the run succeeds.

error
object

Present only when status === "failed" — the terminal error projected from the journal's last step_failed entry.