Skip to main content
配信メッセージ更新
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": [
    {}
  ]
}
'
{
  "data": {
    "id": "<string>",
    "title": "<string>",
    "mail": {},
    "line": {
      "sender_id": "<string>",
      "messages": [
        {}
      ]
    },
    "sms": {},
    "url_actions": [
      {}
    ]
  },
  "warnings": [
    "<string>"
  ]
}
PATCH
https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}
この機能はプレビュー版です。仕様が変更される場合があります。

Authorizations

Authorization
string
header
required

APIキーをBearerトークンとして指定

Path Parameters

account_id
string
required

アカウントID

scenario_id
string
required

シナリオID

message_id
string
required

メッセージID

Body

application/json

配信メッセージ更新リクエスト(部分更新)。指定したフィールドのみ変更され、省略した フィールドは既存値を維持します。channel / type は変更できません(異なる値を指定すると 422)。conditions / url_actions / line.messages は指定すると全件置換されます。

status
enum<string>

ステータス。draftreserved で予約実行(配信予約作成)、reserveddraft で予約解除(配信予約削除)。

Available options:
draft,
reserved
title
string | null

管理名称

Maximum string length: 255
use_ab_test
boolean | null

A/Bテスト使用

send_type
string

送信タイプ(message_create と同じ)

send_date
string<date>

送信日(broadcast用、YYYY-MM-DD)

send_day
integer

送信日数(step / reminder 用)

send_hour
integer

送信時(0-23)

Required range: 0 <= x <= 23
send_min
integer

送信分(0-59)

Required range: 0 <= x <= 59
send_timing
enum<string>

送信タイミング(reminder用)

Available options:
before,
after,
today,
addition_before,
addition_after
base_date
string

基準日の読者項目名(reminder用)

step_send_type
enum<string>

ステップ送信タイプ(step用)

Available options:
none,
immediately
mail
object

メール原稿(省略時は既存維持)。type は変更不可のため指定不要。

line
object

LINE原稿(省略時は既存維持)。messages 指定時は全件置換。sender_id のみの指定も可。

sms
object

SMS原稿(省略時は既存維持)

action_id
string | null

配信後に実行するアクションID。null で解除。

shorten_type
enum<string>

URL置換方法

Available options:
shorten_url,
original_url
shorten_domain
string | null

URL置換ドメイン。null で解除。

conditions
object[]

配信条件(指定時は全件置換、空配列で条件解除)

url_actions
object[]

URLアクション(指定時は全件置換、空配列でクリア)

Response

更新された配信メッセージ

data
object

配信メッセージの詳細。共通フィールドに加え、type に応じた送信タイミング系フィールド (send_type / send_date / send_day / send_hour / send_min / base_date / send_timing / step_send_type 等)と、channel に応じた原稿(mail / line / sms)、 url_actions を含みます。

warnings
string[]

reserved 状態でメールを変更した場合に、配信解除URL欠如・DKIM未設定などが検出されると返されることがあります。