curl --request PATCH \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"use_ab_test": true,
"send_type": "<string>",
"send_date": "2023-12-25",
"send_day": 123,
"send_hour": 11,
"send_min": 29,
"base_date": "<string>",
"mail": {},
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"sms": {
"message": "<string>"
},
"action_id": "<string>",
"shorten_domain": "<string>",
"conditions": [
{}
],
"url_actions": [
{}
]
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
payload = {
"title": "<string>",
"use_ab_test": True,
"send_type": "<string>",
"send_date": "2023-12-25",
"send_day": 123,
"send_hour": 11,
"send_min": 29,
"base_date": "<string>",
"mail": {},
"line": {
"sender_id": "<string>",
"messages": [{}]
},
"sms": { "message": "<string>" },
"action_id": "<string>",
"shorten_domain": "<string>",
"conditions": [{}],
"url_actions": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
use_ab_test: true,
send_type: '<string>',
send_date: '2023-12-25',
send_day: 123,
send_hour: 11,
send_min: 29,
base_date: '<string>',
mail: {},
line: {sender_id: '<string>', messages: [{}]},
sms: {message: '<string>'},
action_id: '<string>',
shorten_domain: '<string>',
conditions: [{}],
url_actions: [{}]
})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_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.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_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([
'title' => '<string>',
'use_ab_test' => true,
'send_type' => '<string>',
'send_date' => '2023-12-25',
'send_day' => 123,
'send_hour' => 11,
'send_min' => 29,
'base_date' => '<string>',
'mail' => [
],
'line' => [
'sender_id' => '<string>',
'messages' => [
[
]
]
],
'sms' => [
'message' => '<string>'
],
'action_id' => '<string>',
'shorten_domain' => '<string>',
'conditions' => [
[
]
],
'url_actions' => [
[
]
]
]),
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.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"use_ab_test\": true,\n \"send_type\": \"<string>\",\n \"send_date\": \"2023-12-25\",\n \"send_day\": 123,\n \"send_hour\": 11,\n \"send_min\": 29,\n \"base_date\": \"<string>\",\n \"mail\": {},\n \"line\": {\n \"sender_id\": \"<string>\",\n \"messages\": [\n {}\n ]\n },\n \"sms\": {\n \"message\": \"<string>\"\n },\n \"action_id\": \"<string>\",\n \"shorten_domain\": \"<string>\",\n \"conditions\": [\n {}\n ],\n \"url_actions\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"use_ab_test\": true,\n \"send_type\": \"<string>\",\n \"send_date\": \"2023-12-25\",\n \"send_day\": 123,\n \"send_hour\": 11,\n \"send_min\": 29,\n \"base_date\": \"<string>\",\n \"mail\": {},\n \"line\": {\n \"sender_id\": \"<string>\",\n \"messages\": [\n {}\n ]\n },\n \"sms\": {\n \"message\": \"<string>\"\n },\n \"action_id\": \"<string>\",\n \"shorten_domain\": \"<string>\",\n \"conditions\": [\n {}\n ],\n \"url_actions\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"use_ab_test\": true,\n \"send_type\": \"<string>\",\n \"send_date\": \"2023-12-25\",\n \"send_day\": 123,\n \"send_hour\": 11,\n \"send_min\": 29,\n \"base_date\": \"<string>\",\n \"mail\": {},\n \"line\": {\n \"sender_id\": \"<string>\",\n \"messages\": [\n {}\n ]\n },\n \"sms\": {\n \"message\": \"<string>\"\n },\n \"action_id\": \"<string>\",\n \"shorten_domain\": \"<string>\",\n \"conditions\": [\n {}\n ],\n \"url_actions\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"title": "<string>",
"mail": {},
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"sms": {},
"url_actions": [
{}
]
},
"warnings": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "認証に失敗しました"
}
}{
"error": {
"code": "not_found",
"message": "リソースが見つかりません"
}
}{
"error": {
"code": "conflict",
"message": "送信中または完了済みのメッセージは更新できません。"
}
}{
"error": {
"code": "validation_error",
"message": "バリデーションエラーが発生しました"
}
}{
"error": {
"code": "cooldown_active",
"message": "キュー作成後5分間は再作成できません",
"details": {
"retry_after": "2026-06-19 12:39:56"
}
}
}配信メッセージ更新
プレビュー機能。仕様は今後変更される可能性があります。 配信メッセージを部分更新します。指定したフィールドのみ変更され、省略したフィールドは既存値を維持します。
channelとtypeは変更できません(既存と異なる値を指定すると422)。- 空のボディは何も変更しません(
200で現在値を返します)。 conditions/url_actions/line.messagesは指定すると全件置換されます。statusをdraft→reservedにすると予約実行(配信予約作成)、reserved→draftにすると予約解除(配信予約削除)が行われます。reserved状態のメッセージで送信日時・条件・A/Bテストを変更すると配信予約が自動で再作成されます。再作成から5分間は再変更できず、429 cooldown_active(details.retry_afterに再試行可能になる日時(Y-m-d H:i:s形式の文字列))が返ります。sending/completedのメッセージは更新できません(409)。
curl --request PATCH \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"use_ab_test": true,
"send_type": "<string>",
"send_date": "2023-12-25",
"send_day": 123,
"send_hour": 11,
"send_min": 29,
"base_date": "<string>",
"mail": {},
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"sms": {
"message": "<string>"
},
"action_id": "<string>",
"shorten_domain": "<string>",
"conditions": [
{}
],
"url_actions": [
{}
]
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
payload = {
"title": "<string>",
"use_ab_test": True,
"send_type": "<string>",
"send_date": "2023-12-25",
"send_day": 123,
"send_hour": 11,
"send_min": 29,
"base_date": "<string>",
"mail": {},
"line": {
"sender_id": "<string>",
"messages": [{}]
},
"sms": { "message": "<string>" },
"action_id": "<string>",
"shorten_domain": "<string>",
"conditions": [{}],
"url_actions": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
use_ab_test: true,
send_type: '<string>',
send_date: '2023-12-25',
send_day: 123,
send_hour: 11,
send_min: 29,
base_date: '<string>',
mail: {},
line: {sender_id: '<string>', messages: [{}]},
sms: {message: '<string>'},
action_id: '<string>',
shorten_domain: '<string>',
conditions: [{}],
url_actions: [{}]
})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_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.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_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([
'title' => '<string>',
'use_ab_test' => true,
'send_type' => '<string>',
'send_date' => '2023-12-25',
'send_day' => 123,
'send_hour' => 11,
'send_min' => 29,
'base_date' => '<string>',
'mail' => [
],
'line' => [
'sender_id' => '<string>',
'messages' => [
[
]
]
],
'sms' => [
'message' => '<string>'
],
'action_id' => '<string>',
'shorten_domain' => '<string>',
'conditions' => [
[
]
],
'url_actions' => [
[
]
]
]),
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.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"use_ab_test\": true,\n \"send_type\": \"<string>\",\n \"send_date\": \"2023-12-25\",\n \"send_day\": 123,\n \"send_hour\": 11,\n \"send_min\": 29,\n \"base_date\": \"<string>\",\n \"mail\": {},\n \"line\": {\n \"sender_id\": \"<string>\",\n \"messages\": [\n {}\n ]\n },\n \"sms\": {\n \"message\": \"<string>\"\n },\n \"action_id\": \"<string>\",\n \"shorten_domain\": \"<string>\",\n \"conditions\": [\n {}\n ],\n \"url_actions\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"use_ab_test\": true,\n \"send_type\": \"<string>\",\n \"send_date\": \"2023-12-25\",\n \"send_day\": 123,\n \"send_hour\": 11,\n \"send_min\": 29,\n \"base_date\": \"<string>\",\n \"mail\": {},\n \"line\": {\n \"sender_id\": \"<string>\",\n \"messages\": [\n {}\n ]\n },\n \"sms\": {\n \"message\": \"<string>\"\n },\n \"action_id\": \"<string>\",\n \"shorten_domain\": \"<string>\",\n \"conditions\": [\n {}\n ],\n \"url_actions\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"use_ab_test\": true,\n \"send_type\": \"<string>\",\n \"send_date\": \"2023-12-25\",\n \"send_day\": 123,\n \"send_hour\": 11,\n \"send_min\": 29,\n \"base_date\": \"<string>\",\n \"mail\": {},\n \"line\": {\n \"sender_id\": \"<string>\",\n \"messages\": [\n {}\n ]\n },\n \"sms\": {\n \"message\": \"<string>\"\n },\n \"action_id\": \"<string>\",\n \"shorten_domain\": \"<string>\",\n \"conditions\": [\n {}\n ],\n \"url_actions\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"title": "<string>",
"mail": {},
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"sms": {},
"url_actions": [
{}
]
},
"warnings": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "認証に失敗しました"
}
}{
"error": {
"code": "not_found",
"message": "リソースが見つかりません"
}
}{
"error": {
"code": "conflict",
"message": "送信中または完了済みのメッセージは更新できません。"
}
}{
"error": {
"code": "validation_error",
"message": "バリデーションエラーが発生しました"
}
}{
"error": {
"code": "cooldown_active",
"message": "キュー作成後5分間は再作成できません",
"details": {
"retry_after": "2026-06-19 12:39:56"
}
}
}PATCH
https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}
Authorizations
APIキーをBearerトークンとして指定
Path Parameters
アカウントID
シナリオID
メッセージID
Body
配信メッセージ更新リクエスト(部分更新)。指定したフィールドのみ変更され、省略した
フィールドは既存値を維持します。channel / type は変更できません(異なる値を指定すると
422)。conditions / url_actions / line.messages は指定すると全件置換されます。
ステータス。draft→reserved で予約実行(配信予約作成)、reserved→draft で予約解除(配信予約削除)。
draft, reserved 管理名称
255A/Bテスト使用
送信タイプ(message_create と同じ)
送信日(broadcast用、YYYY-MM-DD)
送信日数(step / reminder 用)
送信時(0-23)
0 <= x <= 23送信分(0-59)
0 <= x <= 59送信タイミング(reminder用)
before, after, today, addition_before, addition_after 基準日の読者項目名(reminder用)
ステップ送信タイプ(step用)
none, immediately メール原稿(省略時は既存維持)。type は変更不可のため指定不要。
LINE原稿(省略時は既存維持)。messages 指定時は全件置換。sender_id のみの指定も可。
Show child attributes
Show child attributes
SMS原稿(省略時は既存維持)
Show child attributes
Show child attributes
配信後に実行するアクションID。null で解除。
URL置換方法
shorten_url, original_url URL置換ドメイン。null で解除。
配信条件(指定時は全件置換、空配列で条件解除)
URLアクション(指定時は全件置換、空配列でクリア)
Response
更新された配信メッセージ
配信メッセージの詳細。共通フィールドに加え、type に応じた送信タイミング系フィールド
(send_type / send_date / send_day / send_hour / send_min / base_date /
send_timing / step_send_type 等)と、channel に応じた原稿(mail / line / sms)、
url_actions を含みます。
Show child attributes
Show child attributes
reserved 状態でメールを変更した場合に、配信解除URL欠如・DKIM未設定などが検出されると返されることがあります。