コンテンツにスキップ

一斉送信の下見(人数の確認)

GET
/api/v1/email/announcements/{id}/audience
curl --request GET \
--url https://app.goyoka.com/api/v1/email/announcements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/audience \
--header 'Authorization: Bearer <token>'

お客様の名前・メールアドレスは返さず、人数だけを返します。DRAFT⁠のお知らせだけ下見できます。下見は予約の時点で数え直します。scheduled_at⁠を渡すと予約と同じ期で数え、前後24時間未満に送る予定・送信済みのお知らせがあればblocks⁠にANNOUNCEMENT_SCHEDULE_TOO_CLOSE⁠を足します(ちょうど24時間は可。この間隔の上限はAPI⁠の予約だけに掛かり、管理画面の予約には掛かりません)。scheduled_at⁠を省略すると現在時刻で数え、その場合はANNOUNCEMENT_SCHEDULE_TOO_CLOSE⁠を出しません。

配信直前には対象を作り直し、同意の取消し・除外・不達の人は外れ、新しく同意した人は枠が残れば加わるため、予約時と届く人数は変わることがあります。

必要な範囲: email:read

id
必須
string 形式: uuid
scheduled_at
string 形式: date-time

一斉送信の下見(人数の確認)

メディアタイプapplication/json
object
data
必須
object
announcement_id
必須
string 形式: uuid
audience
必須
string
event_id
必須
string | null 形式: uuid
occurrence_id
必須
string | null 形式: uuid
counted_at
必須
string 形式: date-time
candidate_count
必須
integer
recipient_count
必須
integer
skipped_monthly_cap_count
必須
integer
quota
必須
object
limit
必須
integer | null
cap_per_recipient
必須

課金 ON は支払う人のプランの1人あたりの通数。OFF は人数枠があるとき5、上限なしのとき null。

integer | null
used
必須
integer
adding
必須
integer
remaining
必須
integer | null
exceeded
必須
boolean
period_starts_at
必須
string | null 形式: date-time
period_ends_at
必須
string | null 形式: date-time
blocks
必須
Array<object>
object
code
必須
string
message
必須
string
例自動生成
{
"data": {
"announcement_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"audience": "example",
"event_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"occurrence_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"counted_at": "2026-04-15T12:00:00Z",
"candidate_count": 1,
"recipient_count": 1,
"skipped_monthly_cap_count": 1,
"quota": {
"limit": 1,
"cap_per_recipient": 1,
"used": 1,
"adding": 1,
"remaining": 1,
"exceeded": true,
"period_starts_at": "2026-04-15T12:00:00Z",
"period_ends_at": "2026-04-15T12:00:00Z"
},
"blocks": [
{
"code": "example",
"message": "example"
}
]
}
}

利用できないヘッダ

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

鍵が無い・無効

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

範囲不足

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

見つからない

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

予約・冪等キーの競合

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

本文が1 MiB⁠を超えている

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

入力の検証失敗

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

回数の上限

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}
RateLimit-Limit
integer
>= 1

固定窓内の回数上限

RateLimit-Remaining
integer

固定窓内の残り回数

RateLimit-Reset
integer

窓終了までの秒数

Retry-After
integer
>= 1

再試行までの待機秒数

内部エラー

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}