配信メッセージ詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"channel": "mail",
"type": "broadcast",
"status": "draft",
"title": "<string>",
"send_type": "immediately",
"send_date": "2023-12-25",
"send_day": 123,
"send_hour": 123,
"send_min": 123,
"send_timing": "before",
"base_date": "<string>",
"step_send_type": "none",
"use_ab_test": true,
"shorten_type": "shorten_url",
"shorten_domain": "<string>",
"action_id": "<string>",
"action_details": [
{
"type": "scenario",
"scenario_id": "<string>",
"scenario_action": "register",
"scenario_registration_type": "prohibit_multiple_registrations",
"use_inheriting_partner": false,
"use_inheriting_phone": false,
"account_id": "<string>",
"add_label_id": "<string>",
"delete_label_id": "<string>",
"message": "<string>",
"line_template_id": "<string>",
"rich_menu_id": "<string>",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"bundle_course_id": "<string>",
"product_id": "<string>",
"funnel_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"conditions": [
{
"rules": [
{
"key": "<string>",
"condition": "<string>",
"value": "<unknown>"
}
]
}
],
"mail": {
"id": "<string>",
"type": "plain_text",
"from_name": "<string>",
"from_mail": "<string>",
"subject": "<string>",
"subject_pattern_b": "<string>",
"text": "<string>",
"width": 123,
"bordertype": "<string>",
"background_color": "<string>",
"padding_y": 123,
"padding_x": 123,
"elements": [
{}
],
"preview_text": "<string>"
},
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"sms": {
"id": "<string>",
"message": "<string>"
},
"url_actions": [
{
"url": "<string>",
"action_id": "<string>",
"action_details": [
{
"type": "scenario",
"scenario_id": "<string>",
"scenario_action": "register",
"scenario_registration_type": "prohibit_multiple_registrations",
"use_inheriting_partner": false,
"use_inheriting_phone": false,
"account_id": "<string>",
"add_label_id": "<string>",
"delete_label_id": "<string>",
"message": "<string>",
"line_template_id": "<string>",
"rich_menu_id": "<string>",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"bundle_course_id": "<string>",
"product_id": "<string>",
"funnel_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"expiration_type": "none",
"expiration_day": 182,
"expiration_hour": 11,
"expiration_min": 29,
"expiration_date": "2023-12-25",
"expiration_redirect_url": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}メッセージ
配信メッセージ詳細取得
配信メッセージの詳細情報を取得します。媒体に応じた原稿全体(メール本文・LINEメッセージ・SMS本文)と URLアクション(url_actions)を含みます。
url_actionsにはこのメッセージに設定した行のみが含まれます(送信時に自動生成される計測用の行は含まれません)。- 配信後に実行するアクションは
action_idとaction_detailsで返ります。action_detailsは、このメッセージの中で直接作ったアクション(画面の「新規にアクションを追加」、または作成・更新のaction_detailsで作ったもの)が設定されているときだけ動作の配列になり、アクション管理のアクションを参照しているとき・未設定のときはnullです。url_actionsの各行のaction_detailsも同じです。 action_detailsが配列のときのaction_idはその設定箇所専用で、他のメッセージや他の行のaction_idには指定できません。
配信メッセージ詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"channel": "mail",
"type": "broadcast",
"status": "draft",
"title": "<string>",
"send_type": "immediately",
"send_date": "2023-12-25",
"send_day": 123,
"send_hour": 123,
"send_min": 123,
"send_timing": "before",
"base_date": "<string>",
"step_send_type": "none",
"use_ab_test": true,
"shorten_type": "shorten_url",
"shorten_domain": "<string>",
"action_id": "<string>",
"action_details": [
{
"type": "scenario",
"scenario_id": "<string>",
"scenario_action": "register",
"scenario_registration_type": "prohibit_multiple_registrations",
"use_inheriting_partner": false,
"use_inheriting_phone": false,
"account_id": "<string>",
"add_label_id": "<string>",
"delete_label_id": "<string>",
"message": "<string>",
"line_template_id": "<string>",
"rich_menu_id": "<string>",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"bundle_course_id": "<string>",
"product_id": "<string>",
"funnel_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"conditions": [
{
"rules": [
{
"key": "<string>",
"condition": "<string>",
"value": "<unknown>"
}
]
}
],
"mail": {
"id": "<string>",
"type": "plain_text",
"from_name": "<string>",
"from_mail": "<string>",
"subject": "<string>",
"subject_pattern_b": "<string>",
"text": "<string>",
"width": 123,
"bordertype": "<string>",
"background_color": "<string>",
"padding_y": 123,
"padding_x": 123,
"elements": [
{}
],
"preview_text": "<string>"
},
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"sms": {
"id": "<string>",
"message": "<string>"
},
"url_actions": [
{
"url": "<string>",
"action_id": "<string>",
"action_details": [
{
"type": "scenario",
"scenario_id": "<string>",
"scenario_action": "register",
"scenario_registration_type": "prohibit_multiple_registrations",
"use_inheriting_partner": false,
"use_inheriting_phone": false,
"account_id": "<string>",
"add_label_id": "<string>",
"delete_label_id": "<string>",
"message": "<string>",
"line_template_id": "<string>",
"rich_menu_id": "<string>",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"bundle_course_id": "<string>",
"product_id": "<string>",
"funnel_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"expiration_type": "none",
"expiration_day": 182,
"expiration_hour": 11,
"expiration_min": 29,
"expiration_date": "2023-12-25",
"expiration_redirect_url": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}GET
https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/messages/{message_id}