会話を始める
POST
/api/v1/conversations
const url = 'https://app.goyoka.com/api/v1/conversations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"customer_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","subject":"example","body":"example","sender_profile_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.goyoka.com/api/v1/conversations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "customer_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "subject": "example", "body": "example", "sender_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'登録済みの
customers:contactが
宛先の
毎分の
会話開始・返信と
同じ
必要なmessages:write
customers:contact が
必要な認証
「必要なパラメータ
「 パラメータ 」のヘッダーのパラメータ
「ヘッダーのIdempotency-Key
string
同じ
リクエスト本文必須
「リクエスト本文必須」のメディアタイプapplication/json
object
customer_id
必須
string 形式: uuid
subject
必須
string
body
必須
string
sender_profile_id
string | null 形式: uuid
例自動生成
{ "customer_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "subject": "example", "body": "example", "sender_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}レスポンス
「 レスポンス 」の201
「201」の会話を
メディアタイプapplication/json
object
data
必須
object
id
必須
string 形式: uuid
customer_id
必須
string | null 形式: uuid
subject
必須
string
contact_name
必須
string
contact
必須
object
email
必須
string | null
status
必須
string
channel
必須
string
booking_id
必須
string | null 形式: uuid
sender_profile_id
必須
string | null 形式: uuid
last_message_at
必須
string 形式: date-time
created_at
必須
string 形式: date-time
updated_at
必須
string 形式: date-time
例
{ "data": { "status": "OPEN", "channel": "EMAIL" }}400
「400」の利用できない
メディアタイプ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" }}401
「401」の鍵が
メディアタイプ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" }}403
「403」の範囲不足
メディアタイプ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" }}404
「404」の見つからない
メディアタイプ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" }}409
「409」の予約・冪等キーの
メディアタイプ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" }}413
「413」の本文が
メディアタイプ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" }}422
「422」の入力の
メディアタイプ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" }}429
「429」の回数の
メディアタイプ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
固定窓内の
RateLimit-Remaining
integer
固定窓内の
RateLimit-Reset
integer
窓終了までの
Retry-After
integer
再試行までの
500
「500」の内部エラー
メディアタイプ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" }}