{"openapi":"3.1.0","info":{"title":"Anti Sandbox API","version":"2026-09-01","description":"Server-to-server API for the Anti Sandbox support agent. JSON UTF-8 · ISO-8601 UTC · integer halalas · cursor pagination · Idempotency-Key on writes · X-Request-Id on every response · RFC 9457 errors. Backward-compatible additions only inside v1.","x-documentation":"https://api.antisandbox.com/developers/docs"},"servers":[{"url":"https://api.antisandbox.com"}],"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.antisandbox.com/v1/oauth/token","scopes":{"customers:read":"Read customers and their channel identities","customers:write":"Create customers","conversations:read":"Read conversations","conversations:write":"Change conversation state (API-2)","messages:read":"Read the messages of a conversation","messages:write":"Add notes and drafts (API-2)","messages:send":"Send a reply to a customer (API-2)","agent:run":"Submit inbound events the agent answers","knowledge:read":"Read knowledge documents (API-2)","knowledge:write":"Add knowledge (API-2)","analytics:read":"Read usage and aggregate analytics","billing:read":"Read the wallet balance","webhooks:manage":"Create and test webhook endpoints","integrations:manage":"Manage integrations (API-2)"}}}}},"schemas":{"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)$","description":"UUID"},"display_name":{"type":["string","null"]},"profile":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"external_id":{"type":"string"},"phone":{"type":["string","null"]}},"required":["channel","external_id","phone"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","display_name","profile","identities","created_at","updated_at"],"additionalProperties":false},"CustomerCreate":{"type":"object","properties":{"display_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"external_id":{"type":"string","minLength":1,"maxLength":256,"description":"Phone (WhatsApp), IGSID, PSID or visitor id"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"profile":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["channel","external_id"],"additionalProperties":false},"CustomerPage":{"type":"object","properties":{"data":{"type":"array","items":{"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)$","description":"UUID"},"display_name":{"type":["string","null"]},"profile":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"external_id":{"type":"string"},"phone":{"type":["string","null"]}},"required":["channel","external_id","phone"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","display_name","profile","identities","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"CustomerOne":{"type":"object","properties":{"data":{"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)$","description":"UUID"},"display_name":{"type":["string","null"]},"profile":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"identities":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"external_id":{"type":"string"},"phone":{"type":["string","null"]}},"required":["channel","external_id","phone"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","display_name","profile","identities","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"Conversation":{"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)$","description":"UUID"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"status":{"type":"string","enum":["new","open","pending","resolved","closed","snoozed"]},"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)$","description":"UUID"},"queue":{"anyOf":[{"type":"string","enum":["general","refunds","orders","products","complaints","dev"]},{"type":"null"}]},"job":{"type":["string","null"]},"intent":{"type":["string","null"]},"escalated":{"type":"boolean"},"escalation_reason":{"type":["string","null"]},"human_touched":{"type":"boolean"},"fixture":{"type":"boolean"},"first_reply_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","number","channel","status","customer_id","queue","job","intent","escalated","escalation_reason","human_touched","fixture","first_reply_at","last_inbound_at","closed_at","created_at","updated_at"],"additionalProperties":false},"Message":{"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)$","description":"UUID"},"direction":{"type":"string","enum":["in","out"]},"author":{"type":"string","enum":["customer","agent","human"]},"text":{"type":["string","null"]},"media":{"type":"array","items":{}},"sources":{"type":"array","items":{}},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","direction","author","text","media","sources","sent_at","created_at"],"additionalProperties":false},"ConversationPage":{"type":"object","properties":{"data":{"type":"array","items":{"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)$","description":"UUID"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"status":{"type":"string","enum":["new","open","pending","resolved","closed","snoozed"]},"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)$","description":"UUID"},"queue":{"anyOf":[{"type":"string","enum":["general","refunds","orders","products","complaints","dev"]},{"type":"null"}]},"job":{"type":["string","null"]},"intent":{"type":["string","null"]},"escalated":{"type":"boolean"},"escalation_reason":{"type":["string","null"]},"human_touched":{"type":"boolean"},"fixture":{"type":"boolean"},"first_reply_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","number","channel","status","customer_id","queue","job","intent","escalated","escalation_reason","human_touched","fixture","first_reply_at","last_inbound_at","closed_at","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"ConversationDetail":{"type":"object","properties":{"data":{"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)$","description":"UUID"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"status":{"type":"string","enum":["new","open","pending","resolved","closed","snoozed"]},"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)$","description":"UUID"},"queue":{"anyOf":[{"type":"string","enum":["general","refunds","orders","products","complaints","dev"]},{"type":"null"}]},"job":{"type":["string","null"]},"intent":{"type":["string","null"]},"escalated":{"type":"boolean"},"escalation_reason":{"type":["string","null"]},"human_touched":{"type":"boolean"},"fixture":{"type":"boolean"},"first_reply_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"messages":{"type":"array","items":{"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)$","description":"UUID"},"direction":{"type":"string","enum":["in","out"]},"author":{"type":"string","enum":["customer","agent","human"]},"text":{"type":["string","null"]},"media":{"type":"array","items":{}},"sources":{"type":"array","items":{}},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","direction","author","text","media","sources","sent_at","created_at"],"additionalProperties":false}}},"required":["id","number","channel","status","customer_id","queue","job","intent","escalated","escalation_reason","human_touched","fixture","first_reply_at","last_inbound_at","closed_at","created_at","updated_at","messages"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"InboundEvent":{"type":"object","properties":{"channel":{"type":"string","enum":["whatsapp","instagram","facebook","instagram_comment","web","tiktok","twitter","reddit","telegram","slack"]},"external_message_id":{"type":"string","minLength":1,"maxLength":256,"description":"Unique per channel; a repeat is the same event (202, duplicate: true)"},"external_thread_id":{"type":"string","minLength":1,"maxLength":256},"sender":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":256},"display_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]}},"required":["external_id"],"additionalProperties":false},"text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"media":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["image","audio","video","file"]},"url":{"type":"string","minLength":1},"mime":{"type":"string","minLength":1},"size":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","url","mime"]}},"ts":{"description":"When the customer sent it; defaults to now","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"channel_account_id":{"description":"Required for a live app on whatsapp/instagram/facebook","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)$","description":"UUID"},{"type":"null"}]}},"required":["channel","external_message_id","external_thread_id","sender"],"additionalProperties":false},"InboundAccepted":{"type":"object","properties":{"event_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)$","description":"UUID"},"external_message_id":{"type":"string"},"duplicate":{"type":"boolean"},"status":{"type":"string","const":"accepted"}},"required":["event_id","external_message_id","duplicate","status"],"additionalProperties":false},"InboundAcceptedOne":{"type":"object","properties":{"data":{"type":"object","properties":{"event_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)$","description":"UUID"},"external_message_id":{"type":"string"},"duplicate":{"type":"boolean"},"status":{"type":"string","const":"accepted"}},"required":["event_id","external_message_id","duplicate","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"UsageSummary":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["from","to"],"additionalProperties":false},"wallet_balance_halalas":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer halalas (1 SAR = 100 halalas)"},"tickets":{"type":"object","properties":{"knowledge_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"action_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"routed_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"zero":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["knowledge_ticket","action_ticket","routed_ticket","zero"],"additionalProperties":false},"billed_halalas":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer halalas (1 SAR = 100 halalas)"},"conversations":{"type":"object","properties":{"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"closed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"agent_alone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["opened","closed","agent_alone"],"additionalProperties":false}},"required":["period","wallet_balance_halalas","tickets","billed_halalas","conversations"],"additionalProperties":false},"UsageSummaryOne":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["from","to"],"additionalProperties":false},"wallet_balance_halalas":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer halalas (1 SAR = 100 halalas)"},"tickets":{"type":"object","properties":{"knowledge_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"action_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"routed_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"zero":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["knowledge_ticket","action_ticket","routed_ticket","zero"],"additionalProperties":false},"billed_halalas":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer halalas (1 SAR = 100 halalas)"},"conversations":{"type":"object","properties":{"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"closed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"agent_alone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["opened","closed","agent_alone"],"additionalProperties":false}},"required":["period","wallet_balance_halalas","tickets","billed_halalas","conversations"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"WebhookEndpoint":{"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)$","description":"UUID"},"app_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)$","description":"UUID"},"url":{"type":"string"},"description":{"type":["string","null"]},"subscribed_events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled"]},"failure_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"secret_rotating_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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},"required":["id","app_id","url","description","subscribed_events","status","failure_count","last_success_at","last_failure_at","secret_rotating_until","created_at"],"additionalProperties":false},"WebhookEndpointCreate":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"https in live; sandbox may use http"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"subscribed_events":{"minItems":1,"type":"array","items":{"type":"string","enum":["webhook.test","inbound_event.accepted","*"]}}},"required":["url","subscribed_events"],"additionalProperties":false},"WebhookEndpointCreated":{"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)$","description":"UUID"},"app_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)$","description":"UUID"},"url":{"type":"string"},"description":{"type":["string","null"]},"subscribed_events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled"]},"failure_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"secret_rotating_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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"signing_secret":{"type":"string","description":"Shown once. Verify X-AntiSandbox-Signature with it."}},"required":["id","app_id","url","description","subscribed_events","status","failure_count","last_success_at","last_failure_at","secret_rotating_until","created_at","signing_secret"],"additionalProperties":false},"WebhookEndpointCreatedOne":{"type":"object","properties":{"data":{"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)$","description":"UUID"},"app_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)$","description":"UUID"},"url":{"type":"string"},"description":{"type":["string","null"]},"subscribed_events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled"]},"failure_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"secret_rotating_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+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"},"signing_secret":{"type":"string","description":"Shown once. Verify X-AntiSandbox-Signature with it."}},"required":["id","app_id","url","description","subscribed_events","status","failure_count","last_success_at","last_failure_at","secret_rotating_until","created_at","signing_secret"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"WebhookTestAccepted":{"type":"object","properties":{"event_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)$","description":"UUID"},"delivery_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)$","description":"UUID"},"status":{"type":"string","const":"queued"}},"required":["event_id","delivery_id","status"],"additionalProperties":false},"WebhookTestAcceptedOne":{"type":"object","properties":{"data":{"type":"object","properties":{"event_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)$","description":"UUID"},"delivery_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)$","description":"UUID"},"status":{"type":"string","const":"queued"}},"required":["event_id","delivery_id","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"TokenRequest":{"type":"object","properties":{"grant_type":{"type":"string","const":"client_credentials"},"client_id":{"description":"Or HTTP Basic (client_id:client_secret)","type":"string","minLength":1,"maxLength":128},"client_secret":{"type":"string","minLength":1,"maxLength":256},"scope":{"description":"Space-separated; default = every scope the app is allowed","type":"string","maxLength":1024}},"required":["grant_type"]},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scope":{"type":"string"}},"required":["access_token","token_type","expires_in","scope"],"additionalProperties":false},"OAuthError":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"},"request_id":{"type":["string","null"]}},"required":["error","request_id"],"additionalProperties":false},"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"title_ar":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"detail":{"type":"string"},"code":{"type":"string"},"request_id":{"type":["string","null"]},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","title_ar","status","detail","code","request_id"],"additionalProperties":false},"ApiIndex":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"documentation":{"type":"string"},"openapi":{"type":"string"},"endpoints":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["method","path","scopes"],"additionalProperties":false}}},"required":["name","version","documentation","openapi","endpoints"],"additionalProperties":false}}},"paths":{"/v1":{"get":{"operationId":"index","summary":"API index","description":"فهرس الواجهة","tags":["meta"],"security":[],"parameters":[],"responses":{"200":{"description":"Version, documentation and the endpoint list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiIndex"}}}}},"x-scopes":[],"x-rate-limit":"600 requests/min per app"}},"/v1/oauth/token":{"post":{"operationId":"token","summary":"Exchange client credentials for a 10-minute access token","description":"استبدال بيانات العميل برمز وصول لعشر دقائق","tags":["oauth"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"Bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"invalid_request · unsupported_grant_type · invalid_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"invalid_client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"rate_limited (20/min per client and per IP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"x-scopes":[],"x-rate-limit":"20 requests/min per client and per IP"}},"/v1/customers":{"get":{"operationId":"listCustomers","summary":"List customers","description":"قائمة العملاء","tags":["customers"],"security":[{"oauth2":["customers:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Opaque cursor from a previous page"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"A page, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPage"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["customers:read"],"x-rate-limit":"600 requests/min per app"},"post":{"operationId":"createCustomer","summary":"Create a customer with one channel identity","description":"إنشاء عميل بهوية قناة واحدة","tags":["customers"],"security":[{"oauth2":["customers:write"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOne"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"That channel identity already belongs to a customer","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["customers:write"],"x-rate-limit":"120 requests/min per app","x-idempotency-key":"optional"}},"/v1/customers/{id}":{"get":{"operationId":"getCustomer","summary":"Get a customer","description":"عميل واحد","tags":["customers"],"security":[{"oauth2":["customers:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$","description":"UUID"},"description":"UUID"}],"responses":{"200":{"description":"The customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOne"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found (also for another organization's id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["customers:read"],"x-rate-limit":"600 requests/min per app"}},"/v1/conversations":{"get":{"operationId":"listConversations","summary":"List conversations","description":"قائمة المحادثات","tags":["conversations"],"security":[{"oauth2":["conversations:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Opaque cursor from a previous page"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","open","pending","resolved","closed","snoozed"]}},{"name":"customer_id","in":"query","required":false,"schema":{"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)$","description":"UUID"}}],"responses":{"200":{"description":"A page, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPage"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["conversations:read"],"x-rate-limit":"600 requests/min per app"}},"/v1/conversations/{id}":{"get":{"operationId":"getConversation","summary":"Get a conversation with its customer-visible messages","description":"محادثة واحدة مع رسائلها","tags":["conversations"],"security":[{"oauth2":["conversations:read","messages:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$","description":"UUID"},"description":"UUID"}],"responses":{"200":{"description":"Conversation + messages (inbound and outbound only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["conversations:read","messages:read"],"x-rate-limit":"600 requests/min per app"}},"/v1/inbound-events":{"post":{"operationId":"submitInboundEvent","summary":"Submit a customer message; saved first, answered by the agent afterwards","description":"إرسال رسالة عميل — تُحفظ أولاً ثم يجيب عنها الوكيل","tags":["inbound"],"security":[{"oauth2":["agent:run"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundEvent"}}}},"responses":{"202":{"description":"Saved; the worker processes it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundAcceptedOne"}}}},"400":{"description":"validation_failed · idempotency_key_required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"sandbox_unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["agent:run"],"x-rate-limit":"60 requests/min per app","x-idempotency-key":"required"}},"/v1/usage/summary":{"get":{"operationId":"usageSummary","summary":"Wallet balance and ticket counts for a period","description":"رصيد المحفظة وعدد التذاكر لفترة","tags":["usage"],"security":[{"oauth2":["analytics:read","billing:read"]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO-8601, UTC"}}],"responses":{"200":{"description":"Month to date by default","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryOne"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["analytics:read","billing:read"],"x-rate-limit":"600 requests/min per app"}},"/v1/webhook-endpoints":{"post":{"operationId":"createWebhookEndpoint","summary":"Register a webhook endpoint (signing secret shown once)","description":"تسجيل نقطة webhook (سر التوقيع يظهر مرة واحدة)","tags":["webhooks"],"security":[{"oauth2":["webhooks:manage"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreatedOne"}}}},"400":{"description":"Bad URL (private address, http in live, …)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["webhooks:manage"],"x-rate-limit":"120 requests/min per app","x-idempotency-key":"optional"}},"/v1/webhook-endpoints/{id}/test":{"post":{"operationId":"testWebhookEndpoint","summary":"Queue a webhook.test delivery to this endpoint","description":"إرسال حدث اختبار إلى هذه النقطة","tags":["webhooks"],"security":[{"oauth2":["webhooks:manage"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$","description":"UUID"},"description":"UUID"}],"responses":{"202":{"description":"Queued; the worker delivers it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestAcceptedOne"}}}},"401":{"description":"unauthorized · invalid_token · app_inactive · ip_not_allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"insufficient_scope · browser_credentials_refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited — see Retry-After and X-RateLimit-*","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scopes":["webhooks:manage"],"x-rate-limit":"120 requests/min per app","x-idempotency-key":"optional"}}}}