コンテンツにスキップ

標準の差出人を置き換える

PUT
/api/v1/email/sender
curl --request PUT \
--url https://app.goyoka.com/api/v1/email/sender \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "sender_name": "example", "reply_to_email": "example", "legal_name": "example", "legal_address": "example" }'

鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED(NOT_CURRENT_MEMBER)です。data.sender⁠の保存4欄すべてを送ります。4欄ともnull⁠を受け、sender_name⁠がnull⁠ならお店の名前で表示します(表示専用の投影はeffective_sender⁠にあります)。返信先(reply_to_email)がnull⁠または空文字なら、以後の送信でReply-To⁠を付けません(お店名のような既定値へのfallback⁠はありません)。legal_name・legal_address⁠のnull⁠は法定表示の解除です。返信先・法定表示の空文字もnull⁠として保存します。完全一致の往復は業務検査より先に200⁠で書き込みません。legal_name・legal_address⁠が空欄なら、新しいお知らせの予約を拒否し、予約に連動するお知らせの送信も止めます。すでに予約済み(SCHEDULED)の配信は後続の取消し処理でDRAFT⁠へ戻ることがありますが、配信サービスへの登録が進んだ分や送信中のものは止まりません。任意の冪等キーを使えます。

保存時のメールは0通で、既存予約の状態は変えません。

保存競合は409 EMAIL_OPERATION_BLOCKED⁠で、details.blocks[].code⁠はCONCURRENT_UPDATE⁠です。

必要な範囲: email:write

ヘッダーのパラメータ

「ヘッダーのパラメータ」の節へ
Idempotency-Key
string

同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSED⁠です。

メディアタイプapplication/json
object
sender_name
必須
string | null
reply_to_email
必須
string | null
legal_name
必須
string | null
legal_address
必須
string | null
例自動生成
{
"sender_name": "example",
"reply_to_email": "example",
"legal_name": "example",
"legal_address": "example"
}

標準の差出人を置き換える

メディアタイプapplication/json
object
data
必須
object
sender_name
必須
string | null
reply_to_email
必須
string | null
legal_name
必須
string | null
legal_address
必須
string | null
例自動生成
{
"data": {
"sender_name": "example",
"reply_to_email": "example",
"legal_name": "example",
"legal_address": "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"
}
}