PATCH
/
api
/
automations
/
{id}
Correct site/task, or toggle MCP exposure
curl --request PATCH \
  --url https://api.jinbatrail.indx.jp/api/automations/{id} \
  --header 'Content-Type: application/json' \
  --cookie jt_session= \
  --data '
{
  "site": "<string>",
  "task": "<string>",
  "mcp_enabled": true
}
'
import requests

url = "https://api.jinbatrail.indx.jp/api/automations/{id}"

payload = {
"site": "<string>",
"task": "<string>",
"mcp_enabled": True
}
headers = {
"cookie": "jt_session=",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {cookie: 'jt_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({site: '<string>', task: '<string>', mcp_enabled: true})
};

fetch('https://api.jinbatrail.indx.jp/api/automations/{id}', 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/api/automations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'site' => '<string>',
'task' => '<string>',
'mcp_enabled' => true
]),
CURLOPT_COOKIE => "jt_session=",
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://api.jinbatrail.indx.jp/api/automations/{id}"

payload := strings.NewReader("{\n \"site\": \"<string>\",\n \"task\": \"<string>\",\n \"mcp_enabled\": true\n}")

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

req.Header.Add("cookie", "jt_session=")
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.patch("https://api.jinbatrail.indx.jp/api/automations/{id}")
.header("cookie", "jt_session=")
.header("Content-Type", "application/json")
.body("{\n \"site\": \"<string>\",\n \"task\": \"<string>\",\n \"mcp_enabled\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.jinbatrail.indx.jp/api/automations/{id}")

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

request = Net::HTTP::Patch.new(url)
request["cookie"] = 'jt_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"site\": \"<string>\",\n \"task\": \"<string>\",\n \"mcp_enabled\": true\n}"

response = http.request(request)
puts response.read_body
{
  "automation": {
    "id": "<string>",
    "org_id": "<string>",
    "name": "<string>",
    "task": "<string>",
    "site": "<string>",
    "mcp_enabled": true,
    "created_at": "<string>",
    "live_digest": "<string>",
    "calls_7d": 123,
    "last_run_at": "<string>",
    "needs_attention": true,
    "rerecord_href": "<string>"
  }
}
{
"error": "<string>",
"issues": [
{}
]
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}

承認

jt_session
string
cookie
必須

The dashboard's signed, HttpOnly session cookie (packages/service/src/auth.ts): base64url(payload).base64url(hmac-sha256), absolute 30-day lifetime, SameSite=Lax, Secure on any TLS deployment. Minted by POST /api/auth/signup or POST /api/auth/login (or, outside production, auto-provisioned by GET /api/session). Because it is HttpOnly, it cannot be read or attached by a browser-based API-reference "Try it" panel across origins — exercise these routes with a real logged-in browser session or a cookie-jar HTTP client.

パスパラメータ

id
string
必須

ボディ

application/json
site
string
Minimum string length: 1
task
string
mcp_enabled
boolean

Owner-only to set.

レスポンス

The updated automation.

automation
object
必須

The product's core object — an Automation (the engine's Flow). name is the public /v1/run/:flow endpoint and unique per org. status gates running: draft (never runnable), published (live), failing (a locator drift was detected — see needs_attention/rerecord_href).