{"openapi":"3.1.0","info":{"title":"Braidport API","version":"2026-11-01","description":"One REST API for WhatsApp, Instagram, Messenger, Telegram and Google. Docs: https://braidport.com/docs"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A workspace key (bp_ws_…) or an organization key (bp_org_…)."}},"schemas":{"ErrorInput":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","account_suspended","not_found","validation_failed","conflict","rate_limited","idempotency_conflict","plan_limit_reached","quota_exceeded","subscription_inactive","feature_not_in_plan","channel_not_found","channel_not_active","channel_needs_reauth","channel_message_access_disabled","scope_missing","unsupported_message_type","interactive_limits_exceeded","message_too_long","recipient_invalid","window_closed","recipient_unreachable","recipient_blocked","template_not_found","template_invalid","media_invalid","media_too_large","media_fetch_failed","provider_rate_limited","provider_billing_issue","provider_account_restricted","provider_error","provider_unavailable","internal_error"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retry_after_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"hint":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provider":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"}},"required":["name"]},"request_id":{"type":"string"}},"required":["code","message","retryable","request_id"]}},"required":["error"],"description":"Every failure. `code` is stable and documented; `hint` says what to do next; `request_id` identifies the request for support."},"EventInput":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"message.received"},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","const":"inbound"},"source":{"type":"null"},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"]},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"]}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"]},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"]},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"]}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"]}}},"required":["name","phones","emails"]}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"]},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"]},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"]},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"]},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"]},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"]},"raw":{}},"required":["message"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"message.sent"},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","const":"outbound"},"source":{"type":"string","enum":["api","business_app","page_inbox","other"]},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"]},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"]}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"]},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"]},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"]}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"]}}},"required":["name","phones","emails"]}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"]},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"]},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"]},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"]},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"]},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"]},"raw":{}},"required":["message"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"message.status"},"data":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["sent","delivered","read","played","failed"]},"recipient":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"client_reference":{"type":["string","null"]},"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","account_suspended","not_found","validation_failed","conflict","rate_limited","idempotency_conflict","plan_limit_reached","quota_exceeded","subscription_inactive","feature_not_in_plan","channel_not_found","channel_not_active","channel_needs_reauth","channel_message_access_disabled","scope_missing","unsupported_message_type","interactive_limits_exceeded","message_too_long","recipient_invalid","window_closed","recipient_unreachable","recipient_blocked","template_not_found","template_invalid","media_invalid","media_too_large","media_fetch_failed","provider_rate_limited","provider_billing_issue","provider_account_restricted","provider_error","provider_unavailable","internal_error"]},"provider_code":{"type":"string"}},"required":["code"]},"pricing":{"type":"object","properties":{"billable":{"type":"boolean"},"category":{"type":"string"},"type":{"type":"string"}},"required":["billable","category","type"]},"raw":{}},"required":["provider_message_id","conversation_id","status","recipient","timestamp"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"message.edited"},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","enum":["inbound","outbound"]},"source":{"anyOf":[{"type":"string","enum":["api","business_app","page_inbox","other"]},{"type":"null"}]},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"]},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"]}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"]},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"]},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"]}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"]}}},"required":["name","phones","emails"]}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"]},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"]},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"]},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"]},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"]},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"]},"raw":{}},"required":["message"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"message.deleted"},"data":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"raw":{}},"required":["provider_message_id","conversation_id"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"channel.connected"},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"channel.disconnected"},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"channel.status_changed"},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"]},"type":{"type":"string","const":"template.status_changed"},"data":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"language":{"type":"string","minLength":1},"status":{"type":"string","enum":["approved","pending","rejected","paused","disabled","in_appeal","pending_deletion","archived","limit_exceeded","locked"]},"category":{"type":"string","enum":["marketing","utility","authentication"]},"reason":{"type":["string","null"]}},"required":["id","name","language","status","category"]}},"required":["template"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"channel":{"type":"null"},"type":{"type":"string","const":"ping"},"data":{"type":"object","properties":{"endpoint_id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"}},"required":["endpoint_id"]}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"]}],"description":"Envelope POSTed to webhook endpoints and returned by GET /v1/events. De-duplicate on `id`: delivery is at-least-once."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","account_suspended","not_found","validation_failed","conflict","rate_limited","idempotency_conflict","plan_limit_reached","quota_exceeded","subscription_inactive","feature_not_in_plan","channel_not_found","channel_not_active","channel_needs_reauth","channel_message_access_disabled","scope_missing","unsupported_message_type","interactive_limits_exceeded","message_too_long","recipient_invalid","window_closed","recipient_unreachable","recipient_blocked","template_not_found","template_invalid","media_invalid","media_too_large","media_fetch_failed","provider_rate_limited","provider_billing_issue","provider_account_restricted","provider_error","provider_unavailable","internal_error"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"retry_after_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"hint":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"provider":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"}},"required":["name"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["code","message","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every failure. `code` is stable and documented; `hint` says what to do next; `request_id` identifies the request for support."},"Event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"message.received"},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","const":"inbound"},"source":{"type":"null"},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"],"additionalProperties":false},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"],"additionalProperties":false}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"],"additionalProperties":false},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"],"additionalProperties":false}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"],"additionalProperties":false}}},"required":["name","phones","emails"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"],"additionalProperties":false},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"],"additionalProperties":false},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"],"additionalProperties":false},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"],"additionalProperties":false},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"],"additionalProperties":false},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"],"additionalProperties":false},"raw":{}},"required":["message"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"message.sent"},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","const":"outbound"},"source":{"type":"string","enum":["api","business_app","page_inbox","other"]},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"],"additionalProperties":false},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"],"additionalProperties":false}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"],"additionalProperties":false},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"],"additionalProperties":false}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"],"additionalProperties":false}}},"required":["name","phones","emails"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"],"additionalProperties":false},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"],"additionalProperties":false},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"],"additionalProperties":false},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"],"additionalProperties":false},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"],"additionalProperties":false},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"],"additionalProperties":false},"raw":{}},"required":["message"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"message.status"},"data":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["sent","delivered","read","played","failed"]},"recipient":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"client_reference":{"type":["string","null"]},"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","account_suspended","not_found","validation_failed","conflict","rate_limited","idempotency_conflict","plan_limit_reached","quota_exceeded","subscription_inactive","feature_not_in_plan","channel_not_found","channel_not_active","channel_needs_reauth","channel_message_access_disabled","scope_missing","unsupported_message_type","interactive_limits_exceeded","message_too_long","recipient_invalid","window_closed","recipient_unreachable","recipient_blocked","template_not_found","template_invalid","media_invalid","media_too_large","media_fetch_failed","provider_rate_limited","provider_billing_issue","provider_account_restricted","provider_error","provider_unavailable","internal_error"]},"provider_code":{"type":"string"}},"required":["code"],"additionalProperties":false},"pricing":{"type":"object","properties":{"billable":{"type":"boolean"},"category":{"type":"string"},"type":{"type":"string"}},"required":["billable","category","type"],"additionalProperties":false},"raw":{}},"required":["provider_message_id","conversation_id","status","recipient","timestamp"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"message.edited"},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","enum":["inbound","outbound"]},"source":{"anyOf":[{"type":"string","enum":["api","business_app","page_inbox","other"]},{"type":"null"}]},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"],"additionalProperties":false},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"],"additionalProperties":false}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"],"additionalProperties":false},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"],"additionalProperties":false}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"],"additionalProperties":false}}},"required":["name","phones","emails"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"],"additionalProperties":false},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"],"additionalProperties":false},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"],"additionalProperties":false},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"],"additionalProperties":false},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"],"additionalProperties":false},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"],"additionalProperties":false},"raw":{}},"required":["message"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"message.deleted"},"data":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"raw":{}},"required":["provider_message_id","conversation_id"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"channel.connected"},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"channel.disconnected"},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"channel.status_changed"},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","const":"template.status_changed"},"data":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"language":{"type":"string","minLength":1},"status":{"type":"string","enum":["approved","pending","rejected","paused","disabled","in_appeal","pending_deletion","archived","limit_exceeded","locked"]},"category":{"type":"string","enum":["marketing","utility","authentication"]},"reason":{"type":["string","null"]}},"required":["id","name","language","status","category"],"additionalProperties":false}},"required":["template"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"channel":{"type":"null"},"type":{"type":"string","const":"ping"},"data":{"type":"object","properties":{"endpoint_id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"}},"required":["endpoint_id"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false}],"description":"Envelope POSTed to webhook endpoints and returned by GET /v1/events. De-duplicate on `id`: delivery is at-least-once."}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the key's tightest rate-limit window (1200/min, 40/s).","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"Requests left in that window, this one included.","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"Seconds until that window starts over.","schema":{"type":"integer","minimum":1}}}},"paths":{"/v1/me":{"get":{"operationId":"getMe","summary":"The calling key, its organization, plan, limits and scopes","tags":["Account"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string"},"prefix":{"type":"string"},"kind":{"type":"string","enum":["workspace","organization"]},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","prefix","kind","workspace_id","expires_at","created_at"],"additionalProperties":false},"organization":{"type":"object","properties":{"id":{"type":"string","pattern":"^org_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"plan":{"type":"object","properties":{"tier":{"type":"string","enum":["none","builder","growth","scale"]},"name":{"type":"string"},"subscription_status":{"type":"string","enum":["none","trialing","active","past_due","canceled","unpaid","paused","incomplete"]},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"current_period_end":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["tier","name","subscription_status","trial_ends_at","current_period_end"],"additionalProperties":false},"limits":{"type":"object","properties":{"workspaces":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channels":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"events_per_month":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["workspaces","channels","events_per_month"],"additionalProperties":false},"features":{"type":"object","properties":{"white_label":{"type":"boolean"},"custom_domain":{"type":"boolean"},"provisioning_api":{"type":"boolean"}},"required":["white_label","custom_domain","provisioning_api"],"additionalProperties":false},"scopes":{"type":"array","items":{"type":"string","enum":["read","send","calendar","email","admin"]}}},"required":["key","organization","plan","limits","features","scopes"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"Event usage for a UTC calendar month (current month by default)","tags":["Account"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"in":"query","name":"period","required":false},{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"query","name":"workspace_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"period_start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"period_end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"plan_tier":{"type":"string","enum":["none","builder","growth","scale"]},"events_included":{"type":"integer","minimum":0,"maximum":9007199254740991},"events_used":{"type":"integer","minimum":0,"maximum":9007199254740991},"percent_used":{"type":"number","minimum":0},"outbound_blocked":{"type":"boolean"},"workspaces":{"type":"array","items":{"type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"events_inbound":{"type":"integer","minimum":0,"maximum":9007199254740991},"events_outbound":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workspace_id","events_inbound","events_outbound"],"additionalProperties":false}}},"required":["period","period_start","period_end","plan_tier","events_included","events_used","percent_used","outbound_blocked","workspaces"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/channels":{"get":{"operationId":"listChannels","summary":"List connected channels, including the workspace's sandbox channel","tags":["Channels"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"query","name":"workspace_id","required":false},{"schema":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"in":"query","name":"provider","required":false},{"schema":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"group_id":{"type":["string","null"]},"display_name":{"type":"string"},"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"status_reason":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"automations":{"anyOf":[{"type":"object","properties":{"auto_book":{"type":"boolean"},"auto_send_email":{"type":"boolean"}},"required":["auto_book","auto_send_email"],"additionalProperties":false},{"type":"null"}]},"billing":{"anyOf":[{"type":"string","enum":["ok","missing"]},{"type":"null"}]},"token_expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_outbound_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","account_suspended","not_found","validation_failed","conflict","rate_limited","idempotency_conflict","plan_limit_reached","quota_exceeded","subscription_inactive","feature_not_in_plan","channel_not_found","channel_not_active","channel_needs_reauth","channel_message_access_disabled","scope_missing","unsupported_message_type","interactive_limits_exceeded","message_too_long","recipient_invalid","window_closed","recipient_unreachable","recipient_blocked","template_not_found","template_invalid","media_invalid","media_too_large","media_fetch_failed","provider_rate_limited","provider_billing_issue","provider_account_restricted","provider_error","provider_unavailable","internal_error"]},"provider_code":{"type":["string","null"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["code","provider_code","at"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspace_id","provider","external_account_id","group_id","display_name","status","status_reason","scopes","automations","billing","token_expires_at","last_inbound_at","last_outbound_at","last_error","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/channels/{id}":{"get":{"operationId":"getChannel","summary":"Get one channel","tags":["Channels"],"parameters":[{"schema":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"group_id":{"type":["string","null"]},"display_name":{"type":"string"},"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"status_reason":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"automations":{"anyOf":[{"type":"object","properties":{"auto_book":{"type":"boolean"},"auto_send_email":{"type":"boolean"}},"required":["auto_book","auto_send_email"],"additionalProperties":false},{"type":"null"}]},"billing":{"anyOf":[{"type":"string","enum":["ok","missing"]},{"type":"null"}]},"token_expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_outbound_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","account_suspended","not_found","validation_failed","conflict","rate_limited","idempotency_conflict","plan_limit_reached","quota_exceeded","subscription_inactive","feature_not_in_plan","channel_not_found","channel_not_active","channel_needs_reauth","channel_message_access_disabled","scope_missing","unsupported_message_type","interactive_limits_exceeded","message_too_long","recipient_invalid","window_closed","recipient_unreachable","recipient_blocked","template_not_found","template_invalid","media_invalid","media_too_large","media_fetch_failed","provider_rate_limited","provider_billing_issue","provider_account_restricted","provider_error","provider_unavailable","internal_error"]},"provider_code":{"type":["string","null"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["code","provider_code","at"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspace_id","provider","external_account_id","group_id","display_name","status","status_reason","scopes","automations","billing","token_expires_at","last_inbound_at","last_outbound_at","last_error","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/channels/{id}/templates":{"get":{"operationId":"listTemplates","summary":"List the WhatsApp message templates of a channel","tags":["Templates"],"parameters":[{"schema":{"type":"string","enum":["approved","pending","rejected","paused","disabled","in_appeal","pending_deletion","archived","limit_exceeded","locked"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":32},"in":"query","name":"language","required":false},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"name","required":false},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"status":{"type":"string","enum":["approved","pending","rejected","paused","disabled","in_appeal","pending_deletion","archived","limit_exceeded","locked"]},"category":{"type":"string","enum":["marketing","utility","authentication"]},"parameter_format":{"type":"string","enum":["positional","named"]},"components":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"reason":{"type":["string","null"]},"quality":{"type":["string","null"]}},"required":["id","name","language","status","category","parameter_format","components","reason","quality"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createTemplate","summary":"Submit a WhatsApp message template for review","tags":["Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_]{1,512}$"},"language":{"type":"string","minLength":1,"maxLength":32},"category":{"type":"string","enum":["marketing","utility","authentication"]},"parameter_format":{"default":"positional","type":"string","enum":["positional","named"]},"components":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["name","language","category","components"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"status":{"type":"string","enum":["approved","pending","rejected","paused","disabled","in_appeal","pending_deletion","archived","limit_exceeded","locked"]},"category":{"type":"string","enum":["marketing","utility","authentication"]},"parameter_format":{"type":"string","enum":["positional","named"]},"components":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"reason":{"type":["string","null"]},"quality":{"type":["string","null"]}},"required":["id","name","language","status","category","parameter_format","components","reason","quality"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/channels/{id}/templates/{name}":{"delete":{"operationId":"deleteTemplate","summary":"Delete a WhatsApp message template in every language","tags":["Templates"],"parameters":[{"schema":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","pattern":"^[a-z0-9_]{1,512}$"},"in":"path","name":"name","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["name","deleted"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/messages":{"post":{"operationId":"sendMessage","summary":"Send a message (synchronous; idempotent with an Idempotency-Key header)","tags":["Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"channel_id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"to":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["text","image","audio","video","document","buttons","list","template","reaction"]},"text":{"type":"string","minLength":1,"maxLength":32768},"media":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"caption":{"type":"string","maxLength":4096},"filename":{"type":"string","minLength":1,"maxLength":255},"voice":{"default":false,"type":"boolean"}},"required":["url"]},"buttons":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"string","minLength":1,"maxLength":256}},"required":["id","title"]}},"list":{"type":"object","properties":{"button":{"type":"string","minLength":1,"maxLength":256},"sections":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":256},"rows":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":512}},"required":["id","title"]}}},"required":["rows"]}}},"required":["button","sections"]},"template":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"language":{"type":"string","minLength":1,"maxLength":32},"variables":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":4096}},{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"type":"string","maxLength":4096}}]},"header":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["image","video","document"]},"url":{"type":"string","maxLength":2048,"format":"uri"},"filename":{"type":"string","minLength":1,"maxLength":255}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"parameter_name":{"type":"string","minLength":1,"maxLength":128},"text":{"type":"string","minLength":1,"maxLength":4096}},"required":["type","text"]}]},"components":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]}},"required":["name","language"]},"reaction":{"type":"object","properties":{"emoji":{"type":"string","maxLength":32},"provider_message_id":{"type":"string","minLength":1,"maxLength":512}},"required":["emoji","provider_message_id"]},"reply_to":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1,"maxLength":512}},"required":["provider_message_id"]},"client_reference":{"type":"string","minLength":1,"maxLength":256},"fallback":{"default":"degrade","type":"string","enum":["degrade","strict"]}},"required":["type"]},"examples":{"example1":{"value":{"conversation_id":"cnv_djF8Y2hfMDFqY3gyazhtNG42cDhyMHQydjR3Nnk4ejB8MzkzNDAxMjM0NTY3fA","type":"text","text":"See you tomorrow at 10:00","client_reference":"booking-8841"}},"example2":{"value":{"channel_id":"ch_01jcx2k8m4n6p8r0t2v4w6y8z0","to":"393401234567","type":"template","template":{"name":"appointment_reminder","language":"en_US","variables":["Mario","10:00"]}}}}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"channel_id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"status":{"type":"string","enum":["sent"]},"client_reference":{"type":["string","null"]}},"required":["provider_message_id","conversation_id","channel_id","status","client_reference"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/conversations/{conversation_id}/typing":{"post":{"operationId":"sendTyping","summary":"Show a typing indicator in a conversation","tags":["Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1,"maxLength":512}}}}}},"parameters":[{"schema":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"in":"path","name":"conversation_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/conversations/{conversation_id}/read":{"post":{"operationId":"markRead","summary":"Mark a received message as read","tags":["Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1,"maxLength":512}},"required":["provider_message_id"]}}}},"parameters":[{"schema":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"in":"path","name":"conversation_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/test/inbound":{"post":{"operationId":"testInbound","summary":"Simulate a customer message on the workspace's sandbox channel","tags":["Sandbox"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"default":"text","type":"string","enum":["text","image","audio","video","document","interactive_reply"]},"text":{"type":"string","minLength":1,"maxLength":4096},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\r\\n]*$"}},"required":["id"]},"interactive_reply":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"]},"attachments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"type":"string","maxLength":2048,"format":"uri"},"mime_type":{"type":"string","maxLength":255},"filename":{"type":"string","minLength":1,"maxLength":255},"voice":{"default":false,"type":"boolean"}},"required":["type","url"]}}}},"example":{"text":"Hi, can I book for tomorrow?","from":{"id":"demo-user","name":"Mario Rossi"}}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel_id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"}},"required":["event_id","workspace_id","channel_id","conversation_id"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/calendar/availability":{"post":{"operationId":"calendarAvailability","summary":"Free slots of a given length in a connected Google Calendar","tags":["Calendar"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel_id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"duration_minutes":{"type":"integer","minimum":5,"maximum":1440},"time_zone":{"type":"string","maxLength":64},"calendar_ids":{"default":["primary"],"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"working_hours":{"type":"object","propertyNames":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"additionalProperties":{"maxItems":10,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}],"items":false,"minItems":2,"maxItems":2}}},"buffer_minutes":{"default":0,"type":"integer","minimum":0,"maximum":1440}},"required":["channel_id","start","end","duration_minutes","time_zone"]},"example":{"channel_id":"ch_01jcx2k8m4n6p8r0t2v4w6y8z1","start":"2026-11-12T08:00:00+01:00","end":"2026-11-14T19:00:00+01:00","duration_minutes":30,"time_zone":"Europe/Rome","working_hours":{"mon":[["09:00","18:00"]],"tue":[["09:00","18:00"]]}}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"time_zone":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["start","end"],"additionalProperties":false}}},"required":["time_zone","slots"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/calendar/events":{"post":{"operationId":"createCalendarEvent","summary":"Book a calendar event (an Idempotency-Key prevents double booking)","tags":["Calendar"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel_id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"calendar_id":{"default":"primary","type":"string","minLength":1,"maxLength":1024},"summary":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[^\\r\\n]*$"},"description":{"type":"string","maxLength":8192},"location":{"type":"string","maxLength":1024},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"time_zone":{"type":"string","maxLength":64},"attendees":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\r\\n]*$"}},"required":["email"]}},"meet":{"default":false,"type":"boolean"},"send_updates":{"type":"string","enum":["all","externalOnly","none"]}},"required":["channel_id","summary","start","end","time_zone"]},"example":{"channel_id":"ch_01jcx2k8m4n6p8r0t2v4w6y8z1","summary":"Dental check-up: Mario Rossi","start":"2026-11-12T10:00:00+01:00","end":"2026-11-12T10:30:00+01:00","time_zone":"Europe/Rome","attendees":[{"email":"mario.rossi@example.com","name":"Mario Rossi"}]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$"},"calendar_id":{"type":"string"},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"summary":{"type":["string","null"]},"description":{"type":["string","null"]},"location":{"type":["string","null"]},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"time_zone":{"type":["string","null"]},"attendees":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]},"response_status":{"anyOf":[{"type":"string","enum":["needsAction","declined","tentative","accepted"]},{"type":"null"}]}},"required":["email","name","response_status"],"additionalProperties":false}},"html_link":{"type":["string","null"]},"meet_url":{"type":["string","null"]},"conference_status":{"anyOf":[{"type":"string","enum":["pending","success","failure"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","calendar_id","status","summary","description","location","start","end","time_zone","attendees","html_link","meet_url","conference_status","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/calendar/events/{event_id}":{"get":{"operationId":"getCalendarEvent","summary":"Read a calendar event again, for example a Meet link still pending at booking","tags":["Calendar"],"parameters":[{"schema":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"query","name":"channel_id","required":true},{"schema":{"default":"primary","type":"string","minLength":1,"maxLength":1024},"in":"query","name":"calendar_id","required":false},{"schema":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"event_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$"},"calendar_id":{"type":"string"},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"summary":{"type":["string","null"]},"description":{"type":["string","null"]},"location":{"type":["string","null"]},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"time_zone":{"type":["string","null"]},"attendees":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]},"response_status":{"anyOf":[{"type":"string","enum":["needsAction","declined","tentative","accepted"]},{"type":"null"}]}},"required":["email","name","response_status"],"additionalProperties":false}},"html_link":{"type":["string","null"]},"meet_url":{"type":["string","null"]},"conference_status":{"anyOf":[{"type":"string","enum":["pending","success","failure"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","calendar_id","status","summary","description","location","start","end","time_zone","attendees","html_link","meet_url","conference_status","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"patch":{"operationId":"updateCalendarEvent","summary":"Change a calendar event","tags":["Calendar"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[^\\r\\n]*$"},"description":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}]},"location":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"time_zone":{"type":"string","maxLength":64},"attendees":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\r\\n]*$"}},"required":["email"]}},"meet":{"type":"boolean"},"send_updates":{"type":"string","enum":["all","externalOnly","none"]}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"query","name":"channel_id","required":true},{"schema":{"default":"primary","type":"string","minLength":1,"maxLength":1024},"in":"query","name":"calendar_id","required":false},{"schema":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"event_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$"},"calendar_id":{"type":"string"},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"summary":{"type":["string","null"]},"description":{"type":["string","null"]},"location":{"type":["string","null"]},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"time_zone":{"type":["string","null"]},"attendees":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]},"response_status":{"anyOf":[{"type":"string","enum":["needsAction","declined","tentative","accepted"]},{"type":"null"}]}},"required":["email","name","response_status"],"additionalProperties":false}},"html_link":{"type":["string","null"]},"meet_url":{"type":["string","null"]},"conference_status":{"anyOf":[{"type":"string","enum":["pending","success","failure"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","calendar_id","status","summary","description","location","start","end","time_zone","attendees","html_link","meet_url","conference_status","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"deleteCalendarEvent","summary":"Cancel a calendar event","tags":["Calendar"],"parameters":[{"schema":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"query","name":"channel_id","required":true},{"schema":{"default":"primary","type":"string","minLength":1,"maxLength":1024},"in":"query","name":"calendar_id","required":false},{"schema":{"type":"string","enum":["all","externalOnly","none"]},"in":"query","name":"send_updates","required":false},{"schema":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$"},"in":"path","name":"event_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/email/send":{"post":{"operationId":"sendEmail","summary":"Send an e-mail from a connected Gmail account","tags":["Email"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel_id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"to":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"cc":{"maxItems":500,"type":"array","items":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"bcc":{"maxItems":500,"type":"array","items":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subject":{"type":"string","minLength":1,"maxLength":998,"pattern":"^[^\\r\\n]*$"},"text":{"type":"string","minLength":1,"maxLength":5242880},"html":{"type":"string","minLength":1,"maxLength":5242880},"reply_to":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"thread_id":{"type":"string","maxLength":256,"pattern":"^[A-Za-z0-9]+$"},"in_reply_to":{"type":"string","maxLength":998,"pattern":"^<[^<>\\s@]+@[^<>\\s@]+>$"},"attachments":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\r\\n]*$"},"mime_type":{"type":"string","maxLength":255,"pattern":"^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$"},"content_base64":{"type":"string","minLength":4,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"}},"required":["filename","mime_type","content_base64"]}}},"required":["channel_id","to","subject"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"thread_id":{"type":"string","minLength":1}},"required":["id","thread_id"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","summary":"List webhook endpoints (workspace and organization level)","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"query","name":"workspace_id","required":false},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"anyOf":[{"type":"string","enum":["message.received","message.sent","message.status","message.edited","message.deleted","channel.connected","channel.disconnected","channel.status_changed","template.status_changed","ping"]},{"type":"string","enum":["*"]}]}},"is_active":{"type":"boolean"},"source":{"type":"string","enum":["dashboard","api","n8n"]},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspace_id","url","description","events","is_active","source","last_success_at","last_failure_at","failing_since","disabled_at","disabled_reason","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createWebhookEndpoint","summary":"Create a webhook endpoint; the signing secret is returned once","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"description":{"type":"string","maxLength":500},"events":{"default":["*"],"minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","enum":["message.received","message.sent","message.status","message.edited","message.deleted","channel.connected","channel.disconnected","channel.status_changed","template.status_changed","ping"]},{"type":"string","enum":["*"]}]}},"source":{"default":"api","type":"string","enum":["api","n8n"]},"is_active":{"default":true,"type":"boolean"}},"required":["url"]},"example":{"url":"https://example.com/webhooks/braidport","events":["message.received","message.status"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"anyOf":[{"type":"string","enum":["message.received","message.sent","message.status","message.edited","message.deleted","channel.connected","channel.disconnected","channel.status_changed","template.status_changed","ping"]},{"type":"string","enum":["*"]}]}},"is_active":{"type":"boolean"},"source":{"type":"string","enum":["dashboard","api","n8n"]},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"secret":{"type":"string","format":"starts_with","pattern":"^whsec_.*"}},"required":["id","workspace_id","url","description","events","is_active","source","last_success_at","last_failure_at","failing_since","disabled_at","disabled_reason","created_at","updated_at","secret"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/webhook-endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","summary":"Get one webhook endpoint","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"anyOf":[{"type":"string","enum":["message.received","message.sent","message.status","message.edited","message.deleted","channel.connected","channel.disconnected","channel.status_changed","template.status_changed","ping"]},{"type":"string","enum":["*"]}]}},"is_active":{"type":"boolean"},"source":{"type":"string","enum":["dashboard","api","n8n"]},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspace_id","url","description","events","is_active","source","last_success_at","last_failure_at","failing_since","disabled_at","disabled_reason","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"patch":{"operationId":"updateWebhookEndpoint","summary":"Change a webhook endpoint","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","enum":["message.received","message.sent","message.status","message.edited","message.deleted","channel.connected","channel.disconnected","channel.status_changed","template.status_changed","ping"]},{"type":"string","enum":["*"]}]}},"is_active":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"anyOf":[{"type":"string","enum":["message.received","message.sent","message.status","message.edited","message.deleted","channel.connected","channel.disconnected","channel.status_changed","template.status_changed","ping"]},{"type":"string","enum":["*"]}]}},"is_active":{"type":"boolean"},"source":{"type":"string","enum":["dashboard","api","n8n"]},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspace_id","url","description","events","is_active","source","last_success_at","last_failure_at","failing_since","disabled_at","disabled_reason","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"deleteWebhookEndpoint","summary":"Delete a webhook endpoint (idempotent)","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/webhook-endpoints/{id}/test":{"post":{"operationId":"testWebhookEndpoint","summary":"Send a signed ping event to the endpoint and report the result","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"success":{"type":"boolean"},"http_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error_code":{"type":["string","null"]}},"required":["event_id","success","http_status","duration_ms","error_code"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/events":{"get":{"operationId":"listEvents","summary":"Recent events, oldest first: the most recent 200 or so events of the workspace, none older than 24 hours (needs the workspace's event buffer). A cursor that trimming has passed usually answers validation_failed with details.reason cursor_expired; after 48 hours without an event the buffer starts afresh and the gap is not reported","tags":["Events"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"after","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","maxLength":2048},"in":"query","name":"types","required":false},{"schema":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"in":"query","name":"conversation_id","required":false},{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"query","name":"workspace_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["message.received"]},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","enum":["inbound"]},"source":{"type":"null"},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"],"additionalProperties":false},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"],"additionalProperties":false}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"],"additionalProperties":false},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"],"additionalProperties":false}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"],"additionalProperties":false}}},"required":["name","phones","emails"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"],"additionalProperties":false},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"],"additionalProperties":false},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"],"additionalProperties":false},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"],"additionalProperties":false},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"],"additionalProperties":false},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"],"additionalProperties":false},"raw":{}},"required":["message"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["message.sent"]},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","enum":["outbound"]},"source":{"type":"string","enum":["api","business_app","page_inbox","other"]},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"],"additionalProperties":false},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"],"additionalProperties":false}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"],"additionalProperties":false},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"],"additionalProperties":false}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"],"additionalProperties":false}}},"required":["name","phones","emails"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"],"additionalProperties":false},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"],"additionalProperties":false},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"],"additionalProperties":false},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"],"additionalProperties":false},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"],"additionalProperties":false},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"],"additionalProperties":false},"raw":{}},"required":["message"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["message.status"]},"data":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["sent","delivered","read","played","failed"]},"recipient":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"client_reference":{"type":["string","null"]},"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","account_suspended","not_found","validation_failed","conflict","rate_limited","idempotency_conflict","plan_limit_reached","quota_exceeded","subscription_inactive","feature_not_in_plan","channel_not_found","channel_not_active","channel_needs_reauth","channel_message_access_disabled","scope_missing","unsupported_message_type","interactive_limits_exceeded","message_too_long","recipient_invalid","window_closed","recipient_unreachable","recipient_blocked","template_not_found","template_invalid","media_invalid","media_too_large","media_fetch_failed","provider_rate_limited","provider_billing_issue","provider_account_restricted","provider_error","provider_unavailable","internal_error"]},"provider_code":{"type":"string"}},"required":["code"],"additionalProperties":false},"pricing":{"type":"object","properties":{"billable":{"type":"boolean"},"category":{"type":"string"},"type":{"type":"string"}},"required":["billable","category","type"],"additionalProperties":false},"raw":{}},"required":["provider_message_id","conversation_id","status","recipient","timestamp"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["message.edited"]},"data":{"type":"object","properties":{"message":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"direction":{"type":"string","enum":["inbound","outbound"]},"source":{"anyOf":[{"type":"string","enum":["api","business_app","page_inbox","other"]},{"type":"null"}]},"client_reference":{"type":["string","null"]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","name","username","phone"],"additionalProperties":false},"type":{"type":"string","enum":["text","image","audio","video","document","sticker","location","contacts","interactive_reply","reaction","share","system","unsupported"]},"text":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","audio","video","document","sticker"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"filename":{"type":["string","null"]},"voice":{"type":"boolean"},"duration_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"transcript":{"type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unavailable_reason":{"anyOf":[{"type":"string","enum":["too_large","expired","unsupported","fetch_failed"]},{"type":"null"}]}},"required":["type","url","mime_type","size_bytes","filename","voice","duration_seconds","transcript","expires_at","unavailable_reason"],"additionalProperties":false}},"audio_url":{"type":["string","null"]},"interactive_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["button","list","postback","quick_reply"]}},"required":["id","title","kind"],"additionalProperties":false},{"type":"null"}]},"location":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"type":["string","null"]},"address":{"type":["string","null"]}},"required":["latitude","longitude","name","address"],"additionalProperties":false},{"type":"null"}]},"contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["phone","type","user_id"],"additionalProperties":false}},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"type":{"type":["string","null"]}},"required":["email","type"],"additionalProperties":false}}},"required":["name","phones","emails"],"additionalProperties":false}},{"type":"null"}]},"reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"provider_message_id":{"type":"string","minLength":1}},"required":["emoji","provider_message_id"],"additionalProperties":false},{"type":"null"}]},"share":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["post","reel","story","story_mention"]},"url":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","url","title"],"additionalProperties":false},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1}},"required":["provider_message_id"],"additionalProperties":false},{"type":"null"}]},"referral":{"anyOf":[{"type":"object","properties":{"source":{"type":["string","null"]},"ref":{"type":["string","null"]},"url":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"headline":{"type":["string","null"]},"body":{"type":["string","null"]}},"required":["source","ref","url","ad_id","headline","body"],"additionalProperties":false},{"type":"null"}]},"identity_change":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user_id","phone"]},"previous_id":{"type":["string","null"]},"new_id":{"type":"string","minLength":1}},"required":["kind","previous_id","new_id"],"additionalProperties":false},{"type":"null"}]}},"required":["provider_message_id","conversation_id","direction","source","client_reference","timestamp","from","type","text","attachments","audio_url","interactive_reply","location","contacts","reaction","share","reply_to","referral","identity_change"],"additionalProperties":false},"raw":{}},"required":["message"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["message.deleted"]},"data":{"type":"object","properties":{"provider_message_id":{"type":"string","minLength":1},"conversation_id":{"type":"string","maxLength":2048,"pattern":"^cnv_[A-Za-z0-9_-]+$"},"raw":{}},"required":["provider_message_id","conversation_id"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["channel.connected"]},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["channel.disconnected"]},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["channel.status_changed"]},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},"previous_status":{"anyOf":[{"type":"string","enum":["active","pending","needs_reauth","restricted","error","disabled"]},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["status","previous_status","reason"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^ch_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"provider":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google","sandbox"]},"external_account_id":{"type":"string"},"display_name":{"type":"string"}},"required":["id","provider","external_account_id","display_name"],"additionalProperties":false},"type":{"type":"string","enum":["template.status_changed"]},"data":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"language":{"type":"string","minLength":1},"status":{"type":"string","enum":["approved","pending","rejected","paused","disabled","in_appeal","pending_deletion","archived","limit_exceeded","locked"]},"category":{"type":"string","enum":["marketing","utility","authentication"]},"reason":{"type":["string","null"]}},"required":["id","name","language","status","category"],"additionalProperties":false}},"required":["template"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"api_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"test":{"type":"boolean"},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"channel":{"type":"null"},"type":{"type":"string","enum":["ping"]},"data":{"type":"object","properties":{"endpoint_id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"}},"required":["endpoint_id"],"additionalProperties":false}},"required":["id","api_version","created_at","test","workspace_id","channel","type","data"],"additionalProperties":false}]}},"next_after":{"type":["string","null"]}},"required":["data","next_after"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/events/{id}/redeliver":{"post":{"operationId":"redeliverEvent","summary":"Queue an event for delivery again while it is still stored","tags":["Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint_id":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{51}[0g]$"},"endpoint_ids":{"type":"array","items":{"type":"string","pattern":"^we_[0-7][0-9a-hjkmnp-tv-z]{25}$"}},"status":{"type":"string","enum":["queued"]}},"required":["event_id","endpoint_ids","status"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List workspaces","tags":["Provisioning"],"parameters":[{"schema":{"type":"string","enum":["active","archived"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"external_ref","required":false},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string"},"external_ref":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived"]},"settings":{"type":"object","properties":{"event_buffer":{"type":"boolean"},"include_raw":{"type":"boolean"},"transcribe_audio":{"type":"boolean"},"locale":{"anyOf":[{"type":"string","enum":["en","it","es","fr","de","pt"]},{"type":"null"}]}},"required":["event_buffer","include_raw","transcribe_audio","locale"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","external_ref","status","settings","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createWorkspace","summary":"Create a workspace for a client","tags":["Provisioning"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\r\\n]*$"},"external_ref":{"type":"string","minLength":1,"maxLength":200},"settings":{"type":"object","properties":{"event_buffer":{"type":"boolean"},"include_raw":{"type":"boolean"},"transcribe_audio":{"type":"boolean"},"locale":{"anyOf":[{"type":"string","enum":["en","it","es","fr","de","pt"]},{"type":"null"}]}}}},"required":["name"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string"},"external_ref":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived"]},"settings":{"type":"object","properties":{"event_buffer":{"type":"boolean"},"include_raw":{"type":"boolean"},"transcribe_audio":{"type":"boolean"},"locale":{"anyOf":[{"type":"string","enum":["en","it","es","fr","de","pt"]},{"type":"null"}]}},"required":["event_buffer","include_raw","transcribe_audio","locale"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","external_ref","status","settings","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/workspaces/{id}":{"get":{"operationId":"getWorkspace","summary":"Get one workspace","tags":["Provisioning"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string"},"external_ref":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived"]},"settings":{"type":"object","properties":{"event_buffer":{"type":"boolean"},"include_raw":{"type":"boolean"},"transcribe_audio":{"type":"boolean"},"locale":{"anyOf":[{"type":"string","enum":["en","it","es","fr","de","pt"]},{"type":"null"}]}},"required":["event_buffer","include_raw","transcribe_audio","locale"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","external_ref","status","settings","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"patch":{"operationId":"updateWorkspace","summary":"Rename, archive or reconfigure a workspace","tags":["Provisioning"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\r\\n]*$"},"external_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"status":{"type":"string","enum":["active","archived"]},"settings":{"type":"object","properties":{"event_buffer":{"type":"boolean"},"include_raw":{"type":"boolean"},"transcribe_audio":{"type":"boolean"},"locale":{"anyOf":[{"type":"string","enum":["en","it","es","fr","de","pt"]},{"type":"null"}]}}}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string"},"external_ref":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived"]},"settings":{"type":"object","properties":{"event_buffer":{"type":"boolean"},"include_raw":{"type":"boolean"},"transcribe_audio":{"type":"boolean"},"locale":{"anyOf":[{"type":"string","enum":["en","it","es","fr","de","pt"]},{"type":"null"}]}},"required":["event_buffer","include_raw","transcribe_audio","locale"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","external_ref","status","settings","created_at","updated_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"deleteWorkspace","summary":"Delete a workspace, disconnecting its channels","tags":["Provisioning"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/workspaces/{id}/connect-links":{"post":{"operationId":"createConnectLink","summary":"Create a connect link to send to the client","tags":["Provisioning"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\r\\n]*$"},"allowed_providers":{"default":[],"type":"array","items":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google"]}},"allow_disconnect":{"default":false,"type":"boolean"},"redirect_url":{"type":"string","maxLength":2048,"format":"uri"},"locale":{"type":"string","enum":["en","it","es","fr","de","pt"]},"expires_in_days":{"default":14,"type":"integer","minimum":1,"maximum":90}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cl_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"workspace_id":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"url":{"type":"string"},"label":{"type":["string","null"]},"allowed_providers":{"type":"array","items":{"type":"string","enum":["whatsapp","instagram","messenger","telegram","google"]}},"allow_disconnect":{"type":"boolean"},"redirect_url":{"type":["string","null"]},"locale":{"anyOf":[{"type":"string","enum":["en","it","es","fr","de","pt"]},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspace_id","url","label","allowed_providers","allow_disconnect","redirect_url","locale","expires_at","created_at"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/workspaces/{id}/api-keys":{"post":{"operationId":"createApiKey","summary":"Create a workspace API key; the key is returned once","tags":["Provisioning"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\r\\n]*$"},"scopes":{"default":["read","send","calendar","email","admin"],"minItems":1,"type":"array","items":{"type":"string","enum":["read","send","calendar","email","admin"]}},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string"},"prefix":{"type":"string"},"kind":{"type":"string","enum":["workspace","organization"]},"workspace_id":{"anyOf":[{"type":"string","pattern":"^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string","enum":["read","send","calendar","email","admin"]}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"key":{"type":"string"}},"required":["id","name","prefix","kind","workspace_id","scopes","expires_at","created_at","key"],"additionalProperties":false}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"4XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"5XX":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}}},"servers":[{"url":"https://api.braidport.com"}],"tags":[{"name":"Account","description":"The calling key, its organization, plan, limits and scopes, and the monthly usage."},{"name":"Channels","description":"Connected WhatsApp, Instagram, Messenger, Telegram and Google channels."},{"name":"Messages","description":"Send a message on any channel, show typing and mark messages as read. Sends are synchronous; an `Idempotency-Key` makes a retry safe."},{"name":"Templates","description":"WhatsApp message templates: list, submit for review and delete."},{"name":"Email","description":"Send e-mail from a connected Gmail account."},{"name":"Calendar","description":"Free slots and events on a connected Google Calendar."},{"name":"Webhooks","description":"Endpoints that receive events, signed per Standard Webhooks. The secret is shown once, at creation."},{"name":"Events","description":"Polling keeps the most recent 200 or so events of the workspace, none older than 24 hours; redelivery to endpoints works for any event still stored (24 hours)."},{"name":"Provisioning","description":"Workspaces, connect links and workspace keys for platforms that onboard their own customers (organization keys)."},{"name":"Sandbox","description":"Simulate an inbound message on the sandbox channel to test a flow end to end."}],"webhooks":{"event":{"post":{"operationId":"event","summary":"Event delivered to a webhook endpoint","description":"POSTed to every active endpoint whose filter matches the event type. Verify `webhook-signature` (HMAC-SHA256 of `webhook-id.webhook-timestamp.body` with the endpoint secret) and reject timestamps older than 5 minutes. Answer 2xx within 10 seconds; anything else is retried for about 24 hours. Delivery is at-least-once: de-duplicate on `id`.","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id; the same on every retry.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated `v1,<base64>` signatures.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried."}}}}}}