コンテンツにスキップ

連絡先をブロックする

POST
/api/v1/settings/blocked-contacts
curl --request POST \
--url https://app.goyoka.com/api/v1/settings/blocked-contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "example", "note": "example" }'

email⁠は必須で、salon-settings:write⁠に加えてcustomers:contact⁠が必要です。範囲がない場合は、空文字・新規・重複・冪等再送とも403⁠で何も保存しません。email⁠は前後の空白を除き小文字化して320文字以内の形式を検査し、note⁠は前後の空白を除き空ならnull⁠にします。

409 SETTINGS_OPERATION_BLOCKED⁠のdetails.blocks⁠はcode⁠とmessage⁠の1要素配列です。新規も重複も201⁠で返し、重複時は元のid・note・created_at⁠を保持します。応答のcontact⁠にメールアドレスとnote⁠をまとめ、返却時のcustomers:contact⁠で伏せます。created⁠で新規作成かどうかを返します。公開予約、イベント申込み・待機、問い合わせ、新しいお客様返信、ログインリンク要求を入口で止めます。拒否を相手へ知らせないため、問い合わせなどは送信済みに見せて保存も配送もしません。既存予約・既存の会話・購読・同意・予定配信・既存リマインドは取り消しません。お知らせ配信の配信停止ではありません。API の手動予約(booking_create)はこの制限を受けません。保存時のメール送信は0通です。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:NOT_CURRENT_MEMBER)です。任意の冪等キーを使えます。

必要な範囲: salon-settings:write

customers:contact があるとメールアドレスと自由記述note⁠が入る。電話番号は含まない。

ヘッダーのパラメータ

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

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

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

連絡先をブロックする

メディアタイプapplication/json
object
data
必須
object
id
必須
string 形式: uuid
contact
必須
object
email
必須
string
note
必須
string | null
created_at
必須
string 形式: date-time
created

新規作成はtrue、重複はfalse。追加前に保存された冪等応答では省略されます。

boolean
例自動生成
{
"data": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"contact": {
"email": "example",
"note": "example"
},
"created_at": "2026-04-15T12:00:00Z"
},
"created": true
}

利用できないヘッダ

メディアタイプ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"
}
}