{"openapi":"3.1.0","info":{"title":"Wagent API","version":"1.0.0","description":"Read chats, send through the owner's rules, handle approvals and receive signed webhooks for a WhatsApp number connected to Wagent."},"servers":[{"url":"https://mcp.wagent.sh"}],"components":{"securitySchemes":{"key":{"type":"http","scheme":"bearer","description":"Your API key: wg_live_… or wg_test_…"}}},"paths":{"/v1/me":{"get":{"operationId":"getMe","summary":"The key's workspace, agent, key and granted scopes.","security":[{"key":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"}},"required":["id","name","kind"],"additionalProperties":false},"key":{"type":"object","properties":{"kind":{"type":"string","enum":["server","read_only"]},"env":{"type":"string","enum":["live","test"]},"last4":{"type":"string"}},"required":["kind","env","last4"],"additionalProperties":false},"scopes":{"type":"array","items":{"type":"string"}},"access_ends_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["workspace","agent","key","scopes","access_ends_at"],"additionalProperties":false}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/messages":{"post":{"operationId":"sendMessage","summary":"Sends a WhatsApp text through the owner's rules: sent, waiting for the owner, or held. A retry after a crash that may have sent answers unknown and never sends again.","security":[{"key":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"string","maxLength":64},"text":{"type":"string","minLength":1,"maxLength":4096},"reply_to":{"type":"string","maxLength":64}},"required":["chat_id","text"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["sent","waiting","held","unknown"]},"send_id":{"type":"string"},"approval_id":{"type":"string"},"draft_id":{"type":"string"},"expires_at":{"type":"string"},"note":{"type":"string"},"reason":{"type":"string"}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid. idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid","idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. read_only_key: This key is read only, so it cannot change anything. agents_paused: Agents are paused by the workspace owner. tool_off: The workspace owner has not turned this tool on for this agent. blocked: The owner's rules do not allow this.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","read_only_key","agents_paused","tool_off","blocked"]},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"not_found: Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"idempotency_in_progress: A request with this Idempotency-Key is still running. Retry shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_in_progress"]},"message":{"type":"string"}},"required":["error","message"]}}}},"422":{"description":"idempotency_key_mismatch: This Idempotency-Key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_mismatch"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}},"502":{"description":"send_failed: WhatsApp did not accept the message. Nothing was delivered.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["send_failed"]},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"unavailable: Wagent could not complete this request, so nothing was done. Try again shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unavailable"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/chats":{"get":{"operationId":"listChats","summary":"The chats this agent may read, newest activity first, each with what the agent can do there. Same as the MCP list_chats tool.","security":[{"key":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}},{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_cursor":{"type":["string","null"]},"wagent_data":{"type":"object","properties":{"untrusted":{"type":"boolean","const":true},"note":{"type":"string"},"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["untrusted","note","items"],"additionalProperties":false}},"required":["count","next_cursor","wagent_data"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. agents_paused: Agents are paused by the workspace owner. tool_off: The workspace owner has not turned this tool on for this agent.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","agents_paused","tool_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"unavailable: Wagent could not complete this request, so nothing was done. Try again shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unavailable"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/chats/{id}/messages":{"get":{"operationId":"getMessages","summary":"One chat's messages: the newest page first, each page oldest first, with gap markers and the history window. Same as the MCP get_messages tool.","security":[{"key":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"chat_id":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_cursor":{"type":["string","null"]},"wagent_data":{"type":"object","properties":{"untrusted":{"type":"boolean","const":true},"note":{"type":"string"},"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["untrusted","note","items"],"additionalProperties":false}},"required":["chat_id","count","next_cursor","wagent_data"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. agents_paused: Agents are paused by the workspace owner. tool_off: The workspace owner has not turned this tool on for this agent.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","agents_paused","tool_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"not_found: Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"unavailable: Wagent could not complete this request, so nothing was done. Try again shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unavailable"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/approvals":{"get":{"operationId":"listApprovals","summary":"Items waiting for the owner in chats this agent may read, oldest first, each with its exact payload and sha256. CRM changes are not listed.","security":[{"key":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["draft","approval"]},"item_type":{"type":"string","enum":["message","file","quote"]},"state":{"type":"string","enum":["pending","failed"]},"chat_id":{"type":"string"},"channel_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"payload":{"type":["string","null"]},"sha256":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","kind","item_type","state","chat_id","channel_id","agent_id","payload","sha256","created_at","expires_at"],"additionalProperties":false}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","count"],"additionalProperties":false}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. agents_paused: Agents are paused by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","agents_paused"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/approvals/{id}/approve":{"post":{"operationId":"approveItem","summary":"Approves an item by the sha256 of its payload; the stored payload is sent exactly as shown. Needs the owner's may-approve switch for this agent; never the agent's own items or a CRM change.","security":[{"key":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["sha256"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["sent","failed","unknown"]},"item":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"}},"required":["id","state"],"additionalProperties":false}},"required":["status","item"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid. idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid","idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. read_only_key: This key is read only, so it cannot change anything. agents_paused: Agents are paused by the workspace owner. approvals_off: Approving through the API is off for this agent. own_item: A key cannot approve its own agent's items. trial_limit: This number reached its trial limit.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","read_only_key","agents_paused","approvals_off","own_item","trial_limit"]},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"not_found: Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"not_pending: This item is no longer waiting. idempotency_in_progress: A request with this Idempotency-Key is still running. Retry shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_pending","idempotency_in_progress"]},"message":{"type":"string"}},"required":["error","message"]}}}},"422":{"description":"idempotency_key_mismatch: This Idempotency-Key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_mismatch"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/pause":{"post":{"operationId":"pauseAll","summary":"Pauses every agent in the workspace at once and tells owners and admins. A second call keeps the first time. Only an owner or admin can resume, on the web.","security":[{"key":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean","const":true},"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))$"}},"required":["paused","at"],"additionalProperties":false}}}},"400":{"description":"idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. read_only_key: This key is read only, so it cannot change anything.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","read_only_key"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"idempotency_in_progress: A request with this Idempotency-Key is still running. Retry shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_in_progress"]},"message":{"type":"string"}},"required":["error","message"]}}}},"422":{"description":"idempotency_key_mismatch: This Idempotency-Key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_mismatch"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/connect/sessions":{"post":{"operationId":"createConnectSession","summary":"A one-time connect session for one of your users, valid 15 minutes. Pass it to Wagent.connect() in your page; the number lands in this workspace tagged with `user`. Needs an active plan and a live key (a wg_test_ key gets 404). A repeat of the Idempotency-Key never returns a second session.","security":[{"key":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","maxLength":1000}},"required":["user"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["session","expires_at"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid. idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid","idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. read_only_key: This key is read only, so it cannot change anything.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","read_only_key"]},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"not_found: Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"widget_unavailable: This workspace cannot connect numbers through the widget until it has an active plan. idempotency_in_progress: A request with this Idempotency-Key is still running. Retry shortly. already_requested: This request was already made.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["widget_unavailable","idempotency_in_progress","already_requested"]},"message":{"type":"string"}},"required":["error","message"]}}}},"422":{"description":"idempotency_key_mismatch: This Idempotency-Key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_mismatch"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/sessions":{"get":{"operationId":"listSessions","summary":"Every WhatsApp number of this workspace that is not released, oldest first: its state (one of six), status, history sync progress from 0 to 100, and the user reference you passed when your user connected it through the widget.","security":[{"key":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"phone_number":{"type":["string","null"]},"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"status":{"type":"string","enum":["connected","syncing","logged_out","banned","not_yet"]},"sync_progress":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"external_ref":{"type":["string","null"]},"connected_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))$"},{"type":"null"}]}},"required":["id","phone_number","state","status","sync_progress","external_ref","connected_at"],"additionalProperties":false}}},"required":["sessions"],"additionalProperties":false}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. agents_paused: Agents are paused by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","agents_paused"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/events":{"get":{"operationId":"listEvents","summary":"Your webhook deliveries, newest first, 50 a page: event id, type, time, status, tries and the last answer's status and time taken. No payloads; replay an event to receive it again. status=not_delivered keeps pending, failed and skipped ones.","security":[{"key":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","not_delivered"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"status":{"type":"string","enum":["pending","sending","delivered","failed","skipped"]},"tries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_latency_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","type","created_at","status","tries","last_status","last_latency_ms"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["events","next_cursor"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. agents_paused: Agents are paused by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","agents_paused"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/events/{id}/replay":{"post":{"operationId":"replayEvent","summary":"Sends one event to your webhook URL again now, with the same webhook-id, and answers how that attempt went. It never repeats the action behind the event. At most 10 replays a minute.","security":[{"key":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"replayed"},"delivery":{"type":"object","properties":{"status":{"type":"string","enum":["pending","sending","delivered","failed","skipped"]},"tries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["status","tries"],"additionalProperties":false}},"required":["status","delivery"],"additionalProperties":false}}}},"400":{"description":"idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. agents_paused: Agents are paused by the workspace owner. read_only_key: This key is read only, so it cannot change anything.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","agents_paused","read_only_key"]},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"not_found: Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"event_sending: This event is being delivered right now. Retry in a few seconds. idempotency_in_progress: A request with this Idempotency-Key is still running. Retry shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["event_sending","idempotency_in_progress"]},"message":{"type":"string"}},"required":["error","message"]}}}},"422":{"description":"idempotency_key_mismatch: This Idempotency-Key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_mismatch"]},"message":{"type":"string"}},"required":["error","message"]}}}},"423":{"description":"agent_off: This agent is switched off by the workspace owner.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["agent_off"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"unavailable: Wagent could not complete this request, so nothing was done. Try again shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unavailable"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/agents/signup":{"post":{"operationId":"signUpAgent","summary":"An agent asks the owner of an email address for access, with no key. The owner gets an email and approves on the web with a WhatsApp code; the agent then claims its key once with claim_token. The answer is the same whatever happens to the email.","security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner_email":{"type":"string","maxLength":254},"agent_name":{"type":"string","maxLength":1000},"scopes":{"maxItems":4,"type":"array","items":{"type":"string","enum":["read","draft_reply","transcribe","send_message"]}},"note":{"type":"string","maxLength":2000}},"required":["owner_email","agent_name"]}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"pending_owner_approval"},"signup_id":{"type":"string"},"claim_token":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["status","signup_id","claim_token","expires_at"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid. idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid","idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"already_requested: This request was already made.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["already_requested"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"unavailable: Wagent could not complete this request, so nothing was done. Try again shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unavailable"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/sandbox/inbound":{"post":{"operationId":"simulateInbound","summary":"Sandbox only (a wg_test_ key): a message from test contact 1 to 5 to the sandbox number. It arrives like a real message, through the inbox, the rules, Activity and your webhooks. 60 a minute per sandbox.","security":[{"key":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"integer","minimum":1,"maximum":5},"text":{"type":"string","minLength":1,"maxLength":4096}},"required":["contact","text"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message_id":{"type":"string"}},"required":["message_id"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid. idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid","idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. read_only_key: This key is read only, so it cannot change anything.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","read_only_key"]},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"not_found: Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"idempotency_in_progress: A request with this Idempotency-Key is still running. Retry shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_in_progress"]},"message":{"type":"string"}},"required":["error","message"]}}}},"422":{"description":"idempotency_key_mismatch: This Idempotency-Key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_mismatch"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/sandbox/session":{"post":{"operationId":"setSandboxSession","summary":"Sandbox only (a wg_test_ key): moves the sandbox number to one of the six session states. Each change sends the same session events a real number would.","security":[{"key":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you choose for this write, 1 to 255 visible ASCII characters. Repeating it never repeats the write.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]}},"required":["state"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]}},"required":["state"],"additionalProperties":false}}}},"400":{"description":"invalid: The request is not valid. idempotency_key_required: Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid","idempotency_key_required"]},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"unauthorized: The API key is missing, unknown, revoked or not valid for this workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"ip_not_allowed: This address is not on the agent's allowed addresses. read_only_key: This key is read only, so it cannot change anything.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ip_not_allowed","read_only_key"]},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"not_found: Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"idempotency_in_progress: A request with this Idempotency-Key is still running. Retry shortly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_in_progress"]},"message":{"type":"string"}},"required":["error","message"]}}}},"422":{"description":"idempotency_key_mismatch: This Idempotency-Key was already used with a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_key_mismatch"]},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"rate_limited: Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document: OpenAPI 3.1, generated from the code that serves the API. No key needed.","security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string","const":"3.1.0"}},"required":["openapi"],"additionalProperties":{}}}}}}}}},"webhooks":{"message.received":{"post":{"operationId":"webhook.message.received","summary":"message.received (messages events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"message.received"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"wagent_data":{"type":"object","properties":{"untrusted":{"type":"boolean","const":true},"note":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"source":{"type":"object","properties":{"kind":{"type":"string","const":"whatsapp_message"},"chatId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"author":{"type":"string","enum":["contact","owner","group_member"]},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\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))$"}},"required":["kind","chatId","messageId","author","sentAt"],"additionalProperties":false},"text":{"type":"string"},"redacted":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","properties":{"type":{"type":"string"},"sender_name":{"type":["string","null"]}},"required":["type","sender_name"],"additionalProperties":false}},"required":["source","text","meta"],"additionalProperties":false}}},"required":["untrusted","note","items"],"additionalProperties":false}},"required":["message_id","chat_id","channel_id","wagent_data"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"message.status":{"post":{"operationId":"webhook.message.status","summary":"message.status (messages events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"message.status"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"type":"string","enum":["pending","sent","delivered","read","played","failed","deleted"]}},"required":["message_id","chat_id","channel_id","status"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"message.sent":{"post":{"operationId":"webhook.message.sent","summary":"message.sent (messages events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"message.sent"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["message_id","chat_id","channel_id"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"message.edited":{"post":{"operationId":"webhook.message.edited","summary":"message.edited (messages events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"message.edited"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"wagent_data":{"type":"object","properties":{"untrusted":{"type":"boolean","const":true},"note":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"source":{"type":"object","properties":{"kind":{"type":"string","const":"whatsapp_message"},"chatId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"author":{"type":"string","enum":["contact","owner","group_member"]},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\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))$"}},"required":["kind","chatId","messageId","author","sentAt"],"additionalProperties":false},"text":{"type":"string"},"redacted":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"meta":{"type":"object","properties":{"type":{"type":"string"},"sender_name":{"type":["string","null"]}},"required":["type","sender_name"],"additionalProperties":false}},"required":["source","text","meta"],"additionalProperties":false}}},"required":["untrusted","note","items"],"additionalProperties":false}},"required":["message_id","chat_id","channel_id","wagent_data"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"message.deleted":{"post":{"operationId":"webhook.message.deleted","summary":"message.deleted (messages events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"message.deleted"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["message_id","chat_id","channel_id"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"status.posted":{"post":{"operationId":"webhook.status.posted","summary":"status.posted (statuses events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"status.posted"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"type":{"type":"string"}},"required":["message_id","chat_id","channel_id","type"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"chat.updated":{"post":{"operationId":"webhook.chat.updated","summary":"chat.updated (chats events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"chat.updated"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"removed":{"type":"boolean"}},"required":["chat_id","channel_id","removed"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"contact.updated":{"post":{"operationId":"webhook.contact.updated","summary":"contact.updated (contacts events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"contact.updated"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["chat_id","channel_id"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"group.updated":{"post":{"operationId":"webhook.group.updated","summary":"group.updated (groups events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"group.updated"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"change":{"type":"string","enum":["updated","add","remove","promote","demote","leave"]},"count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["chat_id","channel_id","change","count"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"label.updated":{"post":{"operationId":"webhook.label.updated","summary":"label.updated (labels events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"label.updated"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"label_id":{"type":"string"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"removed":{"type":"boolean"}},"required":["label_id","channel_id","removed"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"presence.updated":{"post":{"operationId":"webhook.presence.updated","summary":"presence.updated (presences events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"presence.updated"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"presence":{"type":"string","enum":["online","offline","typing","recording"]}},"required":["chat_id","channel_id","presence"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"call.received":{"post":{"operationId":"webhook.call.received","summary":"call.received (calls events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"call.received"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"call_id":{"type":"string"},"status":{"type":"string","enum":["initiated","ringing","missed","answered"]},"video":{"type":"boolean"},"group":{"type":"boolean"}},"required":["chat_id","channel_id","call_id","status","video","group"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"draft.created":{"post":{"operationId":"webhook.draft.created","summary":"draft.created (always sent)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"draft.created"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"approval_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"agent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"kind":{"type":"string","enum":["draft","approval"]},"item_type":{"type":"string"},"reason":{"type":"string"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"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))$"}},"required":["approval_id","agent_id","chat_id","channel_id","kind","item_type","reason","expires_at","created_at"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"approval.requested":{"post":{"operationId":"webhook.approval.requested","summary":"approval.requested (always sent)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"approval.requested"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"approval_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"agent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"kind":{"type":"string","enum":["draft","approval"]},"item_type":{"type":"string"},"reason":{"type":"string"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"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))$"}},"required":["approval_id","agent_id","chat_id","channel_id","kind","item_type","reason","expires_at","created_at"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"approval.decided":{"post":{"operationId":"webhook.approval.decided","summary":"approval.decided (always sent)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"approval.decided"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"approval_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"attempt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"agent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"chat_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channel_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"result":{"type":"string","enum":["approved","skipped","expired","taken_over"]},"via":{"anyOf":[{"type":"string","enum":["web","phone","api"]},{"type":"null"}]},"item_type":{"type":["string","null"]},"actor_kind":{"type":"string","enum":["agent","member","system","phone"]}},"required":["approval_id","attempt","agent_id","chat_id","channel_id","result","via","item_type","actor_kind"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"rule.changed":{"post":{"operationId":"webhook.rule.changed","summary":"rule.changed (always sent)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"rule.changed"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"agent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"field":{"type":["string","null"]}},"required":["agent_id","field"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"agent.paused":{"post":{"operationId":"webhook.agent.paused","summary":"agent.paused (always sent)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"agent.paused"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"agent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"all":{"type":"boolean"},"via":{"type":["string","null"]}},"required":["agent_id","all"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"agent.revoked":{"post":{"operationId":"webhook.agent.revoked","summary":"agent.revoked (always sent)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"agent.revoked"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["agent_id"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"session.state":{"post":{"operationId":"webhook.session.state","summary":"session.state (channel events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"session.state"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"phone_number":{"type":["string","null"]},"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"status":{"type":"string","enum":["connected","syncing","logged_out","banned","not_yet"]},"external_ref":{"type":["string","null"]}},"required":["id","phone_number","state","status","external_ref"],"additionalProperties":false},"from":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"to":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]}},"required":["session","from","to"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"session.syncing":{"post":{"operationId":"webhook.session.syncing","summary":"session.syncing (channel events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"session.syncing"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"phone_number":{"type":["string","null"]},"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"status":{"type":"string","enum":["connected","syncing","logged_out","banned","not_yet"]},"external_ref":{"type":["string","null"]}},"required":["id","phone_number","state","status","external_ref"],"additionalProperties":false}},"required":["session"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"session.banned":{"post":{"operationId":"webhook.session.banned","summary":"session.banned (channel events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"session.banned"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"phone_number":{"type":["string","null"]},"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"status":{"type":"string","enum":["connected","syncing","logged_out","banned","not_yet"]},"external_ref":{"type":["string","null"]}},"required":["id","phone_number","state","status","external_ref"],"additionalProperties":false}},"required":["session"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"session.connected":{"post":{"operationId":"webhook.session.connected","summary":"session.connected (users events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"session.connected"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"phone_number":{"type":["string","null"]},"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"status":{"type":"string","enum":["connected","syncing","logged_out","banned","not_yet"]},"external_ref":{"type":["string","null"]}},"required":["id","phone_number","state","status","external_ref"],"additionalProperties":false},"from":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"to":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]}},"required":["session","from","to"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}},"session.logged_out":{"post":{"operationId":"webhook.session.logged_out","summary":"session.logged_out (users events)","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, evt_ then a UUID. The same on every retry and replay: use it to skip duplicates.","schema":{"type":"string","pattern":"^evt_"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was signed. Refuse ones more than 5 minutes away from your clock.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated v1,<base64> HMAC-SHA256 signatures of \"{webhook-id}.{webhook-timestamp}.{raw body}\" with your whsec_ secret (Standard Webhooks).","schema":{"type":"string","pattern":"^v1,"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","const":"session.logged_out"},"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))$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"env":{"type":"string","enum":["live","test"]},"data":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"phone_number":{"type":["string","null"]},"state":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"status":{"type":"string","enum":["connected","syncing","logged_out","banned","not_yet"]},"external_ref":{"type":["string","null"]}},"required":["id","phone_number","state","status","external_ref"],"additionalProperties":false},"from":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]},"to":{"type":"string","enum":["not_started","starting","qr","authorized","error","sync_error"]}},"required":["session","from","to"],"additionalProperties":false}},"required":["id","type","created_at","workspace_id","env","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Any 2xx answer within 15 seconds marks the event delivered. Anything else is retried with the same webhook-id."}}}}}}