addedOutput schema / oneOf
Added value: +[
+ {
+ "additionalProperties": true,
+ "allOf": [
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "broadcast_preview"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "broadcast_send"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "admins_send"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "buttons_send"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "delete"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "get"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "data": {
+ "additionalProperties": true,
+ "properties": {
+ "message": {
+ "additionalProperties": true,
+ "required": [
+ "id",
+ "text",
+ "timestamp"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "type": "object"
+ },
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "data"
+ ],
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "list"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "data": {
+ "additionalProperties": true,
+ "properties": {
+ "messages": {
+ "type": "array"
+ },
+ "pagination": {
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "page",
+ "limit",
+ "hasMore"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "messages",
+ "pagination"
+ ],
+ "type": "object"
+ },
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "data"
+ ],
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "poll_send"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "reply"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ {
+ "if": {
+ "properties": {
+ "operation": {
+ "const": "send"
+ }
+ },
+ "required": [
+ "operation"
+ ]
+ },
+ "then": {
+ "additionalProperties": true,
+ "properties": {
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown",
+ "failed",
+ "preview",
+ "confirmation_required"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ }
+ ],
+ "properties": {
+ "operation": {
+ "enum": [
+ "broadcast_preview",
+ "broadcast_send",
+ "admins_send",
+ "buttons_send",
+ "delete",
+ "get",
+ "list",
+ "poll_send",
+ "reply",
+ "send"
+ ],
+ "type": "string"
+ },
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "completed",
+ "empty",
+ "pending",
+ "unknown"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "operation",
+ "presentation"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": true,
+ "properties": {
+ "operation": {
+ "enum": [
+ "broadcast_preview",
+ "broadcast_send",
+ "admins_send",
+ "buttons_send",
+ "delete",
+ "get",
+ "list",
+ "poll_send",
+ "reply",
+ "send"
+ ],
+ "type": "string"
+ },
+ "presentation": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "displayName": {
+ "type": "string"
+ },
+ "participantCount": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "phone": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "displayName"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "type": "string"
+ },
+ "pagination": {
+ "additionalProperties": false,
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "limit": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "offset": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "page": {
+ "minimum": 1,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "enum": [
+ "preview",
+ "confirmation_required",
+ "failed"
+ ]
+ },
+ "version": {
+ "const": 1
+ }
+ },
+ "required": [
+ "version",
+ "status",
+ "message",
+ "items"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "operation",
+ "presentation"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": true,
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "error": {
+ "type": "object"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "message",
+ "error"
+ ],
+ "type": "object"
+ }
+]