{"webhooks":{"chat.started":{"description":"A customer or agent started a chat (a new thread).","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.queued":{"description":"A chat entered the queue.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.assigned":{"description":"Routing assigned a chat to an agent.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.transferred":{"description":"A chat was transferred to another agent or group.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.unassigned":{"description":"A chat lost its agent and waits to be routed again.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.deactivated":{"description":"A chat's thread ended without being closed by a person (inactivity).","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.closed":{"description":"A chat's thread was closed.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.priority_changed":{"description":"A chat's priority changed.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"goal.achieved":{"description":"A visitor in a chat reached a goal.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.rated":{"description":"The customer rated a chat.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"chat.user_added":{"description":"An agent joined a chat.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"user_id":{"type":"string"},"user_type":{"type":"string","enum":["agent","customer"]}},"required":["chat_id","thread_id","user_id","user_type"],"additionalProperties":false}},"chat.user_removed":{"description":"An agent left a chat.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"user_id":{"type":"string"}},"required":["chat_id","thread_id","user_id"],"additionalProperties":false}},"chat.properties_updated":{"description":"A chat's properties changed.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["chat_id","properties"],"additionalProperties":false}},"thread.tagged":{"description":"A tag was added to a thread.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"thread.untagged":{"description":"A tag was removed from a thread.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"thread.properties_updated":{"description":"A thread's properties changed.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["chat_id","thread_id","properties"],"additionalProperties":false}},"thread.summary_set":{"description":"An AI summary was stored for a thread.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"summary":{"type":"string"}},"required":["chat_id","thread_id","summary"],"additionalProperties":false}},"event.created":{"description":"A message, file, form or other event was added to a chat.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"required":["chat_id","thread_id","event"],"additionalProperties":false}},"event.updated":{"description":"An event was edited.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"required":["chat_id","thread_id","event"],"additionalProperties":false}},"event.deleted":{"description":"An event was deleted.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"}},"required":["chat_id","thread_id","event_id"],"additionalProperties":false}},"event.seen":{"description":"A chat member read events up to a time.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string"},"seen_up_to":{"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{3}(?:Z))$"}},"required":["chat_id","user_id","seen_up_to"],"additionalProperties":false}},"ticket.created":{"description":"A ticket was created.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"ticket.updated":{"description":"A ticket's status, assignee or priority changed.","permission":"chats.all","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"customer.created":{"description":"A new customer was recorded.","permission":"customers.read","data":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visitor_id":{"anyOf":[{"type":"string","minLength":8,"maxLength":64},{"type":"null"}]},"external_user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"session_fields":{"maxItems":50,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","maxLength":64},{"type":"string","maxLength":512}]}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"first_seen_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{3}(?:Z))$"},"last_seen_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{3}(?:Z))$"},"banned_until":{"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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","organization_id","visitor_id","external_user_id","name","email","phone","avatar_url","session_fields","properties","first_seen_at","last_seen_at","banned_until"],"additionalProperties":false}},"required":["customer"],"additionalProperties":false}},"customer.updated":{"description":"A customer's details changed.","permission":"customers.read","data":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visitor_id":{"anyOf":[{"type":"string","minLength":8,"maxLength":64},{"type":"null"}]},"external_user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"session_fields":{"maxItems":50,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","maxLength":64},{"type":"string","maxLength":512}]}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"first_seen_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{3}(?:Z))$"},"last_seen_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{3}(?:Z))$"},"banned_until":{"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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","organization_id","visitor_id","external_user_id","name","email","phone","avatar_url","session_fields","properties","first_seen_at","last_seen_at","banned_until"],"additionalProperties":false}},"required":["customer"],"additionalProperties":false}},"customer.identified":{"description":"A visitor was matched to a known customer.","permission":"customers.read","data":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chat_id","thread_id","channel","customer_id","agent_ids","group_id","details"],"additionalProperties":false}},"customer.banned":{"description":"A customer was banned.","permission":"customers.read","data":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"until":{"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{3}(?:Z))$"}},"required":["customer_id","until"],"additionalProperties":false}},"agent.status_changed":{"description":"An agent's routing status changed.","permission":"team.read","data":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["accepting_chats","not_accepting_chats","offline"]}},"required":["agent_id","status"],"additionalProperties":false}},"agent.created":{"description":"An agent was created.","permission":"team.read","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The agent id; fetch it from the API for its current state."}},"agent.updated":{"description":"An agent was changed.","permission":"team.read","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The agent id; fetch it from the API for its current state."}},"agent.deleted":{"description":"An agent was deleted.","permission":"team.read","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The agent id; fetch it from the API for its current state."}},"group.created":{"description":"A group was created.","permission":"team.read","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The group id; fetch it from the API for its current state."}},"group.updated":{"description":"A group was changed.","permission":"team.read","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The group id; fetch it from the API for its current state."}},"group.deleted":{"description":"A group was deleted.","permission":"team.read","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The group id; fetch it from the API for its current state."}},"tag.created":{"description":"A tag was created.","permission":"chats.access","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The tag id; fetch it from the API for its current state."}},"tag.updated":{"description":"A tag was changed.","permission":"chats.access","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The tag id; fetch it from the API for its current state."}},"tag.deleted":{"description":"A tag was deleted.","permission":"chats.access","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The tag id; fetch it from the API for its current state."}},"canned_response.created":{"description":"A canned response was created.","permission":"chats.access","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The canned_response id; fetch it from the API for its current state."}},"canned_response.updated":{"description":"A canned response was changed.","permission":"chats.access","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The canned_response id; fetch it from the API for its current state."}},"canned_response.deleted":{"description":"A canned response was deleted.","permission":"chats.access","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The canned_response id; fetch it from the API for its current state."}},"routing_rule.created":{"description":"A routing rule was created.","permission":"settings.manage","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The routing_rule id; fetch it from the API for its current state."}},"routing_rule.updated":{"description":"A routing rule was changed.","permission":"settings.manage","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The routing_rule id; fetch it from the API for its current state."}},"routing_rule.deleted":{"description":"A routing rule was deleted.","permission":"settings.manage","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The routing_rule id; fetch it from the API for its current state."}},"greeting.created":{"description":"A greeting was created.","permission":"campaigns.manage","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The greeting id; fetch it from the API for its current state."}},"greeting.updated":{"description":"A greeting was changed.","permission":"campaigns.manage","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The greeting id; fetch it from the API for its current state."}},"greeting.deleted":{"description":"A greeting was deleted.","permission":"campaigns.manage","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The greeting id; fetch it from the API for its current state."}},"settings.updated":{"description":"Organization or widget settings changed.","permission":"settings.manage","data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"The settings id; fetch it from the API for its current state."}},"webhook.test":{"description":"A test delivery, sent from the API or the Settings page.","permission":"developers.manage","data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"realtime":{"protocol_version":1,"agent":{"actions":{"login":{"request":{"type":"object","properties":{"last_seq":{"type":"integer","minimum":0,"maximum":9007199254740991},"application":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"version":{"type":"string","maxLength":32}},"required":["name","version"]},"away":{"default":false,"type":"boolean"}},"required":["application"]},"response":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"license_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","enum":["apac","eu","us"]},"plan":{"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{3}(?:Z))$"}},"required":["id","license_id","name","region","plan","created_at"],"additionalProperties":false},"me":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["agent","bot"]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"job_title":{"type":"string","maxLength":120},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"role":{"type":"string","enum":["owner","viceowner","admin","agent"]},"max_chats":{"type":"integer","minimum":0,"maximum":100},"status":{"type":"string","enum":["active","suspended","awaiting_approval"]},"routing_status":{"type":"string","enum":["accepting_chats","not_accepting_chats","offline"]},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"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{3}(?:Z))$"}},"required":["id","organization_id","kind","email","name","job_title","avatar_url","role","max_chats","status","routing_status","group_ids","created_at"],"additionalProperties":false},"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]}},"required":["id","name","email"],"additionalProperties":false},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"supervisor_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"last_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"last_event_preview":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"last_event_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{3}(?:Z))$"},{"type":"null"}]},"last_event_author_type":{"anyOf":[{"type":"string","enum":["agent","customer","system"]},{"type":"null"}]},"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"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{3}(?:Z))$"}},"required":["id","channel","status","customer","assignee_id","group_ids","agent_ids","supervisor_ids","last_thread_id","last_event_preview","last_event_at","last_event_author_type","unread_count","tags","queue","rating","close_reason","created_at"],"additionalProperties":false}},"resumed":{"type":"boolean"},"seq":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["organization","me","chats","resumed","seq"],"additionalProperties":false}},"logout":{"request":{"type":"object","properties":{}},"response":{"type":"object","properties":{},"additionalProperties":false}},"ping":{"request":{"type":"object","properties":{}},"response":{"type":"object","properties":{},"additionalProperties":false}},"set_routing_status":{"request":{"type":"object","properties":{"status":{"type":"string","enum":["accepting_chats","not_accepting_chats","offline"]},"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["status"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"set_away":{"request":{"type":"object","properties":{"away":{"type":"boolean"}},"required":["away"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"list_routing_statuses":{"request":{"type":"object","properties":{"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}},"response":{"type":"object","properties":{"statuses":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"status":{"type":"string","enum":["accepting_chats","not_accepting_chats","offline"]},"connected":{"type":"boolean"},"active_chats":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_chats":{"type":"integer","minimum":0,"maximum":9007199254740991},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["agent_id","name","avatar_url","status","connected","active_chats","max_chats","group_ids"],"additionalProperties":false}}},"required":["statuses"],"additionalProperties":false}},"list_chats":{"request":{"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["queued","pending","active","inactive","archived"]}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"page_token":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100}}},"response":{"type":"object","properties":{"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]}},"required":["id","name","email"],"additionalProperties":false},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"supervisor_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"last_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"last_event_preview":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"last_event_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{3}(?:Z))$"},{"type":"null"}]},"last_event_author_type":{"anyOf":[{"type":"string","enum":["agent","customer","system"]},{"type":"null"}]},"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"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{3}(?:Z))$"}},"required":["id","channel","status","customer","assignee_id","group_ids","agent_ids","supervisor_ids","last_thread_id","last_event_preview","last_event_at","last_event_author_type","unread_count","tags","queue","rating","close_reason","created_at"],"additionalProperties":false}},"next_page_token":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["chats","next_page_token"],"additionalProperties":false}},"get_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":2048}},"required":["chat_id"]},"response":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"users":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"type":{"type":"string","enum":["agent","customer"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"present":{"type":"boolean"},"events_seen_up_to":{"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{3}(?:Z))$"},{"type":"null"}]},"visibility":{"type":"string","enum":["all","agents"]}},"required":["id","type","name","avatar_url","present","events_seen_up_to","visibility"],"additionalProperties":false}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"thread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"active":{"type":"boolean"},"user_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"next_cursor":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"rated_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{3}(?:Z))$"}},"required":["score","comment","rated_at"],"additionalProperties":false},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"type":"null"}]},"previous_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"next_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"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{3}(?:Z))$"},"closed_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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","chat_id","active","user_ids","events","next_cursor","properties","group_ids","tags","queue","rating","close_reason","previous_thread_id","next_thread_id","created_at","closed_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{3}(?:Z))$"}},"required":["id","organization_id","channel","status","customer_id","assignee_id","users","properties","group_ids","thread","created_at"],"additionalProperties":false}},"required":["chat"],"additionalProperties":false}},"list_threads":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"page_token":{"type":"string"}},"required":["chat_id"]},"response":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"active":{"type":"boolean"},"user_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"next_cursor":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"rated_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{3}(?:Z))$"}},"required":["score","comment","rated_at"],"additionalProperties":false},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"type":"null"}]},"previous_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"next_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"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{3}(?:Z))$"},"closed_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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","chat_id","active","user_ids","events","next_cursor","properties","group_ids","tags","queue","rating","close_reason","previous_thread_id","next_thread_id","created_at","closed_at"],"additionalProperties":false}},"next_page_token":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["threads","next_page_token"],"additionalProperties":false}},"start_chat":{"request":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"group_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"mentions":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"alternative_text":{"type":"string","maxLength":512}},"required":["type","file_key","name","content_type","size"]},{"type":"object","properties":{"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"]}}},"required":["title","subtitle","image_url","buttons"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","template","elements"]},{"type":"object","properties":{"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","fields"]},{"type":"object","properties":{"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","answers"]},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"content":{},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","content"]}]}},"continuous":{"type":"boolean"}},"required":["customer_id"]},"response":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"}}},"required":["chat_id","thread_id","event_ids"],"additionalProperties":false}},"resume_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"events":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"mentions":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"alternative_text":{"type":"string","maxLength":512}},"required":["type","file_key","name","content_type","size"]},{"type":"object","properties":{"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"]}}},"required":["title","subtitle","image_url","buttons"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","template","elements"]},{"type":"object","properties":{"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","fields"]},{"type":"object","properties":{"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","answers"]},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"content":{},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","content"]}]}}},"required":["chat_id"]},"response":{"type":"object","properties":{"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["thread_id"],"additionalProperties":false}},"accept_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}}},"response":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id","thread_id"],"additionalProperties":false}},"decline_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"close_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"follow_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"unfollow_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"transfer_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"target":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"agent"},"ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]},{"type":"object","properties":{"type":{"type":"string","const":"group"},"ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","ids"]}]},"ignore_availability":{"type":"boolean"},"note":{"type":"string","minLength":1,"maxLength":16384}},"required":["chat_id","target"]},"response":{"type":"object","properties":{"queued":{"type":"boolean"}},"required":["queued"],"additionalProperties":false}},"add_user_to_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visibility":{"type":"string","enum":["all","agents"]}},"required":["chat_id","agent_id","visibility"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"remove_user_from_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["chat_id","agent_id"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"list_agents_for_transfer":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id"]},"response":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"status":{"type":"string","enum":["accepting_chats","not_accepting_chats","offline"]},"connected":{"type":"boolean"},"active_chats":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_chats":{"type":"integer","minimum":0,"maximum":9007199254740991},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["agent_id","name","avatar_url","status","connected","active_chats","max_chats","group_ids"],"additionalProperties":false}},"groups":{"type":"array","items":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"available":{"type":"boolean"}},"required":["group_id","name","available"],"additionalProperties":false}}},"required":["agents","groups"],"additionalProperties":false}},"send_event":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"mentions":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"alternative_text":{"type":"string","maxLength":512}},"required":["type","file_key","name","content_type","size"]},{"type":"object","properties":{"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"]}}},"required":["title","subtitle","image_url","buttons"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","template","elements"]},{"type":"object","properties":{"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","fields"]},{"type":"object","properties":{"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","answers"]},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"content":{},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","content"]}]}},"required":["chat_id","event"]},"response":{"type":"object","properties":{"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replay":{"type":"boolean"}},"required":["event_id","thread_id","seq","replay"],"additionalProperties":false}},"send_event_preview":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"text":{"type":"string","maxLength":16384}},"required":["chat_id","text"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"send_typing":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"is_typing":{"type":"boolean"},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["chat_id","is_typing"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"mark_events_as_seen":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"seen_up_to":{"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{3}(?:Z))$"}},"required":["chat_id","seen_up_to"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"delete_event":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"}},"required":["chat_id","event_id"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"set_reaction":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"reaction":{"anyOf":[{"type":"string","minLength":1,"maxLength":16},{"type":"null"}]}},"required":["chat_id","event_id","reaction"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"tag_thread":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"tag":{"type":"string","minLength":1,"maxLength":64}},"required":["chat_id","thread_id","tag"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"untag_thread":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"tag":{"type":"string","minLength":1,"maxLength":64}},"required":["chat_id","thread_id","tag"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"update_chat_properties":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["chat_id","properties"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"update_thread_properties":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["chat_id","thread_id","properties"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"ban_customer":{"request":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"days":{"type":"integer","minimum":1,"maximum":3650}},"required":["customer_id","days"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"multicast":{"request":{"type":"object","properties":{"recipients":{"type":"object","properties":{"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}},"content":{}},"required":["recipients","content"]},"response":{"type":"object","properties":{},"additionalProperties":false}}},"pushes":{"incoming_chat":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"users":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"type":{"type":"string","enum":["agent","customer"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"present":{"type":"boolean"},"events_seen_up_to":{"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{3}(?:Z))$"},{"type":"null"}]},"visibility":{"type":"string","enum":["all","agents"]}},"required":["id","type","name","avatar_url","present","events_seen_up_to","visibility"],"additionalProperties":false}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"thread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"active":{"type":"boolean"},"user_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"next_cursor":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"rated_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{3}(?:Z))$"}},"required":["score","comment","rated_at"],"additionalProperties":false},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"type":"null"}]},"previous_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"next_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"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{3}(?:Z))$"},"closed_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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","chat_id","active","user_ids","events","next_cursor","properties","group_ids","tags","queue","rating","close_reason","previous_thread_id","next_thread_id","created_at","closed_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{3}(?:Z))$"}},"required":["id","organization_id","channel","status","customer_id","assignee_id","users","properties","group_ids","thread","created_at"],"additionalProperties":false},"transferred_from":{"anyOf":[{"type":"object","properties":{"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["agent_ids","group_ids"],"additionalProperties":false},{"type":"null"}]}},"required":["chat","transferred_from"],"additionalProperties":false},"chat_summary_updated":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]}},"required":["id","name","email"],"additionalProperties":false},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"supervisor_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"last_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"last_event_preview":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"last_event_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{3}(?:Z))$"},{"type":"null"}]},"last_event_author_type":{"anyOf":[{"type":"string","enum":["agent","customer","system"]},{"type":"null"}]},"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"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{3}(?:Z))$"}},"required":["id","channel","status","customer","assignee_id","group_ids","agent_ids","supervisor_ids","last_thread_id","last_event_preview","last_event_at","last_event_author_type","unread_count","tags","queue","rating","close_reason","created_at"],"additionalProperties":false}},"required":["chat"],"additionalProperties":false},"chat_unlisted":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id"],"additionalProperties":false},"chat_closed":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]}},"required":["chat_id","thread_id","user_id","reason"],"additionalProperties":false},"chat_transferred":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"requester_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"type":"object","properties":{"agent_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["agent_ids","group_ids"],"additionalProperties":false},"queued":{"type":"boolean"}},"required":["chat_id","thread_id","requester_id","to","queued"],"additionalProperties":false},"user_added_to_chat":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string"},"user_type":{"type":"string","enum":["agent","customer"]},"visibility":{"type":"string","enum":["all","agents"]}},"required":["chat_id","thread_id","user_id","user_type","visibility"],"additionalProperties":false},"user_removed_from_chat":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string"},"reason":{"type":"string"}},"required":["chat_id","thread_id","user_id","reason"],"additionalProperties":false},"incoming_event":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["chat_id","thread_id","event","seq"],"additionalProperties":false},"incoming_event_preview":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"author_id":{"type":"string"},"text":{"type":"string"}},"required":["chat_id","thread_id","author_id","text"],"additionalProperties":false},"event_updated":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"required":["chat_id","thread_id","event"],"additionalProperties":false},"event_deleted":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"}},"required":["chat_id","thread_id","event_id"],"additionalProperties":false},"incoming_sneak_peek":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"text":{"type":"string","maxLength":16384}},"required":["chat_id","thread_id","text"],"additionalProperties":false},"incoming_typing":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string"},"is_typing":{"type":"boolean"}},"required":["chat_id","thread_id","user_id","is_typing"],"additionalProperties":false},"events_marked_as_seen":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string"},"seen_up_to":{"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{3}(?:Z))$"}},"required":["chat_id","user_id","seen_up_to"],"additionalProperties":false},"chat_properties_updated":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["chat_id","properties"],"additionalProperties":false},"thread_properties_updated":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["chat_id","thread_id","properties"],"additionalProperties":false},"thread_tagged":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"tag":{"type":"string"}},"required":["chat_id","thread_id","tag"],"additionalProperties":false},"thread_untagged":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"tag":{"type":"string"}},"required":["chat_id","thread_id","tag"],"additionalProperties":false},"thread_summary_set":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"summary":{"type":"string"}},"required":["chat_id","thread_id","summary"],"additionalProperties":false},"queue_positions_updated":{"type":"object","properties":{"queue":{"type":"array","items":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["chat_id","position","wait_time_s"],"additionalProperties":false}}},"required":["queue"],"additionalProperties":false},"routing_status_set":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["accepting_chats","not_accepting_chats","offline"]}},"required":["agent_id","status"],"additionalProperties":false},"customer_banned":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"until":{"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{3}(?:Z))$"}},"required":["customer_id","until"],"additionalProperties":false},"config_updated":{"type":"object","properties":{"entity":{"type":"string","enum":["agent","group","tag","canned_response","settings","routing_rule","greeting"]},"op":{"type":"string","enum":["created","updated","deleted"]},"id":{"type":"string"}},"required":["entity","op","id"],"additionalProperties":false},"incoming_multicast":{"type":"object","properties":{"author_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"content":{}},"required":["author_id","content"],"additionalProperties":false},"incoming_error":{"type":"object","properties":{"request_action":{"type":"string"},"code":{"type":"string","enum":["validation","authentication","authorization","not_found","conflict","chat_inactive","agent_unavailable","entity_too_large","idempotency_key_reused","unsupported_version","too_many_requests","plan_limit","internal","not_implemented","service_unavailable"]},"message":{"type":"string"}},"required":["request_action","code","message"],"additionalProperties":false},"agent_disconnected":{"type":"object","properties":{"reason":{"type":"string","enum":["logged_out_remotely","token_revoked","token_expired","connection_evicted","too_many_connections","role_changed","organization_deleted","internal_error"]},"reconnect":{"type":"boolean"}},"required":["reason","reconnect"],"additionalProperties":false}}},"customer":{"actions":{"login":{"request":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"object","properties":{"url":{"type":"string","maxLength":2048},"title":{"type":"string","maxLength":512},"referrer":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]}},"required":["url","title","referrer"]},"is_mobile":{"type":"boolean"},"application":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"version":{"type":"string","maxLength":32},"channel":{"type":"string","enum":["widget","chat_page","sdk"]}},"required":["name","version","channel"]}},"required":["page","is_mobile","application"]},"response":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visitor_id":{"anyOf":[{"type":"string","minLength":8,"maxLength":64},{"type":"null"}]},"external_user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"session_fields":{"maxItems":50,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","maxLength":64},{"type":"string","maxLength":512}]}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"first_seen_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{3}(?:Z))$"},"last_seen_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{3}(?:Z))$"},"banned_until":{"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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","organization_id","visitor_id","external_user_id","name","email","phone","avatar_url","session_fields","properties","first_seen_at","last_seen_at","banned_until"],"additionalProperties":false},"chat":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"users":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"type":{"type":"string","enum":["agent","customer"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"present":{"type":"boolean"},"events_seen_up_to":{"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{3}(?:Z))$"},{"type":"null"}]},"visibility":{"type":"string","enum":["all","agents"]}},"required":["id","type","name","avatar_url","present","events_seen_up_to","visibility"],"additionalProperties":false}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"thread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"active":{"type":"boolean"},"user_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"next_cursor":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"rated_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{3}(?:Z))$"}},"required":["score","comment","rated_at"],"additionalProperties":false},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"type":"null"}]},"previous_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"next_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"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{3}(?:Z))$"},"closed_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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","chat_id","active","user_ids","events","next_cursor","properties","group_ids","tags","queue","rating","close_reason","previous_thread_id","next_thread_id","created_at","closed_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{3}(?:Z))$"}},"required":["id","organization_id","channel","status","customer_id","assignee_id","users","properties","group_ids","thread","created_at"],"additionalProperties":false},{"type":"null"}]},"group_status":{"type":"string","enum":["online","online_for_queue","offline"]},"capped":{"type":"boolean"}},"required":["customer","chat","group_status"],"additionalProperties":false}},"ping":{"request":{"type":"object","properties":{}},"response":{"type":"object","properties":{},"additionalProperties":false}},"get_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":2048}},"required":["chat_id"]},"response":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"users":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"type":{"type":"string","enum":["agent","customer"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"present":{"type":"boolean"},"events_seen_up_to":{"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{3}(?:Z))$"},{"type":"null"}]},"visibility":{"type":"string","enum":["all","agents"]}},"required":["id","type","name","avatar_url","present","events_seen_up_to","visibility"],"additionalProperties":false}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"thread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"active":{"type":"boolean"},"user_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"next_cursor":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"rated_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{3}(?:Z))$"}},"required":["score","comment","rated_at"],"additionalProperties":false},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"type":"null"}]},"previous_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"next_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"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{3}(?:Z))$"},"closed_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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","chat_id","active","user_ids","events","next_cursor","properties","group_ids","tags","queue","rating","close_reason","previous_thread_id","next_thread_id","created_at","closed_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{3}(?:Z))$"}},"required":["id","organization_id","channel","status","customer_id","assignee_id","users","properties","group_ids","thread","created_at"],"additionalProperties":false}},"required":["chat"],"additionalProperties":false}},"list_threads":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"page_token":{"type":"string"}},"required":["chat_id"]},"response":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"active":{"type":"boolean"},"user_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"next_cursor":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"rated_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{3}(?:Z))$"}},"required":["score","comment","rated_at"],"additionalProperties":false},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"type":"null"}]},"previous_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"next_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"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{3}(?:Z))$"},"closed_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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","chat_id","active","user_ids","events","next_cursor","properties","group_ids","tags","queue","rating","close_reason","previous_thread_id","next_thread_id","created_at","closed_at"],"additionalProperties":false}},"next_page_token":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["threads","next_page_token"],"additionalProperties":false}},"start_chat":{"request":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"mentions":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"alternative_text":{"type":"string","maxLength":512}},"required":["type","file_key","name","content_type","size"]},{"type":"object","properties":{"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"]}}},"required":["title","subtitle","image_url","buttons"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","template","elements"]},{"type":"object","properties":{"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","fields"]},{"type":"object","properties":{"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","answers"]},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"content":{},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","content"]}]}},"continuous":{"type":"boolean"},"greeting_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"response":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"}}},"required":["chat_id","thread_id","event_ids"],"additionalProperties":false}},"close_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"}},"required":["chat_id"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"send_event":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"mentions":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"alternative_text":{"type":"string","maxLength":512}},"required":["type","file_key","name","content_type","size"]},{"type":"object","properties":{"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"]}}},"required":["title","subtitle","image_url","buttons"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","template","elements"]},{"type":"object","properties":{"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","fields"]},{"type":"object","properties":{"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"]}},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","form_id","form_kind","answers"]},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"content":{},"custom_id":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"visibility":{"default":"all","type":"string","enum":["all","agents"]}},"required":["type","content"]}]}},"required":["chat_id","event"]},"response":{"type":"object","properties":{"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replay":{"type":"boolean"}},"required":["event_id","thread_id","seq","replay"],"additionalProperties":false}},"send_sneak_peek":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"text":{"type":"string","maxLength":16384}},"required":["chat_id","text"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"send_typing":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"is_typing":{"type":"boolean"}},"required":["chat_id","is_typing"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"mark_events_as_seen":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"seen_up_to":{"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{3}(?:Z))$"}},"required":["chat_id","seen_up_to"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"send_rich_message_postback":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"postback_id":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":2048}},"required":["chat_id","event_id","postback_id","value"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"rate_chat":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"type":"string","maxLength":1024}},"required":["chat_id","thread_id","score"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"set_reaction":{"request":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"reaction":{"anyOf":[{"type":"string","minLength":1,"maxLength":16},{"type":"null"}]}},"required":["chat_id","event_id","reaction"]},"response":{"type":"object","properties":{},"additionalProperties":false}},"update_customer":{"request":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"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-z]{2,}$"}}},"response":{"type":"object","properties":{},"additionalProperties":false}},"get_predicted_agent":{"request":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"response":{"type":"object","properties":{"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"job_title":{"type":"string","maxLength":120}},"required":["id","name","avatar_url","job_title"],"additionalProperties":false},{"type":"null"}]},"queued":{"type":"boolean"}},"required":["agent","queued"],"additionalProperties":false}}},"pushes":{"incoming_chat":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["widget","chat_page","api","email","whatsapp","messenger","instagram","telegram","line","zalo","viber","wechat","kakaotalk","sms","x","discord","slack","teams","apple_messages"]},"status":{"type":"string","enum":["queued","pending","active","inactive","archived"]},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"users":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"type":{"type":"string","enum":["agent","customer"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"present":{"type":"boolean"},"events_seen_up_to":{"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{3}(?:Z))$"},{"type":"null"}]},"visibility":{"type":"string","enum":["all","agents"]}},"required":["id","type","name","avatar_url","present","events_seen_up_to","visibility"],"additionalProperties":false}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"thread":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"active":{"type":"boolean"},"user_ids":{"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"next_cursor":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"tags":{"type":"array","items":{"type":"string"}},"queue":{"anyOf":[{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued_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{3}(?:Z))$"}},"required":["position","wait_time_s","queued_at"],"additionalProperties":false},{"type":"null"}]},"rating":{"anyOf":[{"type":"object","properties":{"score":{"anyOf":[{"type":"string","enum":["good","bad"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"rated_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{3}(?:Z))$"}},"required":["score","comment","rated_at"],"additionalProperties":false},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]},{"type":"null"}]},"previous_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"type":"null"}]},"next_thread_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},{"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{3}(?:Z))$"},"closed_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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","chat_id","active","user_ids","events","next_cursor","properties","group_ids","tags","queue","rating","close_reason","previous_thread_id","next_thread_id","created_at","closed_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{3}(?:Z))$"}},"required":["id","organization_id","channel","status","customer_id","assignee_id","users","properties","group_ids","thread","created_at"],"additionalProperties":false}},"required":["chat"],"additionalProperties":false},"chat_closed":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"reason":{"type":"string","enum":["closed_by_agent","closed_by_customer","inactivity","customer_left","customer_banned"]}},"required":["chat_id","thread_id","reason"],"additionalProperties":false},"chat_transferred":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"queued":{"type":"boolean"}},"required":["chat_id","thread_id","queued"],"additionalProperties":false},"user_added_to_chat":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"job_title":{"type":"string","maxLength":120}},"required":["id","name","avatar_url","job_title"],"additionalProperties":false}},"required":["chat_id","thread_id","user"],"additionalProperties":false},"user_removed_from_chat":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["chat_id","thread_id","user_id"],"additionalProperties":false},"incoming_event":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["chat_id","thread_id","event","seq"],"additionalProperties":false},"incoming_event_preview":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"author_id":{"type":"string"},"text":{"type":"string"}},"required":["chat_id","thread_id","author_id","text"],"additionalProperties":false},"event_updated":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]}},"required":["chat_id","thread_id","event"],"additionalProperties":false},"event_deleted":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"}},"required":["chat_id","thread_id","event_id"],"additionalProperties":false},"incoming_typing":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string"},"is_typing":{"type":"boolean"}},"required":["chat_id","thread_id","user_id","is_typing"],"additionalProperties":false},"events_marked_as_seen":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"user_id":{"type":"string"},"seen_up_to":{"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{3}(?:Z))$"}},"required":["chat_id","user_id","seen_up_to"],"additionalProperties":false},"queue_position_updated":{"type":"object","properties":{"chat_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"thread_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wait_time_s":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["chat_id","thread_id","position","wait_time_s"],"additionalProperties":false},"incoming_greeting":{"type":"object","properties":{"greeting_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"unique_id":{"type":"string"},"event":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"message"},"text":{"type":"string","minLength":1,"maxLength":16384},"postback":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"thread_id":{"type":"string"},"event_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","thread_id","event_id","type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","text","postback"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"system"},"subtype":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"},"text":{"type":"string","maxLength":1024},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","subtype","text","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"file"},"file_key":{"type":"string","maxLength":512},"name":{"type":"string","maxLength":255},"content_type":{"type":"string","maxLength":127},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"alternative_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","file_key","name","content_type","size","width","height","alternative_text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"rich_message"},"template":{"type":"string","enum":["cards","quick_replies","sticker"]},"elements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"subtitle":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"buttons":{"maxItems":13,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":128},"type":{"type":"string","enum":["message","url","webview","phone","cancel"]},"value":{"type":"string","maxLength":2048},"postback_id":{"type":"string","maxLength":64}},"required":["text","type","value","postback_id"],"additionalProperties":false}}},"required":["title","subtitle","image_url","buttons"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","template","elements"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"type":{"type":"string","enum":["name","email","text","textarea","select","checkbox","radio","rating","phone"]},"label":{"type":"string","maxLength":512},"required":{"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":256}}},"required":["id","type","label","required","options"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","fields"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"filled_form"},"form_id":{"type":"string"},"form_kind":{"type":"string","enum":["prechat","postchat","ask_for_email","custom"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"answer":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["id","label","answer"],"additionalProperties":false}}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","form_id","form_kind","answers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}_\\d+$"},"custom_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"author_id":{"type":"string"},"author_type":{"type":"string","enum":["agent","bot","customer","system"]},"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{3}(?:Z))$"},"visibility":{"type":"string","enum":["all","agents"]},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"type":{"type":"string","const":"custom"},"content":{}},"required":["id","custom_id","author_id","author_type","created_at","visibility","properties","type","content"],"additionalProperties":false}]},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"job_title":{"type":"string","maxLength":120}},"required":["id","name","avatar_url","job_title"],"additionalProperties":false},{"type":"null"}]}},"required":["greeting_id","unique_id","event","agent"],"additionalProperties":false},"customer_updated":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visitor_id":{"anyOf":[{"type":"string","minLength":8,"maxLength":64},{"type":"null"}]},"external_user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"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-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"session_fields":{"maxItems":50,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","maxLength":64},{"type":"string","maxLength":512}]}},"properties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"first_seen_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{3}(?:Z))$"},"last_seen_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{3}(?:Z))$"},"banned_until":{"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{3}(?:Z))$"},{"type":"null"}]}},"required":["id","organization_id","visitor_id","external_user_id","name","email","phone","avatar_url","session_fields","properties","first_seen_at","last_seen_at","banned_until"],"additionalProperties":false}},"required":["customer"],"additionalProperties":false},"customer_disconnected":{"type":"object","properties":{"reason":{"type":"string","enum":["banned","token_expired","inactivity_timeout","too_many_connections","license_expired","service_unavailable"]},"reconnect":{"type":"boolean"}},"required":["reason","reconnect"],"additionalProperties":false}}}}}