{
	"openapi": "3.0.1",
	"tags": [
		{
			"name": "Favorites"
		},
		{
			"name": "Message Operations"
		},
		{
			"name": "Group Chat Operations"
		},
		{
			"name": "Account Information Retrieval"
		},
		{
			"name": "Session Information Getters"
		},
		{
			"name": "Contact Operations"
		},
		{
			"name": "Chat Operations"
		},
		{
			"name": "Channel Chat Operations"
		},
		{
			"name": "Community Chat Operations"
		},
		{
			"name": "Call Operations"
		},
		{
			"name": "Story Operations (Beta)"
		},
		{
			"name": "Queue Operations"
		},
		{
			"name": "Session Controlling Operations"
		},
		{
			"name": "Labels"
		},
		{
			"name": "Presences"
		},
		{
			"name": "Business Catalog"
		}
	],
	"servers": [
		{
			"url": "https://api.maytapi.com/api/{product_id}",
			"variables": {
				"product_id": {
					"description": "You can find your token at https://console.maytapi.com/settings/token",
					"default": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
				}
			}
		}
	],
	"paths": {
		"/product": {
			"get": {
				"tags": ["Account Information Retrieval"],
				"description": "Returns the information of the product with the given product id.",
				"summary": "Returns product information",
				"responses": {
					"200": {
						"description": "Returns the product settings.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/productData"
								}
							}
						}
					}
				}
			}
		},
		"/addPhone": {
			"post": {
				"tags": ["Account Information Retrieval"],
				"description": "Adds a new phone to the product.",
				"summary": "Adds new phone",
				"requestBody": {
					"description": "If a number is wanted to be specified by adding the phone, that number is given. Otherwise, the number will be updated in database, when qr-screen is passed later.",
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/addPhoneBody"
							}
						}
					},
					"required": false
				},
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/phoneObjWithPid"
								}
							}
						}
					}
				}
			}
		},
		"/listPhones": {
			"get": {
				"tags": ["Account Information Retrieval"],
				"description": "Returns information of all the phones registered to the given product.",
				"summary": "Lists registered phones",
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/phoneList"
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/screen": {
			"get": {
				"tags": ["Favorites", "Session Information Getters"],
				"description": "Returns a screenshot of the current session screen as a PNG image. On some connections, only the QR code image is returned while the phone is waiting to be linked.",
				"summary": "Gets session screen",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "Returns the screenshot of the screen in the current session.",
						"content": {}
					}
				}
			}
		},
		"/{phone_id}/sendMessage": {
			"post": {
				"tags": ["Favorites", "Message Operations"],
				"description": "Used for sending message to a chat. A text, image, video, sound and document can be sent.\n\n**This endpoint adds messages to your phone's sending queue. If your messages not delivering to phones please check your instance logs, queue endpoint or connection (/screen).**\n\n**Curl example:** (You need to change product_id, phone_id and token[x-maytapi-key] with your product's values...)\n```bash\ncurl -X POST \\\n'https://api.maytapi.com/api/dc01968f-####-####-####-7cfcf51aa423/12/sendMessage' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-maytapi-key: b267697c-####-####-####-2435e812efc1' \\\n  -d '{\n\t\"message\": \"http://placehold.it/180\", \n\t\"text\": \"\", \n\t\"to_number\": \"+905301111111\", \n\t\"type\": \"media\"\n}'",
				"summary": "Sends a text, media, poll, vcard, contact, forward, delete, reaction, edit, sticker, location, link, product, buttons,carousel messages, also supports channel operations",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- to_number should start with country code without any special characters.\n- For group conversations you need to pass group.id to to_number. Ex: **\"905301234567-1574073754@g.us\"**\n- If the message to be sent is just a text message, it can be put directly to ***message*** parameter in the body \n- **For media and group message examples please look at 'Request body examples' section below.**\n- For Product messages you need to create your products from WhatsApp Business Phone app and find your product id with **/catalog** endpoints. \n- The **typing** option can now be added as duration or recording. (This feature is completely optional. **It is not necessary**) \n- **Duration** property is set to a maximum of 30 and a minimum of 1. (This feature is completely optional. **It is not necessary**)",
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/sendMessageBody"
							},
							"examples": {
								"Text Message": {
									"value": {
										"to_number": "905301234567",
										"type": "text",
										"message": "Hello World!",
										"typing": "typing or recording (optional)",
										"duration": 3
									}
								},
								"Emoji Message": {
									"value": {
										"to_number": "905301234567",
										"type": "text",
										"message": "You can use ascii emojis 😀 in your text 📝 messages."
									}
								},
								"Ignore Dupe Filter Example": {
									"value": {
										"to_number": "905301234567",
										"type": "text",
										"message": "You can add skip_filter: true in messages to skip dupe filter.",
										"skip_filter": true
									}
								},
								"Media Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "media",
										"message": "http://placehold.it/180",
										"text": "Message Caption (optional)",
										"isHd": true
									}
								},
								"Media Message (base64)": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "media",
										"message": "data:image/png;base64,iVBORw0KG...",
										"text": "Message Caption (optional)"
									}
								},
								"Media Message (Custom Name)": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "media",
										"message": "https://cdnydm.com/permedia/SHjKBCXHOfpCf37aIP6EXw.txt",
										"filename": "demo.txt"
									}
								},
								"Media Message (Gif)": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "media",
										"message": "https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExcTV2Zmt4anNwZWpjdGY3azk1Z2owdXhuM3pxczJhYWMwdXdmemRsOCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/xUPGcvlsl4Eh5Ie4Fi/giphy.mp4",
										"text": "Message Caption (optional)",
										"isGif": true
									}
								},
								"Username Message": {
									"description": "Send to a WhatsApp username: to_number must start with @ (without it the value is treated as a phone number). If the username is key-protected, append the 4-digit key after a colon (@john_doe:1234); the key is only needed for the first message from this phone. WhatsApp does not reveal the recipient's phone number, so the chat id in the response and in ack webhooks is <number>@c.us when the number is known to the account, otherwise <lid>@lid.",
									"value": {
										"to_number": "@john_doe",
										"type": "text",
										"message": "Hello"
									}
								},
								"Username Message with Key": {
									"value": {
										"to_number": "@john_doe:1234",
										"type": "text",
										"message": "Hello"
									}
								},
								"Group Message": {
									"value": {
										"to_number": "905301234567-1574073754@g.us",
										"type": "text",
										"message": "Hello World!"
									}
								},
								"Group Mention Message": {
									"value": {
										"to_number": "905301234567-1574073754@g.us",
										"type": "text",
										"message": "Just put the number after a at symbol. Example: @905301234567 You can use multiple number."
									}
								},
								"Mention Everyone Message": {
									"description": "Mention everyone in a group with @all. Only for 'text' and 'link' messages in group chats; can be combined with individual mentions. Works in groups under 33 participants or when the sender is an admin, otherwise sent as plain text.",
									"value": {
										"to_number": "905301234567-1574073754@g.us",
										"type": "text",
										"message": "@all Meeting starts in 10 minutes."
									}
								},
								"Poll Message": {
									"value": {
										"to_number": "905301234567-1574073754@g.us",
										"type": "poll",
										"message": "Poll Message",
										"options": ["1", "2", "3"],
										"only_one  (optional)": true
									}
								},
								"vCard Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "vcard",
										"message": {
											"displayName": "John Doe",
											"vcard": "BEGIN:VCARD\nVERSION:3.0\nFN;CHARSET=UTF-8:John Doe\nN;CHARSET=UTF-8:;John;Doe;;\nTEL;TYPE=CELL:+9051234567\nREV:2020-01-23T11:09:14.782Z\nEND:VCARD"
										}
									}
								},
								"File Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "media",
										"message": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
										"text": "Message Caption (optional)"
									}
								},
								"Contact Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "contact",
										"message": "908501234567@c.us"
									}
								},
								"Multi Contact Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "contact",
										"message": ["908501234568@c.us", "908501234569@c.us"]
									}
								},
								"Group Invite Message": {
									"value": {
										"to_number": "905301234567",
										"type": "groupInvite",
										"groupId": "905301234567-1574073754@g.us",
										"message": "Hey everyone! Thanks for joining the group."
									}
								},
								"Channel Invite Message": {
									"value": {
										"to_number": "905301234567",
										"type": "channel_invite",
										"channelId": "120363204759413821@newsletter",
										"inviteCode": "ABC123XYZ",
										"message": "Hey there! Join our newsletter to stay updated with the latest tech news and insights."
									}
								},
								"Channel Admin Invite Message": {
									"value": {
										"to_number": "905301234567",
										"type": "channel_admin_invite",
										"channelId": "120363204759413821@newsletter",
										"message": "Hello! You've been invited to become an admin of our newsletter. Please accept this invitation to get started."
									}
								},
								"Pin Message": {
									"value": {
										"to_number": "905301234567",
										"type": "pinMessage",
										"action": 1,
										"duration": 86400,
										"reply_to": "false_905301234567-1586347989@g.us_3EB0A81ECEA6D47F2F13"
									},
									"description": "**duration** (integer):\n- 86400 = 1 day\n- 604800 = 7 days\n- 2592000 = 30 days"
								},
								"Unpin Message": {
									"value": {
										"to_number": "905301234567",
										"type": "pinMessage",
										"action": 2,
										"reply_to": "false_905301234567-1586347989@g.us_3EB0A81ECEA6D47F2F13"
									}
								},
								"Star Message": {
									"value": {
										"to_number": "905301234567",
										"type": "star",
										"action": 1,
										"message": "50d8b950-a67f-11eb-91cc-d97af631df95"
									}
								},
								"Unstar Message": {
									"value": {
										"to_number": "905301234567",
										"type": "star",
										"action": 2,
										"message": "50d8b950-a67f-11eb-91cc-d97af631df95"
									}
								},
								"Forward Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "forward",
										"message": "false_905301234567-1586347989@g.us_3EB0A81ECEA6D47F2F13",
										"forward_caption": true
									}
								},
								"Forward Message (Outgoing)": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "forward",
										"message": "50d8b950-a67f-11eb-91cc-d97af631df95",
										"forward_caption": true
									}
								},
								"Delete Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "delete",
										"message": "50d8b950-a67f-11eb-91cc-d97af631df95"
									}
								},
								"Delete Group Message": {
									"value": {
										"to_number": "905301234567-1574073754@g.us",
										"type": "delete",
										"message": "50d8b950-a67f-11eb-91cc-d97af631df95",
										"deleteForEveryone": true
									},
									"description": "**deleteForEveryone**: Set to true if you want to delete the message for everyone in the group, false to delete only for yourself."
								},
								"Reply Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "text",
										"message": "Message Text",
										"reply_to": "false_905301234567-1586347989@g.us_3EB0A81ECEA6D47F2F13"
									}
								},
								"Reply Message (Outgoing)": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "text",
										"message": "Message Text",
										"reply_to": "50d8b950-a67f-11eb-91cc-d97af631df95"
									}
								},
								"Reaction Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "reaction",
										"message": "😀",
										"reply_to": "false_905301234567-1586347989@g.us_3EB0A81ECEA6D47F2F13"
									}
								},
								"Unreact Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "unreact",
										"message": "false_905301234567-1586347989@g.us_3EB0A81ECEA6D47F2F13"
									}
								},
								"Event Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "createEvent",
										"message": "Event Messsage",
										"description": "Event description",
										"startTime": 1728910206,
										"endTime": 1728985800,
										"location": "Event location",
										"callType": "voice"
									}
								},
								"Comment Message": {
									"description": "Posts a comment under a message in a community announcement group. to_number is the announcement group, reply_to is the id of the announcement message. Comments are only available in community announcement groups.",
									"value": {
										"to_number": "120363349826218857@g.us",
										"type": "comment",
										"reply_to": "false_120363349826218857@g.us_3EB0A81ECEA6D47F2F13_905301234567@c.us",
										"message": "Great news!"
									}
								},
								"Send Message to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_text",
										"message": "Channel Text"
									}
								},
								"Send Media to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_media",
										"message": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
										"text": "Message Caption (optional)"
									}
								},
								"Send Media to Channel (Gif)": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_media",
										"message": "https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExcTV2Zmt4anNwZWpjdGY3azk1Z2owdXhuM3pxczJhYWMwdXdmemRsOCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/xUPGcvlsl4Eh5Ie4Fi/giphy.mp4",
										"text": "Message Caption (optional)",
										"isGif": true
									}
								},
								"Send Link to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_link",
										"message": "https://maytapi.com/",
										"text": "WhatsApp API (optional)"
									}
								},
								"Send Poll to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_poll",
										"message": "Channel Poll",
										"options": ["1", "2", "3"],
										"only_one  (optional)": true
									}
								},
								"Send Question to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_question",
										"message": "What do you think?"
									}
								},
								"Send Quiz to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_quiz",
										"message": "What is the capital of France?",
										"options": ["London", "Paris", "Berlin"],
										"correct_option": 1
									}
								},
								"Send Sticker to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_sticker",
										"message": "https://cdnydm.com/wh/aERKsVRyYAO9enBQrRwjlA.webp?size=512x512"
									}
								},
								"Send Audio to Channel": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_audio",
										"message": "https://cdnydm.com/wh/......"
									}
								},
								"Delete Channel Message": {
									"value": {
										"to_number": "120363204759413821@newsletter",
										"type": "channel_delete_message",
										"message": "50d8b950-a67f-11eb-91cc-d97af631df95"
									}
								},
								"Send Story Text Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "story_text",
										"message": "This is a message sent to someone's story!",
										"storyId": "false@broadcast_3EB00968GFDE6C3F4593410_9053012345678@c.us"
									}
								},
								"Send Story Media Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "story_media",
										"message": "http://placehold.it/180",
										"text": "This is a message sent to someone's story!",
										"storyId": "false@broadcast_3EB00968GFDE6C3F4593410_9053012345678@c.us"
									}
								},
								"Edit Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "edit",
										"message": "Hello!!",
										"reply_to": "false_905301234567-1586347989@g.us_3EB0A81ECEA6D47F2F13"
									}
								},
								"Sticker Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "sticker",
										"message": "https://cdnydm.com/wh/aERKsVRyYAO9enBQrRwjlA.webp?size=512x512"
									}
								},
								"Short Video Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "shortVideo",
										"message": "https://cdnydm.com/wh/......"
									}
								},
								"Audio Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "audio",
										"message": "https://cdnydm.com/wh/......"
									}
								},
								"Location Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "location",
										"text": "Fatih Sultan Mehmet Köprüsü",
										"latitude": "41.093292",
										"longitude": "29.061737"
									}
								},
								"Link Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "link",
										"message": "https://maytapi.com/",
										"text": "WhatsApp API (optional)"
									}
								},
								"Product Message (Beta)": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "product",
										"productId": "3121315354601301"
									}
								},
								"Catalog Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "catalog",
										"message": "Check out our products!",
										"title": "Our Catalog (optional)",
										"description": "Browse our latest items (optional)"
									}
								},
								"Buttons Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [
											{
												"id": "!response 1",
												"text": "Test Button 1"
											},
											{
												"id": "!response 2",
												"text": "Test Button 2"
											},
											{
												"id": "!response 3",
												"text": "Test Button 3"
											}
										],
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"Buttons Message with Title and Footer": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [
											{
												"id": "!response 1",
												"text": "Test Button 1"
											},
											{
												"id": "!response 2",
												"text": "Test Button 2"
											},
											{
												"id": "!response 3",
												"text": "Test Button 3"
											}
										],
										"footer": "footer",
										"title": "title",
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"Buttons Message with Link and Phone number": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [
											{
												"url": "https://maytapi.com",
												"text": "link button"
											},
											{
												"phoneNumber": "905301234567",
												"text": "Phone number button"
											}
										],
										"footer": "footer",
										"title": "title",
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"Buttons Message with Copy Code": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [{ "code": "discount10", "text": "Copy Code" }],
										"footer": "footer",
										"title": "title",
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"List Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "list",
										"message": "Hello World!",
										"sections": [
											{
												"title": "Section 1",
												"rows": [
													{
														"rowId": "1",
														"title": "Row 1",
														"description": "Hello it's description 1"
													},
													{
														"rowId": "2",
														"title": "Row 2",
														"description": "Hello it's description 2"
													}
												]
											}
										],
										"button_text": "button text",
										"title": "title",
										"footer": "footer"
									}
								},
								"Carousel Message": {
									"description": "Sends a carousel message with interactive cards. Maximum 10 cards per carousel. Each card supports up to 5 buttons. Media is required for each card.",
									"value": {
										"to_number": "905301234567@c.us",
										"type": "carousel",
										"message": "Message Body",
										"title": "title",
										"footer": "footer",
										"cards": [
											{
												"title": "Card 1",
												"body": "Card 1 body",
												"footer": "card 1 footer",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "id": "!response 1", "text": "Quick Reply 1" },
													{ "url": "https://maytapi.com", "text": "Visit Website" },
													{ "phoneNumber": "905301234567", "text": "Call Us" }
												]
											},
											{
												"title": "Card 2",
												"body": "Card 2 body",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "id": "!response 2", "text": "Quick Reply 2" },
													{ "id": "!response 3", "text": "Quick Reply 3" },
													{ "url": "https://example.com", "text": "Example" }
												]
											},
											{
												"title": "Card 3",
												"body": "Card 3 body",
												"footer": "card 3 footer",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "url": "https://maytapi.com", "text": "Learn More" },
													{ "phoneNumber": "905301234567", "text": "Support Line" },
													{ "id": "!response 4", "text": "Quick Reply 4" }
												]
											},
											{
												"title": "Card 4",
												"body": "Card 4 body",
												"footer": "card 4 footer",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "phoneNumber": "905301234567", "text": "Call Now" },
													{ "id": "!response 5", "text": "Quick Reply 5" },
													{ "url": "https://maytapi.com", "text": "Website" }
												]
											},
											{
												"title": "Card 5",
												"body": "Card 5 body",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "id": "!response 4", "text": "Quick Reply 4" },
													{ "url": "https://example.com", "text": "Example" },
													{ "phoneNumber": "905301234567", "text": "Phone" }
												]
											}
										]
									}
								},
								"Text Message (Save to Google Contacts)": {
									"description": "Save the recipient to Google Contacts while sending: when the Google Contacts integration is enabled for the phone, firstname and lastname are used as the contact name (the number is used when they are empty). Not applied to group chats.",
									"value": {
										"to_number": "905301234567@c.us",
										"type": "text",
										"message": "Welcome to Acme Store!",
										"firstname": "John",
										"lastname": "Doe"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the id of the chat and the id of the message. You can use message id to track acknowledgement status.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/sendMessageResponse"
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/sendMessage ": {
			"post": {
				"tags": ["Message Operations"],
				"summary": "Sends interactive messages: buttons (id, url, phoneNumber, code), list, and carousel",
				"operationId": "sendInteractiveMessage",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/sendMessageBody"
							},
							"examples": {
								"Buttons Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [
											{ "id": "!response 1", "text": "Test Button 1" },
											{ "id": "!response 2", "text": "Test Button 2" },
											{ "id": "!response 3", "text": "Test Button 3" }
										],
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"Buttons Message with Title and Footer": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [
											{ "id": "!response 1", "text": "Test Button 1" },
											{ "id": "!response 2", "text": "Test Button 2" },
											{ "id": "!response 3", "text": "Test Button 3" }
										],
										"footer": "footer",
										"title": "title",
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"Buttons Message with Link and Phone number": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [
											{ "url": "https://maytapi.com", "text": "link button" },
											{ "phoneNumber": "905301234567", "text": "Phone number button" }
										],
										"footer": "footer",
										"title": "title",
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"Buttons Message with Copy Code": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "buttons",
										"message": "Message Body",
										"buttons": [{ "code": "discount10", "text": "Copy Code" }],
										"footer": "footer",
										"title": "title",
										"media": "https://cdnydm.com/wh/......"
									}
								},
								"List Message": {
									"value": {
										"to_number": "905301234567@c.us",
										"type": "list",
										"message": "Hello World!",
										"sections": [
											{
												"title": "Section 1",
												"rows": [
													{ "rowId": "1", "title": "Row 1", "description": "Hello it's description 1" },
													{ "rowId": "2", "title": "Row 2", "description": "Hello it's description 2" }
												]
											}
										],
										"button_text": "button text",
										"title": "title",
										"footer": "footer"
									}
								},
								"Carousel Message": {
									"description": "Sends a carousel message with interactive cards. Maximum 10 cards per carousel. Each card supports up to 5 buttons. Media is required for each card.",
									"value": {
										"to_number": "905301234567@c.us",
										"type": "carousel",
										"message": "Message Body",
										"title": "title",
										"footer": "footer",
										"cards": [
											{
												"title": "Card 1",
												"body": "Card 1 body",
												"footer": "card 1 footer",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "id": "!response 1", "text": "Quick Reply 1" },
													{ "url": "https://maytapi.com", "text": "Visit Website" },
													{ "phoneNumber": "905301234567", "text": "Call Us" }
												]
											},
											{
												"title": "Card 2",
												"body": "Card 2 body",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "id": "!response 2", "text": "Quick Reply 2" },
													{ "id": "!response 3", "text": "Quick Reply 3" },
													{ "url": "https://example.com", "text": "Example" }
												]
											},
											{
												"title": "Card 3",
												"body": "Card 3 body",
												"footer": "card 3 footer",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "url": "https://maytapi.com", "text": "Learn More" },
													{ "phoneNumber": "905301234567", "text": "Support Line" },
													{ "id": "!response 4", "text": "Quick Reply 4" }
												]
											},
											{
												"title": "Card 4",
												"body": "Card 4 body",
												"footer": "card 4 footer",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "phoneNumber": "905301234567", "text": "Call Now" },
													{ "id": "!response 5", "text": "Quick Reply 5" },
													{ "url": "https://maytapi.com", "text": "Website" }
												]
											},
											{
												"title": "Card 5",
												"body": "Card 5 body",
												"media": "https://cdnydm.com/wh/......",
												"buttons": [
													{ "id": "!response 4", "text": "Quick Reply 4" },
													{ "url": "https://example.com", "text": "Example" },
													{ "phoneNumber": "905301234567", "text": "Phone" }
												]
											}
										]
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the id of the chat and the id of the message. You can use message id to track acknowledgement status.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/sendMessageResponse"
								}
							}
						}
					}
				}
			}
		},
		"/setWebhook": {
			"post": {
				"tags": ["Favorites", "Account Information Retrieval"],
				"description": "Sets a webhook address for the selected product. Webhook is used for delivering the incoming messages and acknowledge notifications of sent messages to the user. The notification formats that reaches to the webhook are as follows:",
				"summary": "Sets webhook address",
				"requestBody": {
					"description": "Webhook data is indicated.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"webhook": { "$ref": "#/components/schemas/webhook-url" }
								}
							}
						}
					},
					"required": true
				},
				"callbacks": {
					"Events": {
						"Incoming Messages": {
							"post": {
								"description": "All the incoming messages from the active session are delivered here with the format given in the responses part.",
								"requestBody": {
									"required": true,
									"content": {
										"application/json": {
											"schema": {
												"$ref": "#/components/schemas/incomingMessageType"
											}
										}
									}
								},
								"responses": {
									"200": {
										"description": "Your server returns this code if it accepts the callback"
									}
								}
							}
						},
						"Acknowledge Notifications": {
							"post": {
								"description": "All the acknowledge notifications of the sent messages from the active session are delivered here with the format given in the responses part.\n\n| ackCode | ackType | Description |\n|-|---------|------------------------------------------|\n| 1 | delivered | Delivered to whatsapp servers. |\n| 2 | reached | Message reached to user. |\n| 3 | seen | Message seen by user. |\n| 4 | played | Message played by user. (sound messages) |\n| 5 | deleted | Message deleted by user. |",
								"requestBody": {
									"description": "",
									"content": {
										"application/json": {
											"schema": {
												"$ref": "#/components/schemas/webhook-ack-body"
											}
										}
									}
								},
								"responses": {
									"200": {
										"description": "Your server returns this code if it accepts the callback"
									}
								}
							}
						},
						"Status Change Notifications": {
							"post": {
								"description": "All the status change are delivered to your webhook with the format given in the request part.\n\nStatus code meanings:\n- active: Working phone state.\n- qr-screen: On QR code login screen state.\n- idle: When a phone stays at qr-screen for 3 min. it turns to idle state.\n- phone-error: Phone is not connected or battery low like whatsapp warning states.",
								"requestBody": {
									"description": "",
									"content": {
										"application/json": {
											"schema": {
												"$ref": "#/components/schemas/webhook-status-body"
											}
										}
									}
								},
								"responses": {
									"200": {
										"description": "Your server returns this code if it accepts the callback"
									}
								}
							}
						},
						"Live Chat Notifications": {
							"post": {
								"description": "These events only occur when using api and livechat together.",
								"requestBody": {
									"description": "",
									"content": {
										"application/json": {
											"schema": {
												"$ref": "#/components/schemas/webhook-live-body"
											}
										}
									}
								},
								"responses": {
									"200": {
										"description": "Your server returns this code if it accepts the callback"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Returns the updated product settings (`pid`, `webhook`, `ack_delivery`, `phone_limit`).",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/productData"
								}
							}
						}
					}
				}
			}
		},
		"/setAckPreference": {
			"post": {
				"tags": ["Favorites", "Account Information Retrieval"],
				"description": "Sets the option for getting the acknowledge messages from the webhook to true or false.",
				"summary": "Sets acknowledgment preference",
				"requestBody": {
					"description": "Acknowledge messages taking preference is indicated.",
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ackSet"
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the updated product settings (`pid`, `webhook`, `ack_delivery`, `phone_limit`).",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/productData"
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/status": {
			"get": {
				"tags": ["Session Information Getters"],
				"description": "Returns the status of the current session as JSON.",
				"summary": "Gets session status",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "Returns the current session status and the connected number.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Status"
								}
							}
						}
					}
				}
			}
		},
		"/queues": {
			"get": {
				"tags": ["Queue Operations"],
				"description": "Returns information of all the phones registered to the given product with queue information.",
				"summary": "Lists all queues",
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"queues": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/queue-phone"
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/queue": {
			"get": {
				"tags": ["Queue Operations"],
				"description": "Returns the queue info of the phone.",
				"summary": "Gets phone's queue",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "Returns the queue info of the phone.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"stats": {
											"type": "object",
											"properties": {
												"sending": {
													"type": "integer",
													"example": 0
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/purgeQueue": {
			"get": {
				"tags": ["Queue Operations"],
				"description": "Clears phone's send message queue.",
				"summary": "Clears message queue",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "Clears phone's send message queue.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},

		"/{phone_id}/getContacts": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Returns the information of the number you specified in Whatsapp",
				"summary": "Lists all contacts",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "type",
						"schema": { "type": "string", "enum": ["group", "contact"] },
						"required": false,
						"description": "Optional filter.\n- group: only groups (type \"group\"). Recommended for accounts with many contacts.\n- contact: WhatsApp contacts (type \"chat\") followed by groups; the chat list is skipped.\n- omitted: full list (chats, contacts and groups)."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the information of the number you specified in Whatsapp",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": { "type": "string", "example": "05301234567@c.us" },
													"name": {
														"type": "string",
														"example": "Conversation Name"
													},
													"type": { "type": "string", "example": "chat", "enum": ["chat", "group", "broadcast"] },
													"isAddressBook": { "type": "boolean", "example": false },
													"isBusiness": { "type": "boolean", "example": true },
													"username": {
														"type": "string",
														"description": "Only present when the contact has a WhatsApp username.",
														"example": "john_doe"
													},
													"image": {
														"type": "object",
														"properties": { "url": { "type": "string", "example": "http://placehold.it/180" } }
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getContacts/{conversation_id}": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Returns the information of the number you specified in Whatsapp",
				"summary": "Gets specific contact",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Contact or group id to get information about"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the information of the number you specified in Whatsapp",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": { "type": "string", "example": "05301234567@c.us" },
													"name": {
														"type": "string",
														"example": "Conversation Name"
													},
													"type": { "type": "string", "example": "chat", "enum": ["chat", "group", "broadcast"] },
													"isAddressBook": { "type": "boolean", "example": false },
													"isBusiness": { "type": "boolean", "example": true },
													"username": {
														"type": "string",
														"description": "Only present when the contact has a WhatsApp username.",
														"example": "john_doe"
													},
													"image": {
														"type": "object",
														"properties": { "url": { "type": "string", "example": "http://placehold.it/180" } }
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getContacts/lidToPhone/{lid}": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Resolves a @lid identifier to the real phone number. Returns success:false with no data when the contact's number is hidden or cannot be resolved.",
				"summary": "Resolves a LID to phone number",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "lid",
						"schema": {
							"type": "string",
							"example": "123456789012345@lid"
						},
						"required": true,
						"description": "The @lid identifier to resolve. Accepts either the full form (123456789012345@lid) or the bare id (123456789012345)."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below. Returns success:false when the identity cannot be resolved (e.g. the number is not on WhatsApp or the contact hides their phone number).",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"$ref": "#/components/schemas/lidPhoneResolveData"
										}
									}
								},
								"examples": {
									"Resolved": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234567@c.us",
												"name": "John Doe",
												"phone": "905301234567",
												"lid": "123456789012345@lid"
											}
										}
									},
									"Not resolved": {
										"value": {
											"success": false
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getContacts/phoneToLid/{number}": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Resolves a phone number to its @lid identifier. Returns success:false when the number is not on WhatsApp or cannot be resolved.",
				"summary": "Resolves a phone number to LID",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "number",
						"schema": {
							"type": "string",
							"example": "905301234567"
						},
						"required": true,
						"description": "The phone number to resolve, with country code and no special characters."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below. Returns success:false when the identity cannot be resolved (e.g. the number is not on WhatsApp or the contact hides their phone number).",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"$ref": "#/components/schemas/lidPhoneResolveData"
										}
									}
								},
								"examples": {
									"Resolved": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234567@c.us",
												"name": "John Doe",
												"phone": "905301234567",
												"lid": "123456789012345@lid"
											}
										}
									},
									"Not resolved": {
										"value": {
											"success": false
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getContacts/usernameToPhone/{username}": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Resolves a WhatsApp username to its identity. When the phone number is not available, id and lid are the @lid identifier and phone is null. When the username is key-protected and the key is missing or wrong, data contains only username and keyRequired: true.",
				"summary": "Resolves a username to phone number",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "username",
						"schema": {
							"type": "string",
							"example": "john_doe"
						},
						"required": true,
						"description": "The WhatsApp username without @. If the username is key-protected, append the key after a colon (john_doe:1234)."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"$ref": "#/components/schemas/usernameResolveData"
										}
									}
								},
								"examples": {
									"Resolved": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234567@c.us",
												"name": "John Doe",
												"phone": "905301234567",
												"lid": "123456789012345@lid",
												"username": "john_doe",
												"keyRequired": false
											}
										}
									},
									"Number not available": {
										"value": {
											"success": true,
											"data": {
												"id": "123456789012345@lid",
												"name": "John Doe",
												"phone": null,
												"lid": "123456789012345@lid",
												"username": "john_doe",
												"keyRequired": false
											}
										}
									},
									"Key required": {
										"value": {
											"success": true,
											"data": {
												"username": "john_doe",
												"keyRequired": true
											}
										}
									},
									"Not found": {
										"value": {
											"success": false
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getContacts/phoneToUsername/{number}": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Resolves a phone number to its identity including the WhatsApp username. username is null when the user has no username.",
				"summary": "Resolves a phone number to username",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "number",
						"schema": {
							"type": "string",
							"example": "905301234567"
						},
						"required": true,
						"description": "The phone number to resolve, with country code and no special characters."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"$ref": "#/components/schemas/usernameResolveData"
										}
									}
								},
								"examples": {
									"Resolved": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234567@c.us",
												"name": "John Doe",
												"phone": "905301234567",
												"lid": "123456789012345@lid",
												"username": "john_doe"
											}
										}
									},
									"No username": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234568@c.us",
												"name": "Jane Doe",
												"phone": "905301234568",
												"lid": "123456789012346@lid",
												"username": null
											}
										}
									},
									"Not resolved": {
										"value": {
											"success": false
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/checkPhones": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Checks the WhatsApp registration status of provided phone numbers.",
				"summary": "Checks phone numbers",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Numbers required for actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"numbers": {
										"type": "array",
										"items": {
											"type": "string"
										},
										"example": ["905301234567", "9053012345679"]
									}
								},
								"required": ["numbers"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Results returned from the numbers",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"status": { "type": "string" },
													"valid": { "type": "boolean" },
													"id": {
														"type": "object",
														"properties": {
															"server": { "type": "string" },
															"user": { "type": "string" },
															"_serialized": { "type": "string" }
														}
													}
												}
											},
											"example": [
												{
													"status": "valid",
													"valid": true,
													"id": {
														"server": "c.us",
														"user": "905301234567",
														"_serialized": "905301234567@c.us"
													}
												},
												{
													"status": "invalid",
													"valid": false,
													"id": {
														"server": "c.us",
														"user": "9053012345679",
														"_serialized": "9053012345679@c.us"
													}
												}
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/blockContact/{conversation_id}": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Blocks or unblocks the contact associated with the specified conversation_id.",
				"summary": "Blocks, Unblocks a contact",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"required": true,
						"description": "Unique identifier of the conversation to manage block or unblock status."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"action": {
										"type": "string",
										"example": "block || unblock"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getProfileImage": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Returns profile picture of a specified contact or group.",
				"summary": "Get chat image.",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "number",
						"schema": { "type": "string", "example": "905301234567" },
						"description": "Phone number of the contact or group ID whose profile picture you want to retrieve. Should start with country code without any special characters.",
						"required": true
					}
				],
				"responses": {
					"200": {
						"description": "Returns success status and URL of the profile picture.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "string", "example": "https://pps.whatsapp.net/v/...." }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/setProfileImage": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Change your WhatsApp account's profile picture.\n\nYou need to use square images for better view. We suggest 512x512 images.",
				"summary": "Set account profile image",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **image** parameter is required and should contain the URL of the image you want to set as profile picture.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"image": {
										"type": "string",
										"example": "https://yourwebsite.com/picture.png"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/deleteProfileImage": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Delete your WhatsApp account's profile picture.\n\nThis action will remove your current profile picture and revert to the default avatar.",
				"summary": "Delete account profile image",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getProfileName": {
			"get": {
				"tags": ["Contact Operations"],
				"description": "Returns the WhatsApp profile (display) name of the connected number and whether it can be changed.\n\n- **name**: the current profile name.\n- **canChange**: false on WhatsApp Business accounts (the name can only be changed with forceForBusiness), true otherwise.",
				"summary": "Gets account profile name",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the current profile name and whether it can be changed.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"name": {
													"type": "string",
													"example": "My Business"
												},
												"canChange": {
													"type": "boolean",
													"example": false
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"name": "My Business",
												"canChange": false
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/setProfileName": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Changes the WhatsApp profile (display) name of the connected number.\n\n- **name** (string, required): 1-25 characters.\n- **forceForBusiness** (boolean, optional, default false): required to change the name on WhatsApp Business accounts. Can be used at most 2 times per phone in 24 hours.",
				"summary": "Set account profile name",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "- **name** parameter is required and should be between 1 and 25 characters.\n- **forceForBusiness** parameter is optional (default false) and is required to change the name on WhatsApp Business accounts. It can be used at most 2 times per phone within 24 hours.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["name"],
								"properties": {
									"name": {
										"type": "string",
										"example": "New Name",
										"description": "The new profile name (1-25 characters)."
									},
									"forceForBusiness": {
										"type": "boolean",
										"example": false,
										"default": false,
										"description": "Required to change the name on WhatsApp Business accounts. Limited to 2 uses per phone in 24 hours."
									}
								}
							},
							"examples": {
								"Set Name": {
									"value": {
										"name": "New Name",
										"forceForBusiness": false
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns whether the name was changed. When the requested name is already set, changed is false with an explanatory message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"changed": {
													"type": "boolean",
													"example": true
												},
												"forced": {
													"type": "boolean",
													"example": false
												},
												"message": {
													"type": "string",
													"example": "Profile name is already set."
												}
											}
										}
									}
								},
								"examples": {
									"Changed": {
										"value": {
											"success": true,
											"data": {
												"changed": true,
												"forced": false
											}
										}
									},
									"Already set": {
										"value": {
											"success": true,
											"data": {
												"changed": false,
												"forced": false,
												"message": "Profile name is already set."
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getProfileAbout": {
			"get": {
				"tags": ["Contact Operations"],
				"summary": "Get account about text",
				"description": "Returns the \"About\" text of the connected number.\n\n- **timestamp**: unix seconds of the last update.\n- **duration**: lifetime in seconds; **expiresAt** = timestamp + duration.\n- An About set from the phone app is permanent and is returned with duration -1.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"about": {
													"type": "string",
													"example": "Available"
												},
												"timestamp": {
													"type": "integer",
													"example": 1704702074
												},
												"duration": {
													"type": "integer",
													"example": 3600
												},
												"expiresAt": {
													"type": "integer",
													"example": 1704705674
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"about": "Available",
												"timestamp": 1704702074,
												"duration": 3600,
												"expiresAt": 1704705674
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getProfileAbout/{conversation_id}": {
			"get": {
				"tags": ["Contact Operations"],
				"summary": "Get contact about text",
				"description": "Returns the \"About\" text of a contact. about may be an empty string if the contact hides it.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "conversation_id",
						"schema": {
							"type": "string",
							"example": "905301234567@c.us"
						},
						"required": true,
						"description": "Contact id in the form 905xxxxxxxxx@c.us."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"about": {
													"type": "string",
													"example": "Available"
												},
												"timestamp": {
													"type": "integer",
													"example": 1704702074
												},
												"duration": {
													"type": "integer",
													"example": 3600
												},
												"expiresAt": {
													"type": "integer",
													"example": 1704705674
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"about": "Available",
												"timestamp": 1704702074,
												"duration": 3600,
												"expiresAt": 1704705674
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/setProfileAbout": {
			"post": {
				"tags": ["Contact Operations"],
				"summary": "Set account about text",
				"description": "Sets the \"About\" text of the connected number. WhatsApp requires a duration; the text disappears when it expires.\n\n- **about** (string, required): 1-50 characters.\n- **duration** (integer, optional): lifetime in seconds, default 86400 (1 day).",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "- **about** parameter is required (1-50 characters).\n- **duration** parameter is optional, in seconds (default 86400).",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["about"],
								"properties": {
									"about": {
										"type": "string",
										"example": "Available"
									},
									"duration": {
										"type": "integer",
										"example": 3600,
										"default": 86400
									}
								}
							},
							"examples": {
								"Set About": {
									"value": {
										"about": "Available",
										"duration": 3600
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"about": {
													"type": "string",
													"example": "Available"
												},
												"timestamp": {
													"type": "integer",
													"example": 1704702074
												},
												"duration": {
													"type": "integer",
													"example": 3600
												},
												"expiresAt": {
													"type": "integer",
													"example": 1704705674
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"about": "Available",
												"timestamp": 1704702074,
												"duration": 3600,
												"expiresAt": 1704705674
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getBlockContacts": {
			"get": {
				"tags": ["Contact Operations"],
				"summary": "Lists blocked contacts",
				"description": "Returns the blocked contacts of the connected number. name is only present when the contact is saved. Contacts that were never messaged may be returned as LID identities (server \"lid\").",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"name": {
														"type": "string",
														"example": "John Doe"
													},
													"server": {
														"type": "string",
														"example": "c.us"
													},
													"user": {
														"type": "string",
														"example": "905301234567"
													},
													"_serialized": {
														"type": "string",
														"example": "905301234567@c.us"
													}
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": [
												{
													"name": "John Doe",
													"server": "c.us",
													"user": "905301234567",
													"_serialized": "905301234567@c.us"
												},
												{
													"server": "lid",
													"user": "123456789012345",
													"_serialized": "123456789012345@lid"
												}
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getProfileUsername": {
			"get": {
				"tags": ["Contact Operations"],
				"summary": "Get account username",
				"description": "Returns the WhatsApp username of the connected number (the unique @handle, not the display name). state is ACTIVE, RESERVED, or null when no username is set.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"username": {
													"type": "string",
													"example": "mybusiness_01"
												},
												"state": {
													"type": "string",
													"enum": ["ACTIVE", "RESERVED"],
													"nullable": true,
													"example": "RESERVED"
												},
												"pin": {
													"type": "string",
													"nullable": true,
													"example": null
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"username": "mybusiness_01",
												"state": "RESERVED",
												"pin": null
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/setProfileUsername": {
			"post": {
				"tags": ["Contact Operations"],
				"summary": "Set account username",
				"description": "Sets the WhatsApp username of the connected number.\n\n- **username** (string, required): 3-35 characters; letters, digits, underscore and dot; must contain at least one letter. WhatsApp validates availability.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "- **username** parameter is required (3-35 characters; letters, digits, underscore and dot; at least one letter).",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["username"],
								"properties": {
									"username": {
										"type": "string",
										"example": "mybusiness_01"
									}
								}
							},
							"examples": {
								"Set Username": {
									"value": {
										"username": "mybusiness_01"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"username": {
													"type": "string",
													"example": "mybusiness_01"
												},
												"state": {
													"type": "string",
													"enum": ["ACTIVE", "RESERVED"],
													"nullable": true,
													"example": "RESERVED"
												},
												"pin": {
													"type": "string",
													"nullable": true,
													"example": null
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"username": "mybusiness_01",
												"state": "RESERVED",
												"pin": null
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/contact/add": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Add a new contact to your WhatsApp addressbook. This will save the contact with the provided first name and last name.\n\n**Important:** Before using this endpoint, you must enable contact management in WhatsApp. On your phone, go to WhatsApp > Settings > Privacy > Contacts and turn on 'Manage contacts from web'.",
				"summary": "Adds a contact",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"required": true,
					"description": "- **number** parameter is required and should contain the phone number.\n- **firstName** parameter is optional and contains the contact's first name.\n- **lastName** parameter is optional and contains the contact's last name.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["number"],
								"properties": {
									"number": {
										"type": "string",
										"example": "905301234567"
									},
									"firstName": {
										"type": "string",
										"example": "John"
									},
									"lastName": {
										"type": "string",
										"example": "Doe"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/contact/edit": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Edit an existing contact in your WhatsApp addressbook. This will update the contact's first name and last name.\n\n**Important:** Before using this endpoint, you must enable contact management in WhatsApp. On your phone, go to WhatsApp > Settings > Privacy > Contacts and turn on 'Manage contacts from web'.",
				"summary": "Edits a contact",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"required": true,
					"description": "- **number** parameter is required and should contain the phone number.\n- **firstName** parameter is optional and contains the contact's first name.\n- **lastName** parameter is optional and contains the contact's last name.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["number"],
								"properties": {
									"number": {
										"type": "string",
										"example": "905301234567"
									},
									"firstName": {
										"type": "string",
										"example": "John"
									},
									"lastName": {
										"type": "string",
										"example": "Doe"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/contact/remove": {
			"post": {
				"tags": ["Contact Operations"],
				"description": "Remove a contact from your WhatsApp addressbook. This will delete the contact permanently.\n\n**Important:** Before using this endpoint, you must enable contact management in WhatsApp. On your phone, go to WhatsApp > Settings > Privacy > Contacts and turn on 'Manage contacts from web'.",
				"summary": "Removes a contact",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"required": true,
					"description": "- **number** parameter is required and should contain the phone number.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["number"],
								"properties": {
									"number": {
										"type": "string",
										"example": "905301234567"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/redeploy": {
			"get": {
				"tags": ["Session Controlling Operations"],
				"description": "Redeploys docker instance of your phone. If your phone having any unexpected problems you can use this endpoint to reboot the instance.",
				"summary": "Redeploys phone instance",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"message": {
											"type": "string",
											"example": "Phone 12 is restarted."
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/factoryreset": {
			"get": {
				"tags": ["Session Controlling Operations"],
				"description": "Factory resets everything about phone instance to a new created instance state. This is a replacement for delete/create a new phone. \n\nYour phone instances can't be deleted anymore. This is implemented beacuse some of our customers were loosing their phone instance when their subscription(or trial) suspended. With the new system your phones would only set to disabled state and after you fix your subscription you can re-enable your phones either making a request(/screen etc.) to instance or from our control panel.",
				"summary": "Resets phone instance",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/justSuccess"
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/logout": {
			"get": {
				"tags": ["Session Information Getters"],
				"description": "Logouts the number from the current session and converts the screen to the QR code screen (status qr-screen).",
				"summary": "Logs out user",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/justSuccess"
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/config": {
			"get": {
				"tags": ["Session Controlling Operations"],
				"description": "Get phone specifig config for webhook and ack_delivery. If empty product webhook config would be used for delivery.",
				"summary": "Gets phone config",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/phone_config"
								}
							}
						}
					}
				}
			},
			"post": {
				"tags": ["Session Controlling Operations"],
				"description": "Set phone specifig config for webhook and ack_delivery. If empty product webhook config would be used for delivery.\n\nWith this api you can define webhook for individual phones.",
				"summary": "Set phone config",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "With this api you can define webhook for individual phones.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"webhook": { "$ref": "#/components/schemas/webhook-url" },
									"ack_delivery": {
										"type": "boolean",
										"default": false
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/phone_config"
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/connectWithPhoneNumber": {
			"post": {
				"tags": ["Session Information Getters"],
				"description": "Connect with the phone number for your phone with the post operation",
				"summary": "Connects with phone number",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "Get your code to connect to your physical phone Link with phone number instead",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"number": { "type": "string", "example": "905301234567" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"default": true
										},
										"connectionResult": {
											"type": "string",
											"example": "A5GD36H"
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/qrCode": {
			"get": {
				"tags": ["Session Information Getters"],
				"description": "Returns the qrCode in the current session if there is one.",
				"summary": "Gets QR code",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "Returns the QR code as a PNG image. If there is no QR code, returns JSON with `success: false` and a message.",
						"content": {
							"image/png": { "schema": { "type": "string", "format": "binary" } },
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": false },
										"message": { "type": "string", "example": "QR code is not available." }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getNewChatLimit": {
			"get": {
				"tags": ["Session Information Getters"],
				"summary": "Get new chat limit",
				"description": "Returns the new-chat limit (first message to a new contact) that WhatsApp applies to the connected number. This limit is currently in testing by WhatsApp and for now only appears on new WhatsApp accounts.\n\n- **limited** false means WhatsApp applies no quota to this number (limit and remaining are null).\n- When limited, limit/used/remaining are integers and capped becomes true once the quota is exhausted; cycleStart/cycleEnd are unix seconds.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"limited": {
													"type": "boolean",
													"example": false
												},
												"status": {
													"type": "string",
													"example": "none"
												},
												"capped": {
													"type": "boolean",
													"example": false
												},
												"limit": {
													"type": "integer",
													"nullable": true,
													"example": null
												},
												"used": {
													"type": "integer",
													"example": 0
												},
												"remaining": {
													"type": "integer",
													"nullable": true,
													"example": null
												},
												"cycleStart": {
													"type": "integer",
													"example": 1704067200
												},
												"cycleEnd": {
													"type": "integer",
													"example": 1706745599
												},
												"timestamp": {
													"type": "integer",
													"example": 1704702074
												},
												"oteStatus": {
													"type": "string",
													"example": "not_eligible"
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"limited": false,
												"status": "none",
												"capped": false,
												"limit": null,
												"used": 0,
												"remaining": null,
												"cycleStart": 1704067200,
												"cycleEnd": 1706745599,
												"timestamp": 1704702074,
												"oteStatus": "not_eligible"
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getMessage/{msgId}": {
			"get": {
				"tags": ["Message Operations"],
				"description": "Provides information about a specific message.",
				"summary": "Retrieves specific message",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "msgId",
						"schema": { "type": "string", "example": "3EB065B353B9493D00C9" },
						"required": true,
						"description": "Unique identifier of the message, obtained from sendMessage response or webhook receive."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/messageResponse" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getMessages/{conversation_id}": {
			"get": {
				"tags": ["Message Operations"],
				"description": "Retrieves chat messages",
				"summary": "Retrieves chat messages",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "example": 0 },
						"description": "Paging for messages within conversations."
					},
					{
						"in": "query",
						"name": "count",
						"schema": { "type": "integer", "example": 20 },
						"description": "Specifies the number of most recent messages to retrieve from the conversation."
					},
					{
						"in": "query",
						"name": "author",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"description": "Only return messages sent by this group participant (e.g. 905301234567@c.us)."
					},
					{
						"in": "query",
						"name": "fromMe",
						"schema": { "type": "boolean", "example": true },
						"description": "Receive your own conversations in Conversation."
					},
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Load conversations info."
					},
					{
						"in": "query",
						"name": "fromCache",
						"schema": { "type": "boolean", "example": true, "default": false },
						"required": false,
						"description": "When true, messages of the conversation that were already prepared by a previous request are returned from a short-lived cache instead of being processed again. This makes repeated requests for the same conversation faster, especially when a large count is requested or when the same conversation is polled frequently. When omitted or false, the endpoint behaves exactly as before."
					},
					{
						"in": "query",
						"name": "fresh",
						"schema": { "type": "boolean", "example": true, "default": false },
						"required": false,
						"description": "When true, ignores the cache for this request, returns freshly processed messages and refreshes the cached copies. If both fromCache=true and fresh=true are sent, fresh wins."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/getConversationsData" },
										"page": { "type": "integer", "example": 0 },
										"count": { "type": "integer", "example": 20 }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getConversations": {
			"get": {
				"tags": ["Chat Operations"],
				"description": "Lists all conversations.\n\nEach conversation also includes its chat state: favorite, pinned, archived, muted (muteUntil) and the disappearing messages timer.",
				"summary": "Lists all chats",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{ "in": "query", "name": "page", "schema": { "type": "integer", "example": 0 }, "description": "Paging for conversations." },
					{
						"in": "query",
						"name": "days",
						"schema": { "type": "integer", "example": 14 },
						"description": "Optional. Returns only conversations whose last message falls within the last N days. For example, days=1 returns the last 1 day and days=14 the last 14 days. If omitted, all conversations are returned."
					},
					{
						"in": "query",
						"name": "limit",
						"schema": { "type": "integer", "example": 100, "default": 650 },
						"required": false,
						"description": "Number of conversations per page. Default 650."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/getConversationsAll" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getConversations/{conversation_id}": {
			"get": {
				"tags": ["Chat Operations"],
				"description": "You can find out who the conversation is between, your messages, and your phone.\n\nEach conversation also includes its chat state: favorite, pinned, archived, muted (muteUntil) and the disappearing messages timer.",
				"summary": "Gets specific chat",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "example": 0 },
						"description": "Paging for messages within conversations."
					},
					{
						"in": "query",
						"name": "count",
						"schema": { "type": "integer", "example": 20 },
						"description": "Specifies the number of most recent messages to retrieve from the conversation."
					},
					{
						"in": "query",
						"name": "author",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"description": "Only return messages sent by this group participant (e.g. 905301234567@c.us)."
					},
					{
						"in": "query",
						"name": "fromMe",
						"schema": { "type": "boolean", "example": true },
						"description": "Receive your own conversations in Conversation."
					},
					{
						"in": "query",
						"name": "fromCache",
						"schema": { "type": "boolean", "example": true, "default": false },
						"required": false,
						"description": "When true, messages of the conversation that were already prepared by a previous request are returned from a short-lived cache instead of being processed again. This makes repeated requests for the same conversation faster, especially when a large count is requested or when the same conversation is polled frequently. When omitted or false, the endpoint behaves exactly as before."
					},
					{
						"in": "query",
						"name": "fresh",
						"schema": { "type": "boolean", "example": true, "default": false },
						"required": false,
						"description": "When true, ignores the cache for this request, returns freshly processed messages and refreshes the cached copies. If both fromCache=true and fresh=true are sent, fresh wins."
					},
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Load conversations info."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/getConversationsData" },
										"page": { "type": "integer", "example": 0 },
										"count": { "type": "integer", "example": 20 }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/favoriteConversations/{conversation_id}": {
			"post": {
				"tags": ["Chat Operations"],
				"description": "Manage favorite status for a specific conversation.",
				"summary": "Favorites a chat",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Unique identifier of the conversation to manage favorite status."
					}
				],
				"requestBody": {
					"required": true,
					"description": "- **action** parameter is required and should be either 'add' to mark conversation as favorite or 'remove' to remove from favorites.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"action": {
										"type": "string",
										"example": "add",
										"enum": ["add", "remove"]
									}
								},
								"required": ["action"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/pinConversations/{conversation_id}": {
			"post": {
				"tags": ["Chat Operations"],
				"description": "Pin or unpin a specific conversation.",
				"summary": "Pins a chat",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Unique identifier of the conversation to pin or unpin."
					}
				],
				"requestBody": {
					"required": true,
					"description": "- **action** parameter is required and should be either 'pin' to pin the conversation to top or 'unpin' to remove from pinned conversations.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"action": {
										"type": "string",
										"example": "pin || unpin"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/archiveConversations/{conversation_id}": {
			"post": {
				"tags": ["Chat Operations"],
				"description": "Archive or unarchive a specific conversation.",
				"summary": "Archives a chat",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Unique identifier of the conversation to archive or unarchive."
					}
				],
				"requestBody": {
					"required": true,
					"description": "- **action** parameter is required and should be either 'add' to move conversation to archive or 'remove' to unarchive the conversation.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"action": {
										"type": "string",
										"example": "add",
										"enum": ["add", "remove"]
									}
								},
								"required": ["action"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/muteConversations/{conversation_id}": {
			"post": {
				"tags": ["Chat Operations"],
				"description": "Mute or unmute a specific conversation.",
				"summary": "Mutes a chat",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Unique identifier of the conversation to mute or unmute."
					}
				],
				"requestBody": {
					"required": true,
					"description": "- **action** parameter is required and should be 'mute' to mute the conversation or 'unmute' to unmute.\n- **duration** parameter is required when action is 'mute'. Accepted values (integer, seconds): 28800 = 8 hours, 604800 = 1 week, 0 = forever.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"action": {
										"type": "string",
										"example": "mute",
										"enum": ["mute", "unmute"]
									},
									"duration": {
										"type": "integer",
										"enum": [28800, 604800, 0],
										"example": 604800,
										"description": "Required when muting: 28800 = 8 hours, 604800 = 1 week, 0 = forever"
									}
								},
								"required": ["action"]
							},
							"examples": {
								"Mute 8 hours": {
									"value": {
										"action": "mute",
										"duration": 28800
									}
								},
								"Mute 1 week": {
									"value": {
										"action": "mute",
										"duration": 604800
									}
								},
								"Mute forever": {
									"value": {
										"action": "mute",
										"duration": 0
									}
								},
								"Unmute": {
									"value": {
										"action": "unmute"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "boolean",
											"example": true
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/clearConversations/{conversation_id}": {
			"post": {
				"tags": ["Chat Operations"],
				"description": "Clear all messages from a specific conversation while keeping the conversation itself.",
				"summary": "Clears a chat",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Unique identifier of the conversation to clear messages from."
					}
				],

				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/disappearingConversations/{conversation_id}": {
			"post": {
				"tags": ["Chat Operations"],
				"description": "Sets the disappearing (ephemeral) messages timer for a one-to-one or group conversation (admin rights are required in groups). New messages in the chat are automatically deleted after the selected duration.\n\nThis endpoint can also be used for groups; the **disappear** option in the group config endpoints only turns it on or off (true = 7 days).",
				"summary": "Sets disappearing messages timer",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"required": true,
						"description": "Unique identifier of the conversation to set the disappearing messages timer for."
					}
				],
				"requestBody": {
					"required": true,
					"description": "- **ephemeral** parameter is required and must be one of the following values (in seconds):\n  - `0` - Off (disappearing messages disabled)\n  - `86400` - 24 hours\n  - `604800` - 7 days\n  - `7776000` - 90 days",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["ephemeral"],
								"properties": {
									"ephemeral": {
										"type": "integer",
										"enum": [0, 86400, 604800, 7776000],
										"example": 604800
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"cid": { "type": "string", "example": "905301234567@c.us" },
												"ephemeral": { "type": "integer", "example": 604800 }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/createGroup": {
			"post": {
				"tags": ["Favorites", "Group Chat Operations"],
				"description": "Create a new WhatsApp group. Direct member addition will be attempted first for each number. If direct addition fails (e.g., due to privacy settings), an invitation message will be sent to those members. The creator of the group automatically becomes an admin.",
				"summary": "Creates a group",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **name** parameter is required and should contain the title of the group you want to create.\n- **numbers** parameter is required and should be an array of phone numbers to be added to the group. Each number should start with the country code without any special characters.\n- **sendInvite** parameter is optional. It's a boolean value to determine whether to send invitations to numbers that could not be added directly. Default is false; invitations are only sent when it is true.\n- **message** parameter is optional. When sendInvite is true, this message will be included in the group invitation sent to members.\n- **image** parameter is optional. It should contain a URL for the group profile picture.\n- **config** parameter is optional. It contains group settings with properties: edit (who can edit group info), send (who can send messages), membersCanAddMembers (if members can add new participants), and approveNewMembers (if new members need admin approval).\n- **force** parameter is optional. When set to true, invalid numbers are skipped; otherwise one invalid number stops the group creation.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": { "type": "string", "example": "Group Title" },
									"numbers": { "type": "string", "example": ["905301234567", "905301234568"] },
									"sendInvite": { "type": "boolean", "example": true },
									"message": { "type": "string", "example": "Hey everyone! Thanks for joining the group." },
									"image": { "type": "string", "example": "https://cdnydm.com/wh/......" },
									"config": {
										"type": "object",
										"properties": {
											"edit": { "type": "string", "example": "admins" },
											"send": { "type": "string", "example": "admins" },
											"disappear": { "type": "boolean", "example": false },
											"membersCanAddMembers": { "type": "boolean", "example": false },
											"approveNewMembers": { "type": "boolean", "example": false }
										}
									},
									"force": { "type": "boolean", "example": true, "description": "Skip invalid numbers instead of failing (optional)" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns success status and detailed information about the newly created group, including group ID, name, participants, and configuration.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"allOf": [
												{ "$ref": "#/components/schemas/groupData" },
												{
													"type": "object",
													"properties": {
														"cannotAdd": {
															"type": "object",
															"description": "Only present when some numbers could not be added directly",
															"properties": {
																"message": { "type": "string", "example": "Some participants could not be added." },
																"cannotAdded": {
																	"type": "array",
																	"items": { "type": "string" },
																	"example": ["905301234568@c.us"]
																},
																"sendInvite": { "type": "boolean", "example": true }
															}
														},
														"inviteLink": {
															"type": "string",
															"description": "Group invite link, present when some numbers could not be added directly",
															"example": "https://chat.whatsapp.com/b8x9291cC9uyDQxdduDpbf"
														}
													}
												}
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getGroups": {
			"get": {
				"tags": ["Favorites", "Group Chat Operations"],
				"description": "Get conversations list.\n\n- communityId: the community the group belongs to (same as the id in getCommunities).\n- isCommunityAnnounce: true for the community's announcement group.\n- Communities themselves are not listed here; use getCommunities.",
				"summary": "Lists all groups",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "full",
						"schema": {
							"type": "boolean",
							"example": true
						},
						"required": false,
						"description": "Load participants for old conversations. (Max response limit:100)"
					},
					{
						"in": "query",
						"name": "sort",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Sort groups by creation time, oldest first. Without it, the newest groups come first."
					},
					{
						"in": "query",
						"name": "invite",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Include invite links for groups (admin only; `false` for groups you don't admin). (Max response limit:50)"
					},
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "example": 2, "default": 1 },
						"required": false,
						"description": "Paging for groups. We suggest to use with **sort** option."
					},
					{
						"in": "query",
						"name": "refresh",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Refreshes group info from WhatsApp for groups on the page whose participant list is incomplete (participants returned as @lid without a phone number), so they are returned as @c.us where available. One group query per such group; use it when you see @lid participants, not on every call. Participants who hide their phone number stay as @lid."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the groups on the requested page with paging information.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"count": { "type": "integer", "example": 25 },
										"total": { "type": "integer", "example": 75 },
										"limit": { "type": "integer", "example": 50 },
										"page": { "type": "integer", "example": 2 },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/groupData" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getGroups/{conversation_id}": {
			"get": {
				"tags": ["Group Chat Operations"],
				"description": "Get a conversation info.",
				"summary": "Gets specific group",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574073754@g.us" },
						"required": true,
						"description": "Load conversations info."
					},
					{
						"in": "query",
						"name": "invite",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Generate invite link for group."
					},
					{
						"in": "query",
						"name": "refresh",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Refreshes the group info (participants, admins, subject) from WhatsApp before returning it. Participants returned as @lid without a phone number are resolved to @c.us where available. Costs one group query; use it when the data looks stale, not on every call. Participants who hide their phone number stay as @lid."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the group information.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "$ref": "#/components/schemas/groupData" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/setProfileImage": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Change the profile picture of a group conversation.\n\nYou need to use square images for better view. We suggest 512x512 images.",
				"summary": "Sets group image",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the group ID.\n- **image** parameter is required and should contain the URL of the image you want to set as group picture.\n- Image should be in square format, preferably 512x512 pixels.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"image": {
										"type": "string",
										"example": "https://yourwebsite.com/picture.png"
									}
								},
								"required": ["conversation_id", "image"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/deleteProfileImage": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Delete the profile picture of a group conversation.\n\nThis action will remove the group's current profile picture and revert to the default group avatar.",
				"summary": "Delete group image",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the group ID.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/config": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Change config of a group conversation.\n\nTo learn conversation_id you can use /getGroups endpoint.\n\nYou can change who can edit group info(edit), can send message(send) and disappearing messages enabled(disappear).\n\nFor edit and send config you can use values \"admins\" or \"all\".\n\nDisappear only accepts true/false values.\n\nConfig values are optional. If you want to only change a config you should only use that config's key in request body.",
				"summary": "Configures group settings",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Group conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"config": {
										"type": "object",
										"properties": {
											"edit": { "type": "string", "enum": ["admins", "all"], "example": "all" },
											"send": { "type": "string", "enum": ["admins", "all"], "example": "all" },
											"disappear": {
												"type": "boolean",
												"description": "true turns on disappearing messages with a 7-day timer, false turns them off"
											},
											"membersCanAddMembers": { "type": "boolean", "description": "Must be true or false" },
											"approveNewMembers": { "type": "boolean", "description": "Must be true or false" },
											"name": { "type": "string", "example": "new name" },
											"description": { "type": "string", "example": "new description" }
										}
									}
								},
								"required": ["conversation_id", "config"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"type": "object",
											"properties": {
												"edit": { "type": "string", "enum": ["admins", "all"], "example": "all" },
												"send": { "type": "string", "enum": ["admins", "all"], "example": "all" },
												"disappear": { "type": "boolean" },
												"membersCanAddMembers": { "type": "boolean" },
												"approveNewMembers": { "type": "boolean" },
												"name": { "type": "string", "example": "new name" },
												"description": { "type": "string", "example": "new description" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/add": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Add participants to a group conversation.\n\nTo learn conversation_id you can use /getGroups endpoint.",
				"summary": "Adds group participants",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the ID of the group you want to add members to. You can get group IDs using the /getGroups endpoint.\n- **numbers** parameter is required and can accept either a single phone number as string or an array of phone numbers. All numbers should start with the country code without any special characters. Examples:\n  - Single number: \"905301234567@c.us\"\n  - Multiple numbers: [\"905301234567@c.us\", \"905301234568@c.us\"].\n- **sendInvite** parameter is optional. It's a boolean value to determine whether to send invitations to numbers that could not be added directly. Default is false; invitations are only sent when it is true.\n- **message** parameter is optional. When sendInvite is true, this message will be included in the group invitation sent to members.\n- **force** parameter is optional. When set to true, the operation will skip invalid numbers during bulk addition and continue adding valid participants",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"numbers": { "type": "string", "example": ["905301234567", "905301234568"] },
									"sendInvite": { "type": "boolean", "example": true },
									"message": { "type": "string", "example": "Hey everyone! Thanks for joining the group." },
									"force": { "type": "boolean", "example": true }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"description": "`true` when every number was added; an object when some numbers could not be added directly",
											"oneOf": [
												{ "type": "boolean", "example": true },
												{
													"type": "object",
													"properties": {
														"participants": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"userWid": { "type": "string", "example": "905301234568@c.us" },
																	"code": { "type": "string", "example": "403" },
																	"invite_code": { "type": "string" },
																	"invite_code_exp": { "type": "string" }
																}
															}
														},
														"cannotAdd": {
															"type": "object",
															"description": "Only present when some numbers could not be added directly",
															"properties": {
																"message": { "type": "string", "example": "Some participants could not be added." },
																"cannotAdded": {
																	"type": "array",
																	"items": { "type": "string" },
																	"example": ["905301234568@c.us"]
																},
																"sendInvite": { "type": "boolean", "example": true }
															}
														},
														"inviteLink": {
															"type": "string",
															"description": "Group invite link, present when some numbers could not be added directly",
															"example": "https://chat.whatsapp.com/b8x9291cC9uyDQxdduDpbf"
														}
													}
												}
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/remove": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Remove a participant from a group conversation.\n\nTo learn conversation_id you can use /getGroups endpoint.",
				"summary": "Removes group participant",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Group conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"number": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/promote": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Promote a participant in a group conversation.\n\nTo learn conversation_id you can use /getGroups endpoint.",
				"summary": "Promotes group admin",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Group conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"number": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/demote": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Demote a participant in a group conversation.\n\nTo learn conversation_id you can use /getGroups endpoint.",
				"summary": "Demotes group admin",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Group conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"number": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/acceptInvite": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Accept an invitation to join a group conversation. To get the inviteCode, you need to receive it from the group admin or another member.",
				"summary": "Accepts group invite",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **inviteCode** parameter is required and should contain the invite code received from group admin or member.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"inviteCode": {
										"type": "string",
										"example": "b8x9291cC9uyDQxdduDpbf"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "string", "example": "905301234567-1574072436@g.us" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/acceptInviteV4": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Accept an invitation to join a group conversation. To get the invitation details, you need to receive them from the group admin or another member. The required invitation information (inviteCode, inviteGrp, inviteCodeExp, from) will be received through the webhook when an invitation is sent.",
				"summary": "Accepts group invite (V4)",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Required parameters for accepting group invitation (received from webhook):",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["inviteCode", "inviteGrp", "inviteCodeExp", "from"],
								"properties": {
									"inviteCode": {
										"type": "string",
										"default": "b8x9291cC9uyDQxdduDpbf",
										"description": "Invitation code for the group"
									},
									"inviteGrp": {
										"type": "string",
										"default": "905301234567-1574073754@g.us",
										"description": "Group identifier for the invitation"
									},
									"inviteCodeExp": {
										"type": "string",
										"default": "1728910206",
										"description": "Expiration timestamp for the invite code"
									},
									"from": {
										"type": "string",
										"default": "905301234567",
										"description": "Identifier of the user who sent the invitation"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean"
										},
										"data": {
											"type": "string",
											"example": "905301234567-1574073754@g.us"
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/revokeInvite": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Revoke and regenerate the invite link for a group. You can get the group information from the /getGroups endpoint to use this function.",
				"summary": "Revokes group invite",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the group ID for which you want to revoke and regenerate the invite link. You can get group IDs using the /getGroups endpoint.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"type": "object",
											"properties": {
												"inviteCode": { "type": "string", "example": "b8x9291cC9uyDQxdduDpbf" },
												"inviteLink": { "type": "string", "example": "https://chat.whatsapp.com/b8x9291cC9uyDQxdduDpbf" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/approvalRequestList/{conversation_id}": {
			"get": {
				"tags": ["Group Chat Operations"],
				"description": "Get the list of pending join requests for a group. This endpoint retrieves all users waiting for approval to join the group.",
				"summary": "Lists join requests",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567-1574072436@g.us" },
						"required": true,
						"description": "Unique identifier of the conversation for which to retrieve the approval request list."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the pending join requests of the group.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"timestamp": { "type": "integer", "example": 1728910206 },
													"userInfo": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"example": "905301234567@c.us"
															},
															"name": { "type": "string", "example": "905301234567" },
															"phone": { "type": "string", "example": "905301234567" }
														}
													},
													"requsetMethod": { "type": "string", "example": "NonAdminAdd" }
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/approvalRequest/Approve": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Approve requests you receive from /approvalRequestList.",
				"summary": "Approves join requests",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the ID of the group.\n- **numbers** parameter is required and should be an array of phone numbers to approve. These numbers should be obtained from /group/approvalRequestList/{conversation_id} endpoint. Each number should start with the country code without any special characters.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"numbers": { "type": "array", "items": { "type": "string", "example": "905301234567" } }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"type": "array",
											"items": {
												"properties": {
													"id": {
														"type": "object",
														"properties": {
															"server": { "type": "string", "example": "@c.us" },
															"user": { "type": "string", "example": "905301234567" },
															"_serialized": { "type": "string", "example": "905301234567@c.us" }
														}
													},
													"error": { "type": "string", "description": "Only present when this request could not be processed" }
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/approvalRequest/Reject": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "Reject requests you receive from /approvalRequestList.",
				"summary": "Rejects join requests",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the ID of the group.\n- **numbers** parameter is required and should be an array of phone numbers to reject. These numbers should be obtained from /group/approvalRequestList/{conversation_id} endpoint. Each number should start with the country code without any special characters.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									},
									"numbers": { "type": "array", "items": { "type": "string", "example": "905301234567" } }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"type": "array",
											"items": {
												"properties": {
													"id": {
														"type": "object",
														"properties": {
															"server": { "type": "string", "example": "@c.us" },
															"user": { "type": "string", "example": "905301234567" },
															"_serialized": { "type": "string", "example": "905301234567@c.us" }
														}
													},
													"error": { "type": "string", "description": "Only present when this request could not be processed" }
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/group/getGroupInfoByInviteCode/{inviteCode}": {
			"get": {
				"tags": ["Group Chat Operations"],
				"description": "Get group information using an invite code received from a webhook.",
				"summary": "Gets group info",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "inviteCode",
						"schema": { "type": "string", "example": "b8x9291cC9uyDQxdduDpbf" },
						"required": true,
						"description": "Unique code used to retrieve information about a specific group."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the information of the group the invite code belongs to.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"id": { "type": "string", "example": "905301234567-1574073754@g.us" },
												"name": { "type": "string", "example": "Group Title" },
												"participants": { "type": "array", "items": { "type": "string" }, "example": ["905301234567@c.us"] },
												"admins": { "type": "array", "items": { "type": "string" }, "example": ["905301234567@c.us"] },
												"config": {
													"type": "object",
													"properties": {
														"edit": { "type": "string", "enum": ["admins", "all"], "example": "admins" },
														"send": { "type": "string", "enum": ["admins", "all"], "example": "all" },
														"disappear": { "type": "boolean", "example": false },
														"membersCanAddMembers": { "type": "boolean", "example": true },
														"approveNewMembers": { "type": "boolean", "example": true }
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/leaveGroup": {
			"post": {
				"tags": ["Group Chat Operations"],
				"description": "You can leave the group you want with the help of this endpoint.",
				"summary": "Leaves the group",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Group conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "905301234567-1574072436@g.us"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/createChannel": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Channel creation feature.",
				"summary": "Creates a channel",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can use these inputs to create channel. Description and image is not required",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": { "type": "string", "example": "Channel Title" },
									"description": { "type": "string", "example": "Channel Description" },
									"image": { "type": "string", "example": "https://yourwebsite.com/picture.png" }
								},
								"required": ["name"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Return the information of the new channel created.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "$ref": "#/components/schemas/createChannel" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getChannels": {
			"get": {
				"tags": ["Channel Chat Operations"],
				"description": "Get all channels list",
				"summary": "Lists all channels",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "invite",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Generate invite link for channel."
					}
				],
				"responses": {
					"200": {
						"description": "Get all channels list",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/channelData" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getChannels/{conversation_id}": {
			"get": {
				"tags": ["Channel Chat Operations"],
				"description": "Get a channel info",
				"summary": "Gets specific channel",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": {
							"type": "string",
							"example": "120363169975121665@newsletter"
						},
						"required": true,
						"description": "The unique identifier of the channel to retrieve."
					},
					{
						"in": "query",
						"name": "invite",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Generate invite link for group."
					}
				],
				"responses": {
					"200": {
						"description": "Get a channel info",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/channelData" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/deleteChannel": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Channel delete feature.",
				"summary": "Deletes a channel",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can delete channels you own",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": { "type": "string", "example": "120363204759413821@newsletter" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Return the status of Channel Delete operation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/config": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "You can change your channel name, description and image.",
				"summary": "Configures channel settings",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can change your channel name, description and image.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": { "type": "string", "example": "120363204759413821@newsletter" },
									"name": { "type": "string", "example": "Channel Name" },
									"description": { "type": "string", "example": "Channel Description" },
									"image": { "type": "string", "example": "http://placehold.it/360" }
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Returns the result of the update.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/inviteCode": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Channel invite code feature.",
				"summary": "Generates invite code",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can get the invite code of any channel you want.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": { "type": "string", "example": "120363204759413821@newsletter" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the invite link of the channel.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "string", "example": "https://whatsapp.com/channel/0029VaFF3v04inomA6kM6M0z" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/searchByCountry/{countryCode}": {
			"get": {
				"tags": ["Channel Chat Operations"],
				"description": "Retrieves channels based on the specified country code.",
				"summary": "Searches channels by country",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "countryCode",
						"schema": {
							"type": "string",
							"example": "US"
						},
						"required": true,
						"description": "The two-letter ISO country code to filter channels."
					},
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "example": 2, "default": 1 },
						"required": false,
						"description": "Paging for channels."
					}
				],
				"responses": {
					"200": {
						"description": "Successfully retrieved channels for the specified country code",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"limit": {
											"type": "integer",
											"example": 50
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"example": "120363169975121665@newsletter"
													},
													"channelName": {
														"type": "string",
														"example": "Netflix"
													},
													"subscribeCount": {
														"type": "string",
														"example": "33752041"
													},
													"image": {
														"type": "string",
														"example": "https://pps.whatsapp.net/v/...."
													}
												}
											}
										}
									}
								},
								"example": {
									"success": true,
									"limit": 50,
									"data": [
										{
											"id": "120363169975121665@newsletter",
											"channelName": "Netflix",
											"subscribeCount": "33752041",
											"image": "https://pps.whatsapp.net/v/...."
										},
										{
											"id": "120363198234569126@newsletter",
											"channelName": "Shakira ",
											"subscribeCount": "16093272",
											"image": "https://pps.whatsapp.net/v/...."
										},
										{
											"id": "120363151921302028@newsletter",
											"channelName": "Mark Zuckerberg",
											"subscribeCount": "15471487",
											"image": "https://pps.whatsapp.net/v/...."
										}
									]
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/search": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Retrieves channels based on the specified search text.",
				"summary": "Searches channels by text",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can get the invite code of any channel you want.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"text": { "type": "string", "example": "fashion" },
									"page": { "type": "integer", "example": 1 }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Successfully retrieved channels for the specified country code",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"limit": {
											"type": "integer",
											"example": 50
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"example": "120363169975121666@newsletter"
													},
													"channelName": {
														"type": "string",
														"example": "Fashion"
													},
													"subscribeCount": {
														"type": "string",
														"example": "33752041"
													},
													"image": {
														"type": "string",
														"example": "https://pps.whatsapp.net/v/...."
													}
												}
											}
										}
									}
								},
								"example": {
									"success": true,
									"limit": 50,
									"data": [
										{
											"id": "120363169975121665@newsletter",
											"channelName": "Fashion",
											"subscribeCount": "33752041",
											"image": "https://pps.whatsapp.net/v/...."
										}
									]
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/getMessages/{conversation_id}": {
			"get": {
				"tags": ["Channel Chat Operations"],
				"description": "Retrieves messages from a specified newsletter channel conversation.",
				"summary": "Gets specific channel",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": {
							"type": "string",
							"example": "120363169975121665@newsletter"
						},
						"required": true,
						"description": "The unique identifier of the newsletter conversation."
					},
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "example": 0 },
						"description": "Paging for messages within conversations."
					},
					{
						"in": "query",
						"name": "count",
						"schema": { "type": "integer", "example": 20 },
						"description": "Specifies the number of most recent messages to retrieve from the conversation."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/getConversationChannelData" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/subscribe": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Subscribe to a channel using the provided conversation ID.",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"summary": "Subscribes to channel",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363169975121665@newsletter"
									}
								},
								"required": ["conversation_id"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Successfully subscribed to the channel",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "boolean",
											"example": true
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/unsubscribe": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Unsubscribe from a channel using the provided conversation ID.",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"summary": "Unsubscribes from channel",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363169975121665@newsletter"
									}
								},
								"required": ["conversation_id"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Response for channel unsubscription attempt",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "boolean",
											"example": true
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/subscribeByInviteCode": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Subscribe to a channel using the provided invite code.",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"summary": "Subscribes using invite code",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"inviteCode": {
										"type": "string",
										"example": "b8x9291cC9uyDQxdduDpbf"
									}
								},
								"required": ["inviteCode"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Response for channel subscription attempt using invite code",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "boolean",
											"example": true
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/unsubscribeByInviteCode": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Unsubscribe from a channel using the provided invite code.",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"summary": "Unsubscribes using invite code",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"inviteCode": {
										"type": "string",
										"example": "b8x9291cC9uyDQxdduDpbf"
									}
								},
								"required": ["inviteCode"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Response for channel unsubscription attempt using invite code",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "boolean",
											"example": true
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/createStory": {
			"post": {
				"tags": ["Story Operations (Beta)"],
				"description": "You can share media (image, video) your stories. This feature is currently in Beta, you may experience some media items not being shared.",
				"summary": "Creates a story",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can share media (image,video) your stories. If the media you share is at a very low level, it may not be shared.\n\n- **type** audio: currently only OGG/Opus (.oga) files are supported. **backgroundColor** (hex) is optional.\n- **contacts** (array of numbers, optional): only these contacts will see the story. **excludeContacts** (array of numbers, optional): everyone except these. Either one updates the account story privacy setting before sharing, exactly like setStoryPrivacy.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"type": { "type": "string", "example": "media", "enum": ["media", "text", "audio"] },
									"media": { "type": "string", "example": "http://placehold.it/1920" },
									"text": { "type": "string", "example": "Test Text" },
									"backgroundColor": { "type": "string", "example": "#1E90FF" },
									"contacts": { "type": "array", "items": { "type": "string" }, "example": ["905301234567"] },
									"excludeContacts": { "type": "array", "items": { "type": "string" }, "example": ["905301234567"] }
								},
								"required": ["type"]
							},
							"examples": {
								"Text Story": {
									"value": {
										"type": "text",
										"text": "Test Story",
										"backgroundColor": "#00FF00"
									}
								},
								"Media Story": {
									"value": {
										"type": "media",
										"media": "http://placehold.it/1920",
										"text": "Story Caption (optional)"
									}
								},
								"Audio Story": {
									"value": {
										"type": "audio",
										"media": "https://cdnydm.com/wh/voice.ogg",
										"backgroundColor": "#1E90FF"
									}
								},
								"Text Story with audience": {
									"value": {
										"type": "text",
										"text": "Hello",
										"excludeContacts": ["905301234567"]
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "We give you back the ID of the text Story you shared.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "string", "example": "true_status@broadcast_3EB00968DB76C3F4593410_905301234567@c.us" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/getInfoByInviteCode/{inviteCode}": {
			"get": {
				"tags": ["Channel Chat Operations"],
				"description": "Retrieve channel information using the provided invite code.",
				"summary": "Gets channel info",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "inviteCode",
						"schema": {
							"type": "string",
							"example": "b8x9291cC9uyDQxdduDpbf"
						},
						"required": true,
						"description": "The unique invite code of the channel."
					}
				],
				"responses": {
					"200": {
						"description": "Successful response with channel information",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"example": "120363204127231552@newsletter"
												},
												"channelName": {
													"type": "string",
													"example": "Updated Channel Name"
												},
												"inviteLink": {
													"type": "string",
													"example": "https://whatsapp.com/channel/0029VaFF3v04inomA6kM6M0z"
												},
												"subscribeCount": {
													"type": "integer",
													"example": 1
												},
												"image": {
													"type": "string",
													"example": "https://pps.whatsapp.net/v/...."
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/statistics/{conversation_id}": {
			"get": {
				"tags": ["Channel Chat Operations"],
				"description": "Retrieve detailed statistics and analytics for a WhatsApp channel.",
				"summary": "Gets channel statistics",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"name": "conversation_id",
						"in": "path",
						"required": true,
						"description": "The unique identifier of the channel",
						"schema": {
							"type": "string"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful response with channel statistics",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "object",
													"properties": {
														"server": {
															"type": "string",
															"example": "newsletter"
														},
														"user": {
															"type": "string",
															"example": "120363239727235757"
														},
														"_serialized": {
															"type": "string",
															"example": "120363239727235757@newsletter"
														}
													}
												},
												"accountsReached": {
													"type": "integer",
													"example": 25478,
													"description": "Total number of accounts reached"
												},
												"dataStatus": {
													"type": "string",
													"example": "Available"
												},
												"followers": {
													"type": "integer",
													"example": 32145,
													"description": "Total number of followers"
												},
												"followersByCountry": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"countryCode": {
																"type": "string",
																"example": "CH"
															},
															"percentage": {
																"type": "number",
																"format": "float",
																"example": 0.8547123654789
															},
															"value": {
																"type": "integer",
																"example": 27475
															}
														}
													}
												},
												"followersDelta": {
													"type": "number",
													"format": "float",
													"example": 0.12458963254789
												},
												"followersReached": {
													"type": "integer",
													"example": 15784
												},
												"growthChartData": {
													"type": "object",
													"properties": {
														"activeFollowers": {
															"type": "array",
															"items": {
																"type": "array",
																"items": {
																	"type": "integer"
																},
																"minItems": 2,
																"maxItems": 2
															},
															"example": [
																[1736629200000, 245],
																[1736715600000, 178]
															],
															"description": "Array of [timestamp, count] pairs showing active followers over time"
														},
														"followersGained": {
															"type": "array",
															"items": {
																"type": "array",
																"items": {
																	"type": "integer"
																},
																"minItems": 2,
																"maxItems": 2
															},
															"example": [
																[1736629200000, 165],
																[1736715600000, 56]
															],
															"description": "Array of [timestamp, follower_gain] pairs"
														},
														"followersLost": {
															"type": "array",
															"items": {
																"type": "array",
																"items": {
																	"type": "integer"
																},
																"minItems": 2,
																"maxItems": 2
															},
															"example": [
																[1736629200000, 61],
																[1736715600000, 35]
															],
															"description": "Array of [timestamp, follower_loss] pairs"
														}
													}
												},
												"netFollows": {
													"type": "integer",
													"example": 2547
												},
												"nonFollowersReached": {
													"type": "integer",
													"example": 12547
												},
												"rangeEnd": {
													"type": "integer",
													"example": 1739145600
												},
												"rangeStart": {
													"type": "integer",
													"example": 1736640000
												},
												"rangeInDays": {
													"type": "integer",
													"example": 30
												},
												"reachByCountry": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"countryCode": {
																"type": "string",
																"example": "CH"
															},
															"percentage": {
																"type": "number",
																"format": "float",
																"example": 0.8954789632541
															},
															"value": {
																"type": "integer",
																"example": 22847
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/demote": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Demote an admin in a channel conversation.\n\nTo learn conversation_id you can use /getChannels endpoint.",
				"summary": "Demotes channel admin",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Channel conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363204127231552@newsletter"
									},
									"number": {
										"type": "string",
										"example": "905301234567@c.us"
									}
								},
								"required": ["conversation_id", "number"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/acceptAdminInvite": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"description": "Accept an admin invitation for a channel. The invitation details are received through webhook when a channel admin invite is sent.",
				"summary": "Accepts channel admin invite",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the channel ID for which you want to accept the admin invitation.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363204127231552@newsletter"
									}
								},
								"required": ["conversation_id"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/channel/revokeAdminInvite": {
			"post": {
				"tags": ["Channel Chat Operations"],
				"summary": "Revoke admin request",
				"description": "Revokes admin rights request for the specified number in the given channel.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363204127231552@newsletter",
										"description": "The unique identifier of the channel (conversation ID)."
									},
									"number": {
										"type": "string",
										"example": "905301234567",
										"description": "The phone number to revoke admin request from."
									}
								},
								"required": ["conversation_id", "number"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Revoke admin request response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "boolean",
											"example": true
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/createCommunity": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Create a new WhatsApp community. Communities allow you to organize related groups under one structure and provide centralized management.",
				"summary": "Creates a community",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **name** parameter is required and should contain the title of the community you want to create.\n- **description** parameter is required and should contain the description of the community.\n- **subGroupIds** parameter is required and should be an array of group IDs to be added to the community.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": { "type": "string", "example": "Community Title" },
									"description": { "type": "string", "example": "testing" },
									"subGroupIds": {
										"type": "array",
										"items": { "type": "string" },
										"example": ["905301234567-1574073754@g.us", "905301234567-1574072436@g.us"]
									}
								},
								"required": ["name", "description"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns success status and detailed information about the newly created community, including community ID, name, announcement group details, and subgroups.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"type": "object",
											"properties": {
												"id": { "type": "string", "example": "120363428957621835@g.us" },
												"name": { "type": "string", "example": "Community Title" },
												"participants": {
													"type": "array",
													"items": { "type": "string" },
													"example": ["905301234567@c.us"]
												},
												"admins": {
													"type": "array",
													"items": { "type": "string" },
													"example": ["905301234567@c.us"]
												},
												"linked_subgroups": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": { "type": "string", "example": "905301234567-1574073754@g.us" },
															"name": { "type": "string", "example": "Group Title" },
															"participants": {
																"type": "array",
																"items": { "type": "string" },
																"example": ["905301234567@c.us"]
															},
															"admins": {
																"type": "array",
																"items": { "type": "string" },
																"example": ["905301234567@c.us"]
															},
															"config": {
																"type": "object",
																"properties": {
																	"edit": { "type": "string", "example": "all" },
																	"send": { "type": "string", "example": "all" },
																	"disappear": { "type": "boolean", "example": false },
																	"membersCanAddMembers": { "type": "boolean", "example": true },
																	"approveNewMembers": { "type": "boolean", "example": false }
																}
															}
														}
													},
													"example": [
														{
															"id": "905301234567-1574073754@g.us",
															"name": "Group Title",
															"participants": ["905301234567@c.us"],
															"admins": ["905301234567@c.us"],
															"config": {
																"edit": "all",
																"send": "all",
																"disappear": false,
																"membersCanAddMembers": true,
																"approveNewMembers": false
															}
														},
														{
															"id": "905301234567-1574072436@g.us",
															"name": "Group Title 2",
															"participants": ["905301234567@c.us"],
															"admins": ["905301234567@c.us"],
															"config": {
																"edit": "all",
																"send": "all",
																"disappear": false,
																"membersCanAddMembers": true,
																"approveNewMembers": false
															}
														}
													]
												},
												"config": {
													"type": "object",
													"properties": {
														"edit": { "type": "string", "example": "all" },
														"send": { "type": "string", "example": "admins" },
														"disappear": { "type": "boolean", "example": false },
														"membersCanAddMembers": { "type": "boolean", "example": true },
														"approveNewMembers": { "type": "boolean", "example": false }
													}
												},
												"description": { "type": "string", "example": "testing" },
												"image": { "type": "string", "example": "https://pps.whatsapp.net/v/...." },
												"failedGroups": {
													"type": "array",
													"description": "Only present when some sub-groups could not be linked",
													"items": {
														"type": "object",
														"properties": {
															"id": { "type": "string", "example": "905301234567-1574073754@g.us" },
															"code": { "type": "string", "example": "403" }
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getCommunities": {
			"get": {
				"tags": ["Community Chat Operations"],
				"description": "Get communities list.\n\nThe id of each community matches the communityId field returned by getGroups for its sub-groups and announcement group.",
				"summary": "Lists all communities",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "full",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Load participants for communities whose participant list is not loaded yet. (Max response limit:100)"
					},
					{
						"in": "query",
						"name": "sort",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Sort communities by creation time, oldest first. Without it, the newest communities come first."
					},
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "example": 2, "default": 1 },
						"required": false,
						"description": "Paging for communities. We suggest to use with **sort** option."
					},
					{
						"in": "query",
						"name": "invite",
						"schema": { "type": "boolean", "example": true },
						"required": false,
						"description": "Include invite links for communities. (Max response limit:50)"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the list of communities.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"count": { "type": "integer", "example": 10 },
										"total": { "type": "integer", "example": 25 },
										"limit": { "type": "integer", "example": 20 },
										"page": { "type": "integer", "example": 2 },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/communityData" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getCommunities/{conversation_id}": {
			"get": {
				"tags": ["Community Chat Operations"],
				"description": "Retrieves details of a specific community.",
				"summary": "Get community details",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"required": true,
						"schema": {
							"type": "string",
							"example": "120363349826218857@g.us"
						},
						"description": "Unique identifier of the community"
					}
				],
				"responses": {
					"200": {
						"description": "Returns detailed information about the specific community.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"$ref": "#/components/schemas/communityData"
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/add": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Add participants to a community conversation.\n\nTo learn conversation_id you can use /getCommunities endpoint.",
				"summary": "Adds community participants",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the ID of the community you want to add members to. You can get community IDs using the /getCommunities endpoint.\n- **numbers** parameter is required and can accept an array of phone numbers. All numbers should start with the country code without any special characters.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									},
									"numbers": {
										"type": "array",
										"items": { "type": "string" },
										"example": ["905301234567", "905301234568"]
									},
									"sendInvite": { "type": "boolean", "example": true },
									"message": { "type": "string", "example": "Hey everyone! Thanks for joining the community." },
									"force": { "type": "boolean", "example": true }
								},
								"required": ["conversation_id", "numbers"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"description": "`true` when every number was added; an object when some numbers could not be added directly",
											"oneOf": [
												{ "type": "boolean", "example": true },
												{
													"type": "object",
													"properties": {
														"participants": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"userWid": { "type": "string", "example": "905301234568@c.us" },
																	"code": { "type": "string", "example": "403" },
																	"invite_code": { "type": "string" },
																	"invite_code_exp": { "type": "string" }
																}
															}
														},
														"cannotAdd": {
															"type": "object",
															"description": "Only present when some numbers could not be added directly",
															"properties": {
																"message": { "type": "string", "example": "Some participants could not be added." },
																"cannotAdded": {
																	"type": "array",
																	"items": { "type": "string" },
																	"example": ["905301234568@c.us"]
																},
																"sendInvite": { "type": "boolean", "example": true }
															}
														},
														"inviteLink": {
															"type": "string",
															"description": "Group invite link, present when some numbers could not be added directly",
															"example": "https://chat.whatsapp.com/b8x9291cC9uyDQxdduDpbf"
														}
													}
												}
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/remove": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Remove a participant from a community conversation.\n\nTo learn conversation_id you can use /getCommunities endpoint.",
				"summary": "Removes community participant",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the ID of the community you want to remove a member from. You can get community IDs using the /getCommunities endpoint.\n- **number** parameter is required and should be the phone number of the participant to remove.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									},
									"number": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/promote": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Promote a participant in a community conversation.\n\nTo learn conversation_id you can use /getCommunities endpoint.",
				"summary": "Promotes community admin",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Community conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									},
									"number": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/demote": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Demote a participant in a community conversation.\n\nTo learn conversation_id you can use /getCommunities endpoint.",
				"summary": "Demotes community admin",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Community conversation id and number is required for the actions.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									},
									"number": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/addSubGroup": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Add subgroups to a community conversation.\n\nTo learn conversation_id you can use /getCommunities endpoint.",
				"summary": "Adds subgroups to community",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the ID of the community you want to add subgroups to. You can get community IDs using the /getCommunities endpoint.\n- **subGroupIds** parameter is required and can accept an array of group IDs to be added as subgroups.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									},
									"subGroupIds": {
										"type": "array",
										"items": { "type": "string" },
										"example": ["905301234567-1574073754@g.us", "905301234567-1574072436@g.us"]
									}
								},
								"required": ["conversation_id", "subGroupIds"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"linked_subgroupsIds": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"example": "905301234567-1574072436@g.us"
															}
														}
													}
												},
												"failedGroups": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": { "type": "string", "example": "905301234567-1574073754@g.us" },
															"code": { "type": "string", "example": "403" }
														}
													}
												}
											},
											"example": {
												"linked_subgroupsIds": [{ "id": "905301234567-1574073754@g.us" }, { "id": "905301234567-1574072436@g.us" }]
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/removeSubGroup": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Remove subgroups from a community conversation.\n\nTo learn conversation_id you can use /getCommunities endpoint.",
				"summary": "Removes subgroups from community",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the ID of the community you want to remove subgroups from. You can get community IDs using the /getCommunities endpoint.\n- **subGroupIds** parameter is required and can accept an array of group IDs to be removed from subgroups.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									},
									"subGroupIds": {
										"type": "array",
										"items": { "type": "string" },
										"example": ["905301234567-1574073754@g.us", "905301234567-1574072436@g.us"]
									}
								},
								"required": ["conversation_id", "subGroupIds"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/revokeInvite": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "Revoke and regenerate the invite link for a community. You can get the community information from the /getCommunities endpoint to use this function.",
				"summary": "Revokes community invite",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **conversation_id** parameter is required and should contain the community ID for which you want to revoke and regenerate the invite link. You can get community IDs using the /getCommunities endpoint.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"type": "object",
											"properties": {
												"inviteCode": { "type": "string" },
												"inviteLink": { "type": "string" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/unjoinedSubGroups/{conversation_id}": {
			"get": {
				"tags": ["Community Chat Operations"],
				"summary": "Lists unjoined community sub-groups",
				"description": "Returns the sub-groups of a community that the connected number has not joined yet. conversation_id may be the community id or its announcement group id.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "conversation_id",
						"schema": {
							"type": "string",
							"example": "120363428957621835@g.us"
						},
						"required": true,
						"description": "Community id or its announcement group id."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"example": "120363349826218857@g.us"
													},
													"name": {
														"type": "string",
														"example": "General"
													}
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": [
												{
													"id": "120363349826218857@g.us",
													"name": "General"
												}
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/community/joinSubGroup": {
			"post": {
				"tags": ["Community Chat Operations"],
				"summary": "Joins a community sub-group",
				"description": "Joins a sub-group of a community the connected number is a member of.\n\n- **conversation_id**: the community id (or its announcement group id).\n- **subGroupId**: one of the ids returned by community/unjoinedSubGroups.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "- **conversation_id** parameter is required (community id or its announcement group id).\n- **subGroupId** parameter is required (an id from community/unjoinedSubGroups).",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["conversation_id", "subGroupId"],
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									},
									"subGroupId": {
										"type": "string",
										"example": "120363349826218857@g.us"
									}
								}
							},
							"examples": {
								"Join Sub-group": {
									"value": {
										"conversation_id": "120363428957621835@g.us",
										"subGroupId": "120363349826218857@g.us"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "string",
											"example": "120363349826218857@g.us"
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": "120363349826218857@g.us"
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/deactiveCommunity": {
			"post": {
				"tags": ["Community Chat Operations"],
				"description": "You can deactivate the community you want with the help of this endpoint.",
				"summary": "Deactivates the community",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Community conversation id is required for the action.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"conversation_id": {
										"type": "string",
										"example": "120363428957621835@g.us"
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getCalls": {
			"get": {
				"tags": ["Call Operations"],
				"description": "Lists the call history. ",
				"summary": "Lists call history",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "query",
						"name": "full",
						"schema": {
							"type": "boolean",
							"example": true
						},
						"required": false,
						"description": "When true, returns up to 100 records per page with full contact info (name, phone, image). When false or omitted, returns up to 500 lighter records without full contact details."
					},
					{
						"in": "query",
						"name": "page",
						"schema": {
							"type": "integer",
							"example": 2,
							"default": 1
						},
						"required": false,
						"description": "Paging for the call history. The offset is (page-1)*limit."
					},
					{
						"in": "query",
						"name": "sort",
						"schema": {
							"type": "boolean",
							"example": true
						},
						"required": false,
						"description": "When true, sorts calls from oldest to newest. Default is newest to oldest."
					}
				],
				"responses": {
					"200": {
						"description": "The returned result is as shown in the example below.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/callListResponse"
								},
								"examples": {
									"Call history": {
										"value": {
											"success": true,
											"limit": 500,
											"count": 2,
											"total": 2,
											"page": 1,
											"data": [
												{
													"timestamp": 1704702000,
													"uid": "905301234567@c.us",
													"fromMe": false,
													"conversation": "905301234567@c.us",
													"user": {
														"id": "905301234567@c.us",
														"name": "John Doe",
														"phone": "905301234567",
														"image": "https://pps.whatsapp.net/v/...."
													},
													"message": {
														"id": "001FD1B8FA609DB8ED33F441A777AF7B",
														"_serialized": "001FD1B8FA609DB8ED33F441A777AF7B",
														"type": "info",
														"subtype": "call/miss",
														"isVideo": false
													}
												},
												{
													"timestamp": 1704701000,
													"uid": "905301234568@c.us",
													"fromMe": false,
													"conversation": "905301234568@c.us",
													"user": {
														"id": "905301234568@c.us",
														"name": "Jane Doe",
														"phone": "905301234568",
														"image": "https://pps.whatsapp.net/v/...."
													},
													"message": {
														"id": "11C4B465D7D17CCF98D42ED72F702F32",
														"_serialized": "11C4B465D7D17CCF98D42ED72F702F32",
														"type": "info",
														"subtype": "call/reject",
														"isVideo": true
													}
												}
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getCalls/{callId}": {
			"get": {
				"tags": ["Call Operations"],
				"description": "Returns information about an ongoing or finished call. Returns data:null when the call cannot be found. ",
				"summary": "Gets call information",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "callId",
						"schema": {
							"type": "string",
							"example": "001FD1B8FA609DB8ED33F441A777AF7B"
						},
						"required": true,
						"description": "The unique identifier of the call, obtained from the webhook notification payload or from the call history."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the call information, or data:null when the call is not found.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"$ref": "#/components/schemas/callItem"
										}
									}
								},
								"examples": {
									"Found (ringing)": {
										"value": {
											"success": true,
											"data": {
												"timestamp": 1704702074,
												"uid": "905301234567@c.us",
												"fromMe": false,
												"conversation": "905301234567@c.us",
												"user": {
													"id": "905301234567@c.us",
													"name": "John Doe",
													"phone": "905301234567",
													"image": "https://pps.whatsapp.net/v/...."
												},
												"message": {
													"id": "001FD1B8FA609DB8ED33F441A777AF7B",
													"_serialized": "001FD1B8FA609DB8ED33F441A777AF7B",
													"type": "info",
													"subtype": "call/ringing",
													"isVideo": false
												}
											}
										}
									},
									"Not found": {
										"value": {
											"success": false,
											"data": null
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/call/start": {
			"post": {
				"tags": ["Call Operations"],
				"description": "Starts an outgoing call to the given number. The call rings the recipient and automatically ends when they answer or when the `duration` seconds elapse - it is an attention/ping call and carries no audio or conversation.",
				"summary": "Starts an outgoing call",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "- **to_number** is required and should start with the country code without any special characters (no +).\n- **duration** is required, in seconds (1-30). The call automatically ends after this time if it is not answered.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"to_number": {
										"type": "string",
										"example": "905301234567",
										"description": "Recipient phone number with country code, no special characters."
									},
									"duration": {
										"type": "integer",
										"example": 5,
										"description": "Ring duration in seconds (1-30). The call auto-ends after this time.",
										"minimum": 1,
										"maximum": 30
									}
								},
								"required": ["to_number", "duration"]
							},
							"examples": {
								"Start Call": {
									"value": {
										"to_number": "905301234567",
										"duration": 5
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the started call's id and chat id. On failure, success is false with a message and an error code.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"callId": {
													"type": "string",
													"example": "001FD1B8FA609DB8ED33F441A777AF7B"
												},
												"chatId": {
													"type": "string",
													"example": "905301234567@c.us"
												}
											}
										}
									}
								},
								"examples": {
									"Success": {
										"value": {
											"success": true,
											"data": {
												"callId": "001FD1B8FA609DB8ED33F441A777AF7B",
												"chatId": "905301234567@c.us"
											}
										}
									},
									"Invalid number": {
										"value": {
											"success": false,
											"message": "The number was not found or is a group.",
											"code": "CALL_INVALID_TO"
										}
									},
									"Busy": {
										"value": {
											"success": false,
											"message": "Another call is already in progress.",
											"code": "CALL_BUSY"
										}
									},
									"Failed": {
										"value": {
											"success": false,
											"message": "Call could not complete.",
											"code": "CALL_FAILED"
										}
									},
									"Not supported": {
										"value": {
											"success": false,
											"message": "This instance does not support starting calls.",
											"code": "CALL_NOT_SUPPORTED"
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/call/reject": {
			"post": {
				"tags": ["Call Operations"],
				"description": "You can reject incoming calls with the help of this endpoint. The callId must be obtained from the webhook notification received when a call comes in.",
				"summary": "Rejects the incoming call",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Call ID is required for the rejection action. This callId is provided in the webhook payload when an incoming call event occurs.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"callId": {
										"type": "string",
										"example": "52E7B94C1F38A0D26C795DA3408E719B",
										"description": "The unique identifier of the call, obtained from webhook notification payload"
									}
								},
								"required": ["callId"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information about the action.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": { "type": "boolean" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/call/createCallLink": {
			"post": {
				"tags": ["Call Operations"],
				"description": "You can create a call link with the help of this endpoint. This link can be shared with others to join a call.",
				"summary": "Creates a call link for voice or video calls",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Timestamp is required for creating a call link; call type is optional and defaults to voice. Timestamp must be in the future.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"callType": {
										"type": "string",
										"enum": ["voice", "video"],
										"description": "Type of the call - 'voice' or 'video' (optional). Default voice",
										"example": "video"
									},
									"timestamp": {
										"type": "integer",
										"description": "Future timestamp for the scheduled call (Unix timestamp in seconds). Cannot be in the past.",
										"example": 1679404800
									}
								},
								"required": ["timestamp"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information and the created call link data.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean" },
										"data": {
											"type": "string",
											"example": "https://call.whatsapp.com/video/..."
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getStories": {
			"get": {
				"tags": ["Story Operations (Beta)"],
				"description": "Allows you to get information about the story you share",
				"summary": "Gets user's stories",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"name": "page",
						"in": "query",
						"required": false,
						"description": "Page number for pagination",
						"schema": {
							"type": "integer",
							"default": 1
						}
					},
					{
						"name": "full",
						"in": "query",
						"required": false,
						"description": "If set to true, returns all stories without pagination",
						"schema": {
							"type": "boolean",
							"default": false
						}
					}
				],
				"responses": {
					"200": {
						"description": "Allows you to get information about the story you share",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"limit": { "type": "integer", "example": 10 },
										"count": { "type": "integer", "example": 1 },
										"total": { "type": "integer", "example": 1 },
										"page": { "type": "string", "example": "1" },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/statusData" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/contactsStories": {
			"get": {
				"tags": ["Story Operations (Beta)"],
				"description": "You can access the stories of people in your contact list here",
				"summary": "Gets contacts stories",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"name": "page",
						"in": "query",
						"required": false,
						"description": "Page number for pagination",
						"schema": {
							"type": "integer",
							"default": 1
						}
					},
					{
						"name": "full",
						"in": "query",
						"required": false,
						"description": "If set to true, returns all stories without pagination",
						"schema": {
							"type": "boolean",
							"default": false
						}
					}
				],
				"responses": {
					"200": {
						"description": "List of contacts with their stories",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"limit": {
											"type": "integer",
											"example": 10
										},
										"count": {
											"type": "integer",
											"example": 1
										},
										"total": {
											"type": "integer",
											"example": 1
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"chatId": {
														"type": "string",
														"example": "9053012345679@c.us"
													},
													"storyContent": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"url": {
																	"type": "string",
																	"example": "https://cdnydm.com/wh/......",
																	"description": "URL of the media (for image and video types)"
																},
																"id": {
																	"type": "string",
																	"example": "false_status@broadcast_3AE1AC34B021C0E2D835_9053012345679@c.us"
																},
																"type": {
																	"type": "string",
																	"enum": ["image", "text", "video", "audio", "ptt"],
																	"example": "image"
																},
																"text": {
																	"type": "string",
																	"description": "Text of a text story, or the caption of a media story"
																}
															},
															"required": ["id", "type"]
														}
													},
													"note": { "type": "string", "description": "Present when the contact has more stories than returned" }
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/contactsStories/{conversation_id}": {
			"get": {
				"tags": ["Story Operations (Beta)"],
				"description": "View stories of a specific contact",
				"summary": "Gets contact's stories",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"name": "conversation_id",
						"in": "path",
						"required": true,
						"description": "ID of the contact whose stories will be displayed",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "page",
						"in": "query",
						"required": false,
						"description": "Page number for pagination",
						"schema": {
							"type": "integer",
							"default": 1
						}
					},
					{
						"name": "full",
						"in": "query",
						"required": false,
						"description": "If set to true, returns all stories of the contact without pagination",
						"schema": {
							"type": "boolean",
							"default": false
						}
					}
				],
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"limit": {
											"type": "integer",
											"example": 10
										},
										"count": {
											"type": "integer",
											"example": 1
										},
										"total": {
											"type": "integer",
											"example": 1
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"chatId": {
														"type": "string",
														"example": "9053012345679@c.us"
													},
													"storyContent": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"url": {
																	"type": "string",
																	"example": "https://cdnydm.com/wh/......",
																	"description": "URL of the media (for image and video types)"
																},
																"id": {
																	"type": "string",
																	"example": "false_status@broadcast_3AE1AC34B021C0E2D835_9053012345679@c.us"
																},
																"type": {
																	"type": "string",
																	"enum": ["image", "text", "video"],
																	"example": "image"
																}
															},
															"required": ["id", "type"]
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getStoryPrivacy": {
			"get": {
				"tags": ["Story Operations (Beta)"],
				"summary": "Get story privacy",
				"description": "Returns who can see the stories of the connected number.\n\nsetting: contacts (all contacts), allowList (only the numbers in allowList) or denyList (all contacts except denyList). Both lists are always returned; only the one matching setting is in effect.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"setting": {
													"type": "string",
													"enum": ["contacts", "allowList", "denyList"],
													"example": "contacts"
												},
												"allowList": {
													"type": "array",
													"items": {
														"type": "string",
														"example": "905301234567"
													}
												},
												"denyList": {
													"type": "array",
													"items": {
														"type": "string",
														"example": "905301234567"
													}
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"setting": "contacts",
												"allowList": [],
												"denyList": ["905301234567"]
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/setStoryPrivacy": {
			"post": {
				"tags": ["Story Operations (Beta)"],
				"summary": "Set story privacy",
				"description": "Sets who can see the stories of the connected number. The setting is permanent and is synced to the phone.\n\n- **setting** (string, required): contacts, allowList or denyList.\n- **contacts** (array of numbers): required for allowList and denyList, ignored for contacts.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "- **setting** parameter is required: contacts, allowList or denyList.\n- **contacts** parameter is required for allowList and denyList.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["setting"],
								"properties": {
									"setting": {
										"type": "string",
										"enum": ["contacts", "allowList", "denyList"],
										"example": "denyList"
									},
									"contacts": {
										"type": "array",
										"items": {
											"type": "string"
										},
										"example": ["905301234567"]
									}
								}
							},
							"examples": {
								"Deny List": {
									"value": {
										"setting": "denyList",
										"contacts": ["905301234567"]
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"setting": {
													"type": "string",
													"enum": ["contacts", "allowList", "denyList"],
													"example": "contacts"
												},
												"allowList": {
													"type": "array",
													"items": {
														"type": "string",
														"example": "905301234567"
													}
												},
												"denyList": {
													"type": "array",
													"items": {
														"type": "string",
														"example": "905301234567"
													}
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"setting": "denyList",
												"allowList": [],
												"denyList": ["905301234567"]
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/createLabel": {
			"post": {
				"tags": ["Labels"],
				"description": "Creates a new label in WhatsApp Business.",
				"summary": "Creates a new label",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **label_name** parameter is required and should contain the name of the label you want to create.\n- **color** parameter is required and should contain the color code for the label. Available color options can be obtained by calling ***GET /label/getlabelColors***.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"label_name": { "type": "string", "example": "New Customers" },
									"color": { "type": "string", "example": "#54C265", "description": "A valid hex color code from the available label colors" }
								},
								"required": ["label_name", "color"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns success status and information about the newly created label.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/labels-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getLabels": {
			"get": {
				"tags": ["Labels"],
				"description": "You can see all your defined tags in your WhatsApp Business",
				"summary": "Lists all labels",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "You can see all your defined tags in your WhatsApp Business",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/labels-data" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getLabels/{label_id}": {
			"get": {
				"tags": ["Labels"],
				"description": "You can list the conversations to which labels have been assigned",
				"summary": "gets labeled chats",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "label_id",
						"schema": { "type": "string", "example": "1" },
						"required": true,
						"description": "One of Label id from your WhatsApp Bussiness.Can be obtained by calling ***GET labels***."
					}
				],
				"responses": {
					"200": {
						"description": "Chats have labels",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "array",
											"items": { "$ref": "#/components/schemas/short-contact-data" }
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/label/getlabelColors": {
			"get": {
				"tags": ["Labels"],
				"description": "WhatsApp Business returns all color options given to you for your labels.",
				"summary": "Gets all available label colors",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "Returns the success status and hex codes for all available color options for labels.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "array",
											"example": [
												"#A62C71",
												"#90A841",
												"#C1A03F",
												"#792138",
												"#AE8774",
												"#F0B330",
												"#B6B327",
												"#C69FCC",
												"#8B6990",
												"#FF8A8C",
												"#54C265",
												"#FF7B6B",
												"#26C4DC",
												"#57C9FF",
												"#74676A",
												"#7E90A3",
												"#5696FF",
												"#6E257E",
												"#7ACBA5",
												"#243640"
											]
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/label/edit": {
			"post": {
				"tags": ["Labels"],
				"description": "Edits an existing label in WhatsApp Business.",
				"summary": "Edits a label",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **label_id** parameter is required and should contain the ID of the label you want to edit.\n- **label_name** parameter is optional and should contain the new name for the label.\n- **color** parameter is required and should contain the color code for the label (send the current color to keep it). Available color options can be obtained by calling ***GET label/getlabelColors***.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"label_id": { "type": "string", "example": "1" },
									"label_name": { "type": "string", "example": "VIP Customers" },
									"color": { "type": "string", "example": "#54C265", "description": "A valid hex color code from the available label colors" }
								},
								"required": ["label_id", "color"]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns success status after editing the label.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/labels-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/label/remove": {
			"post": {
				"tags": ["Labels"],
				"description": "Permanently deletes one or multiple labels from WhatsApp Business. This will remove the label itself from the Labels.",
				"summary": "Deletes labels from the WhatsApp",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can delete labels by either providing a single label_id or multiple label_ids as an array.\n- **label_id** parameter should contain the ID of a single label you want to delete.\n- **label_ids** parameter should be an array of label IDs when you want to delete multiple labels at once.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"label_ids": {
										"type": "array",
										"items": {
											"type": "string"
										},
										"example": ["1", "2", "3"]
									}
								},
								"oneOf": [{ "required": ["label_ids"] }]
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns success status along with detailed results for each label deletion attempt and a list of non-existent label IDs.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"result": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"label_id": { "type": "string", "example": "1" },
															"deleteLabelResult": { "type": "boolean", "example": true }
														}
													}
												},
												"doestExist": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"description": "List of label IDs that don't exist in the system",
													"example": ["2", "3"]
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/addLabel": {
			"post": {
				"tags": ["Labels"],
				"description": "In WhatsApp Business you can associate a label to a chat.",
				"summary": "Adds a label",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "The label you want to assign and the chat id to be assigned",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"label_id": { "type": "string", "example": "1" },
									"conversation_id": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Label successfully been assigned",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/removeLabel": {
			"post": {
				"tags": ["Labels"],
				"description": "Removes a label from a specific chat without deleting the label itself from the system.",
				"summary": "Removes a label from a chat",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "- **label_id** parameter should contain the ID of the label you want to remove from the chat.\n- **conversation_id** parameter should contain the ID of the chat from which the label will be removed.",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"label_id": { "type": "string", "example": "1" },
									"conversation_id": { "type": "string", "example": "905301234567@c.us" }
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Label successfully removed from the specified chat",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getPresences/{conversation_id}": {
			"get": {
				"tags": ["Presences"],
				"description": "Find out the current presence of the person.",
				"summary": "Gets presence status",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"required": true,
						"description": "Conversation id"
					}
				],
				"responses": {
					"200": {
						"description": "Presence of person",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"chatId": { "type": "string", "example": "905301234567@c.us" },
												"last_seen": { "type": "integer", "example": 0 },
												"status": { "type": "string", "example": "online" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/subscribePresences/{conversation_id}": {
			"get": {
				"tags": ["Presences"],
				"description": "You can subscribe to listen to the person's current presence.",
				"summary": "Subscribes to presence",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"required": true,
						"description": "Conversation id"
					}
				],
				"responses": {
					"200": {
						"description": "Subscribe successfully",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"chatId": { "type": "string", "example": "905301234567@c.us" },
												"status": { "type": "string", "example": "valid" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/sendPresences": {
			"post": {
				"tags": ["Presences"],
				"description": "You can send presence to people.",
				"summary": " Sends presence status",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "You can send presence to people",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"chatId": { "type": "string", "example": "905301234567@c.us" },
									"presence": {
										"type": "string",
										"example": "typing",
										"enum": ["typing", "recording", "pause"]
									},
									"duration": {
										"type": "integer",
										"example": 30,
										"minimum": 1,
										"maximum": 30
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Subscribe successfully",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"chatId": { "type": "string", "example": "905301234567@c.us" },
												"presence": { "type": "string", "example": "typing" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/getProducts": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "You can list catalog products in your WhatsApp Business",
				"summary": "Lists catalog products",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"responses": {
					"200": {
						"description": "List Catalog Products",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/catalog-product-data" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/getProduct/{product_id}": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "You can get catalog product in your WhatsApp Business",
				"summary": "Gets specific product",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "product_id",
						"schema": { "type": "string", "example": "8269823289766677" },
						"required": true,
						"description": "Product id"
					}
				],
				"responses": {
					"200": {
						"description": "Catalog Product",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/catalog-product-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/addProduct": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can add catalog product in your WhatsApp Business",
				"summary": "Adds a product",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Product info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"imageUrl": { "type": "string", "example": "http://placehold.it/180" },
									"name": { "type": "string", "example": "Product1" },
									"description": { "type": "string", "example": "A test product." },
									"price": { "type": "string", "example": "20" },
									"isHidden": { "type": "boolean", "example": false },
									"url": { "type": "string", "example": "http://example.com" },
									"retailerId": { "type": "string", "example": "156662" },
									"currency": { "type": "string", "example": "USD" }
								},
								"required": ["name", "imageUrl"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Product",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/catalog-product-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/editProduct": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can edit catalog product in your WhatsApp Business",
				"summary": "Edits a product",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Product info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"productId": { "type": "string", "example": "8269823289766677" },
									"data": {
										"type": "object",
										"properties": {
											"imageUrl": { "type": "string", "example": "http://placehold.it/180" },
											"name": { "type": "string", "example": "Product1" },
											"description": { "type": "string", "example": "A test product." },
											"price": { "type": "string", "example": "20" },
											"isHidden": { "type": "boolean", "example": false },
											"url": { "type": "string", "example": "http://example.com" },
											"retailerId": { "type": "string", "example": "156662" },
											"currency": { "type": "string", "example": "USD" }
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Product",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/catalog-product-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/removeProduct": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can remove catalog product in your WhatsApp Business",
				"summary": "Removes a product",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Product info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"productId": { "type": "string", "example": "123" }
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Removed",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/addProductImage": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can add image to catalog product in your WhatsApp Business",
				"summary": "Adds product image",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Product info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"productId": { "type": "string", "example": "8269823289766677" },
									"imageUrl": { "type": "string", "example": "http://placehold.it/180" }
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Product",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/catalog-product-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/removeProductImage": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can remove image from catalog product in your WhatsApp Business.\n\n**Note:** The `imageUrl` parameter is deprecated due to URL inconsistencies. Please use `index` parameter instead. You can get the image index from the `additionalImageCdnUrl` array in the product response.",
				"summary": "Removes product image",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Product info\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| productId | string | **Required.** Product ID |\n| index | integer | **Recommended.** Index of the image in additionalImages array |\n| imageUrl | string | **Deprecated.** Use index instead |",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"productId": { "type": "string", "example": "8269823289766677" },
									"index": { "type": "integer", "example": 0, "description": "Index of the image in additionalImages array (recommended)" }
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Product",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/catalog-product-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/getProducts/{conversation_id}": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "You can list catalog products in other WhatsApp Business",
				"summary": "Gets products by contact",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"required": true,
						"description": "Conversation id"
					}
				],
				"responses": {
					"200": {
						"description": "List Products",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/catalog-product-data" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/getCollections": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "You can list catalog collections in your WhatsApp Business",
				"summary": "Lists product collections",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "example": 2, "default": 1 },
						"required": false,
						"description": "Paging for collections. Starts from 1."
					},
					{
						"in": "query",
						"name": "limit",
						"schema": { "type": "integer", "example": 10, "default": 10 },
						"required": false,
						"description": "Number of collections per page. (Max 50)"
					},
					{
						"in": "query",
						"name": "count",
						"schema": { "type": "integer", "example": 3, "default": 3 },
						"required": false,
						"description": "Number of products returned for each collection. (Max 100) Use getCollection/{collection_id} for the full product list."
					}
				],
				"responses": {
					"200": {
						"description": "List Catalog Collections",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"limit": { "type": "integer", "example": 10 },
										"count": { "type": "integer", "example": 2 },
										"page": { "type": "integer", "example": 1 },
										"data": { "type": "array", "items": { "$ref": "#/components/schemas/catalog-collection-data" } }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/getCollection/{collection_id}": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "You can list products of catalog collections in your WhatsApp Business",
				"summary": "Gets specific collection",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "collection_id",
						"schema": { "type": "string", "example": "563297932720268" },
						"required": true,
						"description": "Collection id"
					}
				],
				"responses": {
					"200": {
						"description": "Get Catalog Collections",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/catalog-collection-data" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/addCollection": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can add catalog collection in your WhatsApp Business",
				"summary": "Adds a collection",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Collection info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": { "type": "string", "example": "collection_name" },
									"productIds": { "type": "array", "items": { "type": "string" }, "example": ["212121", "132116"] }
								},
								"required": ["name", "productIds"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Collections",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"id": { "type": "string", "example": "12312412" },
												"reviewStatus": { "type": "string", "example": "APPROVED" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/editCollection": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can edit catalog collection in your WhatsApp Business",
				"summary": "Edits a collection",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Collection info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"collection_id": { "type": "string", "example": "12312412" },
									"name": { "type": "string", "example": "collection_name" }
								},
								"required": ["collection_id", "name"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Collection",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"id": { "type": "string", "example": "12312412" },
												"reviewStatus": { "type": "string", "example": "APPROVED" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/removeCollection": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can remove catalog collection in your WhatsApp Business",
				"summary": "Removes a collection",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Collection info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"collection_id": { "type": "string", "example": "collection_id" }
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Collection",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/addCollectionProducts": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can add product to catalog collection in your WhatsApp Business\n\n- WhatsApp assigns a new collection id after the products of a collection change. Use the `id` returned in the response for later requests.",
				"summary": "Adds product to collection",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Collection info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"collection_id": { "type": "string", "example": "12312123" },
									"productIds": { "type": "array", "items": { "type": "string" }, "example": ["212121", "132116"] }
								},
								"required": ["collection_id", "productIds"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Collection",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"id": { "type": "string", "example": "12312412" },
												"reviewStatus": { "type": "string", "example": "APPROVED" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/removeCollectionProduct": {
			"post": {
				"tags": ["Business Catalog"],
				"description": "You can remove product from catalog collection in your WhatsApp Business\n\n- WhatsApp assigns a new collection id after the products of a collection change. Use the `id` returned in the response for later requests.",
				"summary": "Removes product from collection",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"requestBody": {
					"description": "Collection info",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"collection_id": { "type": "string", "example": "12312123" },
									"productIds": { "type": "array", "items": { "type": "string" }, "example": ["212121", "132116"] }
								},
								"required": ["collection_id", "productIds"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Catalog Collection",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"id": { "type": "string", "example": "12312412" },
												"reviewStatus": { "type": "string", "example": "APPROVED" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/getOrders": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "Returns orders from memory (only orders received while instance is running). Orders are captured via webhook and stored temporarily. For persistent storage, save orders to your own database when received via webhook.",
				"summary": "Lists orders from memory",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "query",
						"name": "page",
						"schema": { "type": "integer", "default": 1, "example": 1 },
						"required": false,
						"description": "Page number for pagination"
					},
					{
						"in": "query",
						"name": "sort",
						"schema": { "type": "boolean", "default": false, "example": true },
						"required": false,
						"description": "Sort by timestamp descending"
					},
					{
						"in": "query",
						"name": "conversation_id",
						"schema": { "type": "string", "example": "905301234567@c.us" },
						"required": false,
						"description": "Filter orders by conversation ID"
					}
				],
				"responses": {
					"200": {
						"description": "List of order message IDs from memory",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "object",
											"properties": {
												"count": { "type": "integer", "example": 5 },
												"total": { "type": "integer", "example": 5 },
												"limit": { "type": "integer", "example": 100 },
												"page": { "type": "integer", "example": 1 },
												"data": {
													"type": "array",
													"items": { "type": "string" },
													"example": ["false_905301234567@lid_3EB08D542BF8D2092951EE"]
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog/getOrders/{orderId}": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "Returns detailed information about a specific order including products, quantities and prices.",
				"summary": "Gets order details",
				"parameters": [
					{ "$ref": "#/components/parameters/phone_id" },
					{
						"in": "path",
						"name": "orderId",
						"schema": { "type": "string" },
						"required": true,
						"description": "Order message ID"
					}
				],
				"responses": {
					"200": {
						"description": "Order details",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": { "$ref": "#/components/schemas/order-detail" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/catalog": {
			"get": {
				"tags": ["Business Catalog"],
				"description": "Returns catalog products info of the business profile. You only need productId to send products to users.",
				"summary": "Gets catalog products",
				"parameters": [{ "$ref": "#/components/parameters/phone_id" }],
				"deprecated": true,
				"responses": {
					"200": {
						"description": "Returns catalog products info of the business profile",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": { "type": "boolean", "example": true },
										"data": {
											"type": "array",
											"items": {
												"$ref": "#/components/schemas/product-data"
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getBusinessProfile": {
			"get": {
				"tags": ["Business Catalog"],
				"summary": "Get business profile",
				"description": "Returns the business profile of the connected number (WhatsApp Business accounts).\n\nEmpty fields are returned as null. businessHours.config keys are mon..sun; mode is one of open_24h, appointment_only or specific_hours, and specific_hours carries hours as [[openMinute, closeMinute]]. categories[].id and memberSinceText may be null depending on the session type.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"example": "905301234567@c.us"
												},
												"description": {
													"type": "string",
													"nullable": true,
													"example": "Business description"
												},
												"address": {
													"type": "string",
													"nullable": true,
													"example": "Business address"
												},
												"email": {
													"type": "string",
													"nullable": true,
													"example": "info@example.com"
												},
												"website": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"example": ["https://example.com"]
												},
												"categories": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"nullable": true,
																"example": "123456789012345"
															},
															"name": {
																"type": "string",
																"example": "Business Category"
															}
														}
													}
												},
												"businessHours": {
													"type": "object",
													"properties": {
														"config": {
															"type": "object",
															"example": {
																"mon": {
																	"mode": "specific_hours",
																	"hours": [[540, 1080]]
																},
																"tue": {
																	"mode": "open_24h"
																}
															}
														},
														"timezone": {
															"type": "string",
															"example": "UTC"
														}
													}
												},
												"latitude": {
													"type": "number",
													"nullable": true,
													"example": null
												},
												"longitude": {
													"type": "number",
													"nullable": true,
													"example": null
												},
												"memberSinceText": {
													"type": "string",
													"nullable": true,
													"example": "Joined in January 2020"
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234567@c.us",
												"description": "Business description",
												"address": "Business address",
												"email": "info@example.com",
												"website": ["https://example.com"],
												"categories": [
													{
														"id": "123456789012345",
														"name": "Business Category"
													}
												],
												"businessHours": {
													"config": {
														"tue": {
															"mode": "open_24h"
														}
													},
													"timezone": "UTC"
												},
												"latitude": null,
												"longitude": null,
												"memberSinceText": "Joined in January 2020"
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/getBusinessProfile/{conversation_id}": {
			"get": {
				"tags": ["Business Catalog"],
				"summary": "Get contact business profile",
				"description": "Returns the public business profile of another business number. Same response shape as getBusinessProfile.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "path",
						"name": "conversation_id",
						"schema": {
							"type": "string",
							"example": "905301234567@c.us"
						},
						"required": true,
						"description": "Business number in the form 905xxxxxxxxx@c.us."
					}
				],
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"example": "905301234567@c.us"
												},
												"description": {
													"type": "string",
													"nullable": true,
													"example": "Business description"
												},
												"address": {
													"type": "string",
													"nullable": true,
													"example": "Business address"
												},
												"email": {
													"type": "string",
													"nullable": true,
													"example": "info@example.com"
												},
												"website": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"example": ["https://example.com"]
												},
												"categories": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"nullable": true,
																"example": "123456789012345"
															},
															"name": {
																"type": "string",
																"example": "Business Category"
															}
														}
													}
												},
												"businessHours": {
													"type": "object",
													"properties": {
														"config": {
															"type": "object",
															"example": {
																"mon": {
																	"mode": "specific_hours",
																	"hours": [[540, 1080]]
																},
																"tue": {
																	"mode": "open_24h"
																}
															}
														},
														"timezone": {
															"type": "string",
															"example": "UTC"
														}
													}
												},
												"latitude": {
													"type": "number",
													"nullable": true,
													"example": null
												},
												"longitude": {
													"type": "number",
													"nullable": true,
													"example": null
												},
												"memberSinceText": {
													"type": "string",
													"nullable": true,
													"example": "Joined in January 2020"
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234567@c.us",
												"description": "Business description",
												"address": "Business address",
												"email": "info@example.com",
												"website": ["https://example.com"],
												"categories": [
													{
														"id": "123456789012345",
														"name": "Business Category"
													}
												],
												"businessHours": {
													"config": {
														"tue": {
															"mode": "open_24h"
														}
													},
													"timezone": "UTC"
												},
												"latitude": null,
												"longitude": null,
												"memberSinceText": "Joined in January 2020"
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/setBusinessProfile": {
			"post": {
				"tags": ["Business Catalog"],
				"summary": "Set business profile",
				"description": "Updates the business profile of the connected number. Business accounts only. All fields are optional; only the given fields are changed. Sending an empty string clears a text field (e.g. \"description\": \"\"). website accepts at most 2 URLs.",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					}
				],
				"requestBody": {
					"description": "All parameters are optional; only the given fields are changed.\n- **description**, **address**, **email** (string; empty string clears the field).\n- **website** (array of at most 2 URLs).\n- **businessHours** (object with config and timezone).",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"description": {
										"type": "string",
										"example": "Business description"
									},
									"address": {
										"type": "string",
										"example": "Business address"
									},
									"email": {
										"type": "string",
										"example": "info@example.com"
									},
									"website": {
										"type": "array",
										"items": {
											"type": "string"
										},
										"example": ["https://example.com"]
									},
									"businessHours": {
										"type": "object",
										"properties": {
											"config": {
												"type": "object",
												"example": {
													"mon": {
														"mode": "specific_hours",
														"hours": [[540, 1080]]
													}
												}
											},
											"timezone": {
												"type": "string",
												"example": "UTC"
											}
										}
									}
								}
							},
							"examples": {
								"Update Profile": {
									"value": {
										"description": "Business description",
										"website": ["https://example.com"],
										"businessHours": {
											"config": {
												"mon": {
													"mode": "specific_hours",
													"hours": [[540, 1080]]
												}
											},
											"timezone": "UTC"
										}
									}
								}
							}
						}
					},
					"required": true
				},
				"responses": {
					"200": {
						"description": "Returns the success information and the data. On failure success is false with a code and a message.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"example": "905301234567@c.us"
												},
												"description": {
													"type": "string",
													"nullable": true,
													"example": "Business description"
												},
												"address": {
													"type": "string",
													"nullable": true,
													"example": "Business address"
												},
												"email": {
													"type": "string",
													"nullable": true,
													"example": "info@example.com"
												},
												"website": {
													"type": "array",
													"items": {
														"type": "string"
													},
													"example": ["https://example.com"]
												},
												"categories": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"nullable": true,
																"example": "123456789012345"
															},
															"name": {
																"type": "string",
																"example": "Business Category"
															}
														}
													}
												},
												"businessHours": {
													"type": "object",
													"properties": {
														"config": {
															"type": "object",
															"example": {
																"mon": {
																	"mode": "specific_hours",
																	"hours": [[540, 1080]]
																},
																"tue": {
																	"mode": "open_24h"
																}
															}
														},
														"timezone": {
															"type": "string",
															"example": "UTC"
														}
													}
												},
												"latitude": {
													"type": "number",
													"nullable": true,
													"example": null
												},
												"longitude": {
													"type": "number",
													"nullable": true,
													"example": null
												},
												"memberSinceText": {
													"type": "string",
													"nullable": true,
													"example": "Joined in January 2020"
												}
											}
										}
									}
								},
								"examples": {
									"Default": {
										"value": {
											"success": true,
											"data": {
												"id": "905301234567@c.us",
												"description": "Business description",
												"address": "Business address",
												"email": "info@example.com",
												"website": ["https://example.com"],
												"categories": [
													{
														"id": "123456789012345",
														"name": "Business Category"
													}
												],
												"businessHours": {
													"config": {
														"tue": {
															"mode": "open_24h"
														}
													},
													"timezone": "UTC"
												},
												"latitude": null,
												"longitude": null,
												"memberSinceText": "Joined in January 2020"
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/logs": {
			"get": {
				"tags": ["Favorites", "Account Information Retrieval"],
				"description": "Returns logs of all the phones for the product.\n\n- Logs are kept for 10 days.\n- To export a period: set `from` and `to`, then paginate with `after` until the response `next` is null.\n- The endpoint may respond with HTTP 429 (Too many requests) and a `Retry-After` header; repeat the same request after that many seconds. No records are skipped.",
				"summary": "Returns all phones logs",
				"parameters": [
					{
						"in": "query",
						"name": "page",
						"schema": {
							"type": "integer",
							"example": 1,
							"default": 1
						},
						"description": "Page number for pagination"
					},
					{
						"in": "query",
						"name": "type",
						"schema": {
							"type": "string",
							"enum": ["incoming", "outgoing"],
							"example": "incoming"
						},
						"description": "Filter logs by type. If not specified, returns all log types."
					},
					{
						"in": "query",
						"name": "pageLimit",
						"schema": { "type": "integer", "example": 50, "default": 50, "minimum": 1, "maximum": 1000 },
						"description": "Number of records per page. Values above 1000 are capped to 1000."
					},
					{
						"in": "query",
						"name": "from",
						"schema": { "type": "string", "example": "2026-09-22T00:00:00Z" },
						"description": "Start of the time range. ISO 8601 (e.g. 2026-09-22T00:00:00Z) or unix timestamp (seconds or milliseconds)."
					},
					{
						"in": "query",
						"name": "to",
						"schema": { "type": "string", "example": "2026-09-28T00:00:00Z" },
						"description": "End of the time range. Same format as from."
					},
					{
						"in": "query",
						"name": "after",
						"schema": { "type": "string" },
						"description": "Cursor for the next page. Pass the next value from the previous response. When used, page is ignored."
					}
				],
				"responses": {
					"200": {
						"description": "Returns logs for all phones in the product",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"count": {
													"type": "integer",
													"example": 50
												},
												"page": {
													"type": "string",
													"example": "2"
												},
												"list": {
													"$ref": "#/components/schemas/logsList"
												},
												"next": {
													"type": "string",
													"nullable": true,
													"example": "event-b359bfe01d5c08dff844a99802000000",
													"description": "Cursor for the next page; null only when there is no more data. A page may contain fewer records than pageLimit (even zero) while next is still set; keep paginating until next is null."
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/{phone_id}/logs": {
			"get": {
				"tags": ["Favorites", "Account Information Retrieval"],
				"description": "Returns logs of the specific phone.\n\n- Logs are kept for 10 days.\n- To export a period: set `from` and `to`, then paginate with `after` until the response `next` is null.\n- The endpoint may respond with HTTP 429 (Too many requests) and a `Retry-After` header; repeat the same request after that many seconds. No records are skipped.",
				"summary": "Returns specific phone logs",
				"parameters": [
					{
						"$ref": "#/components/parameters/phone_id"
					},
					{
						"in": "query",
						"name": "page",
						"schema": {
							"type": "integer",
							"example": 1,
							"default": 1
						},
						"description": "Page number for pagination"
					},
					{
						"in": "query",
						"name": "type",
						"schema": {
							"type": "string",
							"enum": ["incoming", "outgoing"],
							"example": "outgoing"
						},
						"description": "Filter logs by type. If not specified, returns all log types."
					},
					{
						"in": "query",
						"name": "pageLimit",
						"schema": { "type": "integer", "example": 50, "default": 50, "minimum": 1, "maximum": 1000 },
						"description": "Number of records per page. Values above 1000 are capped to 1000."
					},
					{
						"in": "query",
						"name": "from",
						"schema": { "type": "string", "example": "2026-09-22T00:00:00Z" },
						"description": "Start of the time range. ISO 8601 (e.g. 2026-09-22T00:00:00Z) or unix timestamp (seconds or milliseconds)."
					},
					{
						"in": "query",
						"name": "to",
						"schema": { "type": "string", "example": "2026-09-28T00:00:00Z" },
						"description": "End of the time range. Same format as from."
					},
					{
						"in": "query",
						"name": "after",
						"schema": { "type": "string" },
						"description": "Cursor for the next page. Pass the next value from the previous response. When used, page is ignored."
					}
				],
				"responses": {
					"200": {
						"description": "Returns logs for the specific phone",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"success": {
											"type": "boolean",
											"example": true
										},
										"data": {
											"type": "object",
											"properties": {
												"count": {
													"type": "integer",
													"example": 50
												},
												"list": {
													"$ref": "#/components/schemas/logsList"
												},
												"next": {
													"type": "string",
													"nullable": true,
													"example": "event-b359bfe01d5c08dff844a99802000000",
													"description": "Cursor for the next page; null only when there is no more data. A page may contain fewer records than pageLimit (even zero) while next is still set; keep paginating until next is null."
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	},
	"security": [
		{
			"ApiKeyAuth": ["x-maytapi-key"]
		}
	],
	"components": {
		"parameters": {
			"phone_id": {
				"name": "phone_id",
				"in": "path",
				"description": "ID of the phone registered to the product, assigned by the database automatically. Can be obtained by calling ***GET listPhones***.",
				"required": true,
				"schema": { "$ref": "#/components/schemas/phone-id" }
			}
		},
		"securitySchemes": {
			"ApiKeyAuth": {
				"type": "apiKey",
				"name": "x-maytapi-key",
				"in": "header",
				"description": "You can find your token at [https://console.maytapi.com/settings/token](https://console.maytapi.com/settings/token)"
			}
		},
		"schemas": {
			"Status": {
				"type": "object",
				"properties": {
					"success": {
						"type": "boolean"
					},
					"status": {
						"$ref": "#/components/schemas/subStatus"
					},
					"number": { "type": "string", "description": "Connected WhatsApp number", "example": "905301234567" }
				}
			},
			"phone_config": {
				"type": "object",
				"properties": {
					"success": {
						"type": "boolean",
						"default": true
					},
					"config": {
						"type": "object",
						"properties": { "webhook": { "$ref": "#/components/schemas/webhook-url" }, "ack_delivery": { "type": "boolean", "default": false } }
					}
				}
			},
			"backupData": {
				"type": "object",
				"properties": {
					"WABrowserId": {
						"type": "string",
						"example": "..."
					},
					"debugCursor": {
						"type": "string",
						"example": "..."
					},
					"whatsapp-mutex": {
						"type": "string",
						"example": "..."
					},
					"(other_keys)": {
						"type": "string",
						"example": "(other values)"
					}
				}
			},
			"justSuccess": {
				"type": "object",
				"properties": {
					"success": {
						"type": "boolean",
						"example": true
					}
				}
			},
			"addPhoneBody": {
				"type": "object",
				"properties": {
					"number": {
						"type": "string",
						"example": "..."
					}
				}
			},
			"productData": {
				"type": "object",
				"properties": {
					"pid": { "$ref": "#/components/schemas/product-id" },
					"webhook": {
						"$ref": "#/components/schemas/webhook-url"
					},
					"ack_delivery": {
						"type": "boolean",
						"example": true
					},
					"phone_limit": {
						"type": "integer",
						"example": 2
					}
				}
			},
			"phoneList": {
				"type": "array",
				"items": {
					"$ref": "#/components/schemas/phoneObj"
				}
			},
			"logIncoming": {},
			"logOutgoing": {},
			"logObj": {
				"type": "object",
				"properties": {
					"eventId": { "type": "string", "example": "event-b359bfe01d5c08dff844a99802000000" },
					"pid": {
						"$ref": "#/components/schemas/product-id"
					},
					"phone": {
						"$ref": "#/components/schemas/phone-id"
					},
					"created_at": { "type": "string", "example": "2020-04-02T06:47:50.229Z" },
					"type": {
						"type": "string",
						"enum": ["incoming", "outgoing", "error"],
						"example": "outgoing"
					},
					"data": {
						"type": "object",
						"oneOf": [{ "$ref": "#/components/schemas/logIncoming" }, { "$ref": "#/components/schemas/logOutgoing" }],
						"example": {
							"body": {
								"type": "message",
								"user": {
									"id": "905301234567@c.us",
									"name": "905301234567",
									"phone": "905301234567"
								},
								"reply": "https://api.maytapi.com/api/dc01968f-####-####-####-7cfcf51aa423/12/sendMessage",
								"message": {
									"id": "true_123456@c.us_***",
									"text": "ok",
									"type": "text",
									"fromMe": true,
									"_serialized": "true_123456@c.us_***"
								},
								"phoneId": 1,
								"phone_id": 1,
								"receiver": "908501234567",
								"productId": "dc01968f-####-####-####-7cfcf51aa423",
								"timestamp": 1585808781,
								"product_id": "dc01968f-####-####-####-7cfcf51aa423",
								"conversation": "905301234567@c.us"
							},
							"webhook": "YOUR WEBHOOK URL",
							"response": {
								"body": "OK",
								"statusCode": 200
							}
						}
					}
				}
			},

			"logsList": {
				"type": "array",
				"items": {
					"$ref": "#/components/schemas/logObj"
				}
			},
			"incomingMessageUserData": {
				"type": "object",
				"properties": {
					"id": {
						"$ref": "#/components/schemas/conversation-id"
					},
					"name": {
						"type": "string",
						"example": "UserName"
					},
					"phone": {
						"type": "string",
						"example": "905301234567"
					},
					"username": {
						"type": "string",
						"description": "Only present when the user has a WhatsApp username.",
						"example": "john_doe"
					},
					"image": {
						"type": "string",
						"example": "https://pps.whatsapp.net/v/...."
					}
				},
				"example": {
					"id": "905301234567@c.us",
					"name": "UserName",
					"phone": "905301234567",
					"image": "https://pps.whatsapp.net/v/...."
				}
			},
			"webhook-ack-data": {
				"type": "object",
				"properties": {
					"ackType": {
						"type": "string",
						"enum": ["delivered", "reached", "seen", "played", "deleted"],
						"example": "delivered"
					},
					"ackCode": {
						"type": "integer",
						"enum": [1, 2, 3, 4, 5],
						"example": 1
					},
					"chatId": { "$ref": "#/components/schemas/conversation-id" },
					"msgId": { "$ref": "#/components/schemas/message-id" },
					"time": {
						"type": "integer",
						"example": 1586874663
					}
				}
			},
			"webhook-ack-body": {
				"type": "object",
				"properties": {
					"type": { "type": "string", "default": "ack", "example": "ack" },
					"product_id": {
						"$ref": "#/components/schemas/product-id"
					},

					"data": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/webhook-ack-data"
						}
					}
				}
			},
			"webhook-live-body": {
				"type": "object",
				"properties": {
					"type": { "type": "string", "default": "live_event", "example": "live_event" },
					"product_id": {
						"$ref": "#/components/schemas/product-id"
					},
					"phone_id": {
						"$ref": "#/components/schemas/phone-id"
					},
					"conversation": {
						"$ref": "#/components/schemas/conversation-id"
					},
					"data": {
						"type": "object",
						"properties": { "event": { "type": "string", "enum": ["taken_by_agent", "closed", "released_by_agent"], "example": "taken_by_agent" } }
					}
				}
			},
			"webhook-status-body": {
				"type": "object",
				"properties": {
					"type": { "type": "string", "default": "status", "example": "status" },
					"pid": {
						"$ref": "#/components/schemas/product-id"
					},
					"phone_id": {
						"$ref": "#/components/schemas/phone-id"
					},
					"status": {
						"$ref": "#/components/schemas/status-enum"
					}
				}
			},
			"status-enum": {
				"type": "string",
				"enum": ["active", "qr-screen", "phone-error", "idle", "loading", "disabled"],
				"example": "active"
			},
			"subStatus": {
				"type": "object",
				"properties": {
					"loggedIn": {
						"type": "boolean"
					},
					"isQr": {
						"type": "boolean",
						"example": false
					},
					"loading": {
						"type": "boolean",
						"example": false
					},
					"connRetry": {
						"type": "boolean",
						"example": false
					},
					"message": {
						"type": "string",
						"example": "Special messages about the status are shown here"
					}
				}
			},
			"incomingMessageType": {
				"type": "object",
				"properties": {
					"product_id": { "$ref": "#/components/schemas/product-id" },
					"phone_id": { "$ref": "#/components/schemas/phone-id" },
					"message": {
						"$ref": "#/components/schemas/message-data"
					},
					"user": {
						"$ref": "#/components/schemas/incomingMessageUserData"
					},
					"conversation": {
						"$ref": "#/components/schemas/conversation-id"
					},
					"receiver": {
						"type": "string",
						"example": "905307654321"
					},
					"timestamp": {
						"type": "integer",
						"example": 1574081887
					},
					"type": {
						"type": "string",
						"example": "message"
					},
					"reply": {
						"type": "string",
						"example": "https://maytapi.com/api/dc01968f-####-####-####-7cfcf51aa423/12/sendMessage",
						"description": "Reply url for ease of use."
					},
					"quoted": {
						"$ref": "#/components/schemas/message-quoted-data"
					}
				}
			},
			"phoneObjWithPid": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"example": "..."
					},
					"pid": { "$ref": "#/components/schemas/product-id" },
					"number": {
						"type": "string",
						"example": "(number with the country code included without +)"
					}
				}
			},
			"ackSet": {
				"type": "object",
				"properties": {
					"ack_delivery": {
						"type": "boolean",
						"example": true
					}
				}
			},
			"backupSuccess": {
				"type": "object",
				"properties": {
					"success": {
						"type": "boolean",
						"example": true
					},
					"data": {
						"$ref": "#/components/schemas/backupData"
					}
				}
			},
			"deleteSuccess": {
				"type": "object",
				"properties": {
					"success": {
						"type": "boolean",
						"example": true
					},
					"type": {
						"type": "string",
						"example": "deleted"
					},
					"pid": { "$ref": "#/components/schemas/product-id" },
					"phone_id": {
						"type": "string",
						"example": "phone_id"
					}
				}
			},
			"sendMessageResponseData": {
				"type": "object",
				"properties": {
					"chatId": {
						"type": "string",
						"example": "905301234567-1574072436@g.us"
					},
					"msgId": {
						"type": "string",
						"example": "3EB065B353B9493D00C9"
					}
				}
			},
			"sendMessageBody": {
				"type": "object",
				"properties": {
					"to_number": {
						"type": "string",
						"example": "905301234567"
					},
					"message": {
						"type": "string",
						"example": "Message Text"
					},
					"type": {
						"type": "string",
						"enum": ["text", "media"],
						"example": "text"
					}
				}
			},
			"phoneObj": {
				"type": "object",
				"properties": {
					"id": {
						"type": "integer",
						"example": 1150
					},
					"number": {
						"type": "string",
						"example": "(number with the country code included without +)"
					},
					"status": {
						"$ref": "#/components/schemas/status-enum"
					}
				}
			},
			"queue-phone": {
				"type": "object",
				"properties": {
					"id": {
						"type": "integer",
						"example": 1150
					},
					"status": {
						"$ref": "#/components/schemas/status-enum"
					},
					"queue": {
						"type": "integer",
						"example": 0
					}
				}
			},
			"webhook-url": {
				"type": "string",
				"format": "uri",
				"example": "https://myserver.com/send/callback/here"
			},
			"sendMessageResponse": {
				"type": "object",
				"properties": {
					"success": {
						"type": "boolean",
						"example": true
					},
					"data": {
						"$ref": "#/components/schemas/sendMessageResponseData"
					}
				}
			},
			"groupData": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"example": "905301234567-1574073754@g.us"
					},
					"name": {
						"type": "string",
						"example": "Group Title"
					},
					"communityId": {
						"type": "string",
						"example": "120363428957621835@g.us",
						"description": "Only present for groups that belong to a community. Same value as the id returned by getCommunities."
					},
					"isCommunityAnnounce": {
						"type": "boolean",
						"example": true,
						"description": "Only present (true) for the community's announcement group."
					},
					"description": {
						"type": "string",
						"example": "Group Description"
					},
					"participants": {
						"type": "array",

						"items": {
							"type": "string",
							"example": "05301234567@c.us"
						}
					},
					"admins": {
						"type": "array",

						"items": {
							"type": "string",
							"example": "05301234567@c.us"
						}
					},
					"config": {
						"type": "object",
						"properties": {
							"edit": {
								"type": "string",
								"enum": ["admins", "all"],
								"example": "admins"
							},
							"send": {
								"type": "string",
								"enum": ["admins", "all"],
								"example": "all"
							},
							"disappear": {
								"type": "boolean",
								"example": false
							},
							"membersCanAddMembers": {
								"type": "boolean",
								"example": true
							},
							"approveNewMembers": {
								"type": "boolean",
								"example": true
							}
						}
					},
					"image": { "type": "string", "description": "Group profile picture URL", "example": "https://pps.whatsapp.net/v/...." },
					"pendingParticipants": {
						"type": "array",
						"description": "Numbers waiting for admin approval to join",
						"items": { "type": "string" },
						"example": []
					},
					"invite": {
						"description": "Group invite link. Only returned with `invite=true`; `false` when you are not a group admin",
						"oneOf": [
							{ "type": "string", "example": "https://chat.whatsapp.com/b8x9291cC9uyDQxdduDpbf" },
							{ "type": "boolean", "example": false }
						]
					}
				}
			},
			"communityData": {
				"type": "object",
				"properties": {
					"id": { "type": "string", "example": "120363428957621835@g.us" },
					"name": { "type": "string", "example": "Community Title" },
					"description": { "type": "string", "example": "Community Description" },
					"participants": {
						"type": "array",
						"items": { "type": "string" },
						"example": ["905301234567@c.us"]
					},
					"admins": {
						"type": "array",
						"items": { "type": "string" },
						"example": ["905301234567@c.us"]
					},

					"linked_subgroups": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": { "type": "string", "example": "905301234567-1574073754@g.us" },
								"name": { "type": "string", "example": "Group Title" },
								"description": { "type": "string", "example": "Group Description" },
								"participants": {
									"type": "array",
									"items": { "type": "string" },
									"example": ["905301234567@c.us", "905301234568@c.us"]
								},
								"admins": {
									"type": "array",
									"items": { "type": "string" },
									"example": ["905301234567@c.us"]
								},
								"config": {
									"type": "object",
									"properties": {
										"edit": { "type": "string", "example": "all" },
										"send": { "type": "string", "example": "all" },
										"disappear": { "type": "boolean", "example": false },
										"membersCanAddMembers": { "type": "boolean", "example": true },
										"approveNewMembers": { "type": "boolean", "example": false }
									}
								}
							}
						}
					},
					"config": {
						"type": "object",
						"properties": {
							"edit": { "type": "string", "example": "all" },
							"send": { "type": "string", "example": "admins" },
							"disappear": { "type": "boolean", "example": false },
							"membersCanAddMembers": { "type": "boolean", "example": true },
							"approveNewMembers": { "type": "boolean", "example": false }
						}
					}
				}
			},
			"statusData": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"example": "true_status@broadcast_3EB00968DB76C3F4593410_905301234567@c.us"
					},
					"storyContent": {
						"type": "object",
						"properties": {
							"url": {
								"type": "string",
								"example": "https://cdnydm.com/wh/......"
							},
							"id": {
								"type": "string",
								"example": "true_status@broadcast_3EB00968DB76C3F4593410_905301234567@c.us"
							},
							"type": {
								"type": "string",
								"example": "image"
							}
						}
					},
					"viewers": {
						"type": "array",
						"items": {
							"type": "string",
							"example": "9053012345679@c.us"
						}
					}
				}
			},
			"getConversationsAll": {
				"type": "object",
				"properties": {
					"name": { "type": "string", "example": "name" },
					"server": { "type": "string", "example": "@g.us" },
					"user": { "type": "string", "example": "905301234567" },
					"_serialized": { "type": "string", "example": "905301234567@c.us" },
					"username": { "type": "string", "example": "john" },
					"isFavorite": { "type": "boolean", "example": false },
					"isPinned": { "type": "boolean", "example": true },
					"isArchived": { "type": "boolean", "example": false },
					"isMuted": { "type": "boolean", "example": true },
					"muteUntil": {
						"type": "integer",
						"nullable": true,
						"description": "Mute end time as unix timestamp (seconds). 0 means muted forever; null means not muted.",
						"example": 1704702074
					},
					"ephemeral": { "type": "integer", "example": 604800 }
				}
			},
			"getConversationChannelData": {
				"type": "object",
				"properties": {
					"users": {
						"type": "object",
						"description": "Users keyed by user id",
						"additionalProperties": {
							"type": "object",
							"properties": {
								"id": { "type": "string", "example": "120363204127231552@newsletter" },
								"name": { "type": "string", "example": "Test Channel" },
								"phone": { "type": "string", "example": "120363204127231552" },
								"image": { "type": "string", "example": "" }
							}
						}
					},
					"messages": {
						"type": "array",
						"items": { "$ref": "#/components/schemas/channelMessageResponse" }
					},
					"me": {
						"type": "object",
						"properties": {
							"id": {
								"type": "integer",
								"example": 25312
							},
							"phone": {
								"type": "string",
								"example": "905301234567"
							}
						}
					},
					"subscribeCount": { "type": "integer", "example": 120 }
				}
			},

			"getConversationsData": {
				"type": "object",
				"properties": {
					"users": {
						"type": "object",
						"description": "Users in the conversation, keyed by user id",
						"additionalProperties": {
							"type": "object",
							"properties": {
								"id": { "type": "string", "example": "905301234567@c.us" },
								"name": { "type": "string", "example": "Test phone" },
								"phone": { "type": "string", "example": "905301234567" },
								"image": { "type": "string", "example": "" }
							}
						}
					},
					"messages": {
						"type": "array",
						"items": { "$ref": "#/components/schemas/messageResponse" }
					},
					"me": {
						"type": "object",
						"properties": {
							"id": {
								"type": "integer",
								"example": 25312
							},
							"phone": {
								"type": "string",
								"example": "905301234567"
							}
						}
					},
					"isFavorite": {
						"type": "boolean",
						"example": false
					},
					"isPinned": {
						"type": "boolean",
						"example": true
					},
					"isArchived": {
						"type": "boolean",
						"example": false
					},
					"isMuted": {
						"type": "boolean",
						"example": true
					},
					"muteUntil": {
						"type": "integer",
						"nullable": true,
						"description": "Mute end time as unix timestamp (seconds). 0 means muted forever; null means not muted.",
						"example": 1704702074
					},
					"ephemeral": {
						"type": "integer",
						"example": 604800
					},
					"participants": { "type": "array", "description": "Group participants (group conversations only)", "items": { "type": "string" } }
				}
			},
			"callItem": {
				"type": "object",
				"properties": {
					"timestamp": {
						"type": "integer",
						"example": 1704702074
					},
					"uid": {
						"type": "string",
						"example": "905301234567@c.us"
					},
					"fromMe": {
						"type": "boolean",
						"example": false
					},
					"conversation": {
						"type": "string",
						"example": "905301234567@c.us",
						"description": "The other party's number (@c.us) for one-to-one calls, or the group id (@g.us) for group calls."
					},
					"user": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"example": "905301234567@c.us"
							},
							"name": {
								"type": "string",
								"example": "John Doe"
							},
							"phone": {
								"type": "string",
								"example": "905301234567"
							},
							"image": {
								"type": "string",
								"example": "https://pps.whatsapp.net/v/...."
							}
						}
					},
					"message": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"example": "001FD1B8FA609DB8ED33F441A777AF7B"
							},
							"_serialized": {
								"type": "string",
								"example": "001FD1B8FA609DB8ED33F441A777AF7B"
							},
							"type": {
								"type": "string",
								"example": "info"
							},
							"subtype": {
								"type": "string",
								"enum": ["call/ringing", "call/miss", "call/reject", "call/accept"],
								"example": "call/miss"
							},
							"isVideo": {
								"type": "boolean",
								"example": false
							}
						}
					}
				}
			},
			"callListResponse": {
				"type": "object",
				"properties": {
					"success": {
						"type": "boolean",
						"example": true
					},
					"limit": {
						"type": "integer",
						"example": 500
					},
					"count": {
						"type": "integer",
						"example": 2
					},
					"total": {
						"type": "integer",
						"example": 2
					},
					"page": {
						"type": "integer",
						"example": 1
					},
					"data": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/callItem"
						}
					}
				}
			},
			"lidPhoneResolveData": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"example": "905301234567@c.us"
					},
					"name": {
						"type": "string",
						"example": "John Doe"
					},
					"phone": {
						"type": "string",
						"example": "905301234567"
					},
					"lid": {
						"type": "string",
						"example": "123456789012345@lid"
					}
				}
			},
			"usernameResolveData": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"example": "905301234567@c.us"
					},
					"name": {
						"type": "string",
						"example": "John Doe"
					},
					"phone": {
						"type": "string",
						"nullable": true,
						"example": "905301234567"
					},
					"lid": {
						"type": "string",
						"example": "123456789012345@lid"
					},
					"username": {
						"type": "string",
						"nullable": true,
						"example": "john_doe"
					},
					"keyRequired": {
						"type": "boolean",
						"example": false
					}
				}
			},
			"messageResponse": {
				"type": "object",
				"properties": {
					"timestamp": {
						"type": "string",
						"example": "1704702074"
					},

					"uid": {
						"type": "string",
						"example": "905301234567@c.us"
					},
					"username": {
						"type": "string",
						"description": "Only present when the user has a WhatsApp username.",
						"example": "john_doe"
					},
					"fromMe": {
						"type": "boolean",
						"example": true
					},
					"message": {
						"type": "object",
						"properties": {
							"type": {
								"type": "string",
								"example": "text"
							},
							"text": {
								"type": "string",
								"example": "example"
							},
							"id": {
								"type": "string",
								"example": "true_905301234567@g.us_3EB068A6C810F320CDB538_905301234567@c.us"
							},
							"_serialized": {
								"type": "string",
								"example": "true_905301234567@g.us_3EB068A6C810F320CDB538_905301234567@c.us"
							}
						}
					}
				}
			},
			"questionResponseItem": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"example": "text"
					},
					"text": {
						"type": "string",
						"example": "Answer text"
					},
					"id": {
						"type": "string",
						"example": "false_120363204759413821@newsletter_3EB0D92D032BAB41253473"
					},
					"_serialized": {
						"type": "string",
						"example": "false_120363204759413821@newsletter_3EB0D92D032BAB41253473"
					},
					"timestamp": {
						"type": "integer",
						"example": 1704702074
					},
					"user": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"nullable": true,
								"example": "905301234567@c.us"
							},
							"name": {
								"type": "string",
								"example": "John Doe"
							},
							"phone": {
								"type": "string",
								"nullable": true,
								"example": "905301234567"
							}
						}
					}
				}
			},
			"quizResponseOption": {
				"type": "object",
				"properties": {
					"name": {
						"type": "string",
						"example": "Paris"
					},
					"id": {
						"type": "integer",
						"example": 1
					},
					"votes": {
						"type": "integer",
						"example": 2
					},
					"voters": {
						"type": "array",
						"items": {
							"type": "string",
							"example": "905301234567@c.us"
						}
					}
				}
			},
			"channelMessageResponse": {
				"type": "object",
				"properties": {
					"timestamp": {
						"type": "string",
						"example": "1704702074"
					},

					"uid": {
						"type": "string",
						"example": "120363204127231552@newsletter"
					},
					"fromMe": {
						"type": "boolean",
						"example": true
					},
					"message": {
						"type": "object",
						"properties": {
							"type": {
								"type": "string",
								"example": "text"
							},
							"text": {
								"type": "string",
								"example": "example"
							},
							"id": {
								"type": "string",
								"example": "true_120363204759413821@newsletter_3EB068A6C810F320CDB538"
							},
							"_serialized": {
								"type": "string",
								"example": "true_120363204759413821@newsletter_3EB068A6C810F320CDB538"
							},
							"responses": {
								"type": "array",
								"items": { "$ref": "#/components/schemas/questionResponseItem" }
							},
							"total": {
								"type": "integer",
								"example": 2
							},
							"options": {
								"type": "array",
								"items": { "$ref": "#/components/schemas/quizResponseOption" }
							},
							"correct_option": { "type": "integer", "example": 1 },
							"total_votes": { "type": "integer", "example": 2 },
							"correct_votes": { "type": "integer", "example": 2 }
						}
					},
					"reactions": {
						"type": "array",
						"items": {
							"type": "object",
							"additionalProperties": {
								"type": "number"
							}
						},
						"example": [
							{
								"👍": 30
							},
							{
								"👏": 20
							}
						]
					},
					"totalReactionCount": {
						"type": "integer",
						"example": 5
					}
				}
			},
			"channelData": {
				"type": "object",
				"properties": {
					"id": {
						"type": "object",
						"properties": {
							"server": {
								"type": "string",
								"example": "newsletter"
							},
							"user": {
								"type": "string",
								"example": "120363204127231552"
							},
							"_serialized": {
								"type": "string",
								"example": "120363204127231552@newsletter"
							}
						}
					},
					"channelName": {
						"type": "string",
						"example": "Channel Name"
					},
					"owner": {
						"type": "boolean",
						"example": true
					},
					"subscribeCount": {
						"type": "integer",
						"example": 2
					},
					"inviteLink": {
						"type": "string",
						"example": "https://whatsapp.com/channel/0029VaFF3v04inomA6kM6M0z"
					}
				}
			},
			"createChannel": {
				"type": "object",
				"properties": {
					"channelId": { "type": "string", "example": "120363204759413821@newsletter" },
					"channelName": { "type": "string", "example": "Channel Name" }
				}
			},
			"product-id": { "type": "string", "example": "dc01968f-####-####-####-7cfcf51aa423" },
			"phone-id": { "type": "string", "example": "25312" },
			"conversation-id": { "type": "string", "example": "905301234567@c.us" },
			"message-id": {
				"type": "string",
				"example": "3EB081AF26FADE6416D8"
			},
			"parent-message-id": {
				"type": "string",
				"example": "7EB065B353B9493D00G2"
			},
			"message-quoted-data": {
				"nullable": true,
				"allOf": [
					{ "$ref": "#/components/schemas/message-data" },
					{
						"type": "object",
						"properties": {
							"user": {
								"$ref": "#/components/schemas/incomingMessageUserData"
							},
							"timestamp": { "type": "integer", "example": 1574098389 }
						}
					}
				],
				"example": {
					"id": "3EB081AF26FADE6416D8",
					"type": "text",
					"text": "Message Text",
					"user": {
						"id": "905301234567@c.us",
						"name": "UserName",
						"phone": "905301234567",
						"image": "https://pps.whatsapp.net/v/...."
					},
					"timestamp": 1574098389
				}
			},
			"message-data": {
				"type": "object",
				"oneOf": [
					{ "$ref": "#/components/schemas/text-message" },
					{ "$ref": "#/components/schemas/mention-message" },
					{ "$ref": "#/components/schemas/media-message" },
					{ "$ref": "#/components/schemas/motion-photo-message" },
					{ "$ref": "#/components/schemas/comment-message" },
					{ "$ref": "#/components/schemas/location-message" },
					{ "$ref": "#/components/schemas/vcard-message" },
					{ "$ref": "#/components/schemas/multi-vcard-message" },
					{ "$ref": "#/components/schemas/info-message" },
					{ "$ref": "#/components/schemas/label-message" }
				],
				"example": {
					"id": "3EB081AF26FADE6416D8",
					"type": "text",
					"text": "Message Text",
					"fromMe": false,
					"mentions": []
				}
			},
			"text-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "text"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"text": { "type": "string", "example": "Message Text Content" },
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"mention-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "text"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"text": { "type": "string", "example": "Message @905301234567 Text Content" },
					"fromMe": { "type": "boolean", "example": false },
					"mentions": {
						"type": "array",
						"description": "Array of mentioned contact IDs in the message (e.g. '905301234567@c.us'). When the message mentions everyone in the group, the array also contains the string 'all'. Example: [\"905301234567@c.us\", \"all\"]. This applies to both received messages and your own sent messages (fromMe: true).",
						"items": {
							"type": "string",
							"example": "905301234567@c.us"
						},
						"example": ["905301234567@c.us", "all"]
					}
				}
			},
			"message-edit": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "message_edit"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"parentMsgId": { "$ref": "#/components/schemas/parent-message-id" },
					"fromMe": { "type": "boolean", "example": false },
					"newText": {
						"type": "string",
						"description": "New text content (for text messages)"
					},
					"prevText": {
						"type": "string",
						"description": "Previous text content (for text messages)"
					},
					"newCaption": {
						"type": "string",
						"description": "New caption (for media messages)"
					},
					"prevCaption": {
						"type": "string",
						"description": "Previous caption (for media messages)"
					}
				}
			},
			"media-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"enum": ["image", "video", "document", "ptt", "sticker", "gif", "ptv", "audio"],
						"example": "image"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"url": { "type": "string", "example": "https://cdn.maytapi.com/flow/########.jpeg" },
					"caption": { "type": "string", "example": "Media Caption Text" },
					"filename": { "type": "string", "example": "wa-media-########.jpeg" },
					"mime": { "type": "string", "example": "image/jpeg" },
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"motion-photo-message": {
				"type": "object",
				"description": "Motion photo (Android Motion Photo / iPhone Live Photo). Delivered as a single image message: 'url' is the still photo, 'motionUrl' is the short mp4 of the moving part.",
				"properties": {
					"type": {
						"type": "string",
						"default": "image"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"url": { "type": "string", "example": "https://cdnydm.com/wh_new/########.jpeg" },
					"caption": { "type": "string", "example": "Media Caption Text" },
					"filename": { "type": "string", "example": "false_905301234567@c.us_3EB0A81ECEA6D47F2F13.jpeg" },
					"mime": { "type": "string", "example": "image/jpeg" },
					"isMotion": {
						"type": "boolean",
						"description": "Always true for motion photos.",
						"example": true
					},
					"motionUrl": {
						"type": "string",
						"description": "URL of the moving part (mp4). Only present when it could be retrieved.",
						"example": "https://cdnydm.com/wh_new/########.mp4"
					},
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"comment-message": {
				"type": "object",
				"description": "Announcement-group (channel) message that has comments. Comments are not delivered as separate messages; they are listed under the parent message.",
				"properties": {
					"type": {
						"type": "string",
						"default": "text"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"text": { "type": "string", "example": "Message Text Content" },
					"fromMe": { "type": "boolean", "example": false },
					"replyCount": {
						"type": "integer",
						"example": 1,
						"description": "Number of comments on this message."
					},
					"comments": {
						"type": "array",
						"description": "Sorted by timestamp ascending.",
						"items": {
							"type": "object",
							"properties": {
								"type": {
									"type": "string",
									"example": "comment"
								},
								"text": {
									"type": "string",
									"example": "Great news!"
								},
								"id": {
									"type": "string",
									"example": "true_120363349826218857@g.us_3EB0A81ECEA6D47F2F13_905301234567@c.us"
								},
								"_serialized": {
									"type": "string",
									"example": "true_120363349826218857@g.us_3EB0A81ECEA6D47F2F13_905301234567@c.us"
								},
								"user": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"example": "905301234567@c.us"
										},
										"name": {
											"type": "string",
											"example": "John Doe"
										},
										"phone": {
											"type": "string",
											"example": "905301234567"
										}
									}
								},
								"timestamp": {
									"type": "integer",
									"example": 1704702074
								}
							}
						}
					}
				}
			},
			"info-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"example": "info"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"subtype": {
						"type": "string",
						"enum": [
							"group/promote",
							"group/demote",
							"group/add",
							"group/remove",
							"group/invite",
							"group/leave",
							"group/modify",
							"group/name",
							"group/description",
							"group/restrict",
							"group/announce",
							"group/member_add_mode",
							"group/membership_approval_mode",
							"group/revoke_invite",
							"call/miss",
							"call/reject",
							"call/accept",
							"call/ringing",
							"label/add",
							"label/remove",
							"chat/disappearing"
						],
						"example": "group/add"
					},
					"participant": { "type": "string", "example": "905301234567@c.us" },
					"ephemeral": { "type": "integer", "example": 604800 }
				}
			},
			"label-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "info"
					},
					"subtype": {
						"type": "string",
						"enum": ["label/add", "label/remove"],
						"example": "label/add"
					},
					"id": {
						"type": "string",
						"example": "true_905301234567@c.us_LABELADD845838T1790935070_908501234567@c.us"
					},
					"_serialized": {
						"type": "string",
						"example": "true_905301234567@c.us_LABELADD845838T1790935070_908501234567@c.us"
					},
					"fromMe": {
						"type": "boolean",
						"example": true
					},
					"label": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"example": "845838"
							},
							"name": {
								"type": "string",
								"example": "Order complete"
							},
							"color": {
								"type": "string",
								"example": "#F0B330"
							},
							"colorIndex": {
								"type": "integer",
								"example": 5
							}
						}
					}
				}
			},
			"group-invite-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "group_invite"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"inviteCode": {
						"type": "string",
						"description": "Single invite code",
						"example": "b8x9291cC9uyDQxdduDpbf"
					},
					"inviteLink": {
						"type": "string",
						"description": "Single invite link",
						"example": "https://chat.whatsapp.com/b8x9291cC9uyDQxdduDpbf"
					},
					"invites": {
						"type": "array",
						"description": "Array of multiple invites",
						"items": {
							"type": "object",
							"properties": {
								"inviteCode": {
									"type": "string",
									"description": "Invite code"
								},
								"inviteLink": {
									"type": "string",
									"description": "Invite link"
								}
							}
						}
					},
					"text": {
						"type": "string"
					},
					"fromMe": {
						"type": "boolean",
						"example": false
					},
					"_serialized": {
						"type": "string",
						"example": "true_905301234567@g.us_3EB068A6C810F320CDB538_905301234567@c.us"
					}
				}
			},
			"group-invite-v4-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "group_invite_v4"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"inviteCode": {
						"type": "string",
						"default": "b8x9291cC9uyDQxdduDpbf"
					},
					"inviteCodeExp": {
						"type": "string",
						"default": "1728910206"
					},
					"inviteGrp": {
						"type": "string",
						"default": "905301234567-1574073754@g.us"
					},
					"from": {
						"type": "string",
						"default": "905301234567"
					},
					"text": {
						"type": "string",
						"default": "text"
					}
				}
			},
			"event-creation message": {
				"type": "object",
				"properties": {
					"type": { "type": "string", "default": "event_creation" },
					"id": { "$ref": "#/components/schemas/message-id" },
					"eventName": {
						"type": "string",
						"default": "event"
					},
					"eventStartTime": {
						"type": "string",
						"default": "1728910206"
					},
					"eventEndTime": {
						"type": "string",
						"default": "1728985800",
						"description": "Event end time as Unix timestamp (only present if end time is set)"
					},
					"eventCallType": {
						"type": "string",
						"enum": ["video", "voice"],
						"default": "video",
						"description": "Type of the event call - either video or voice"
					},
					"eventJoinLink": {
						"type": "string",
						"format": "uri",
						"pattern": "^https://call\\.whatsapp\\.com/(voice|video)/[A-Za-z0-9]+$",
						"description": "WhatsApp call link for joining the event (e.g., https://call.whatsapp.com/voice/...)"
					},
					"isEventCanceled": {
						"type": "boolean",
						"enum": [true, false],
						"default": false,
						"description": "Whether the event has been canceled"
					},
					"eventLocation": {
						"type": "string",
						"description": "Location of the event (only present if location is set)"
					},
					"eventParticipants": {
						"type": "object",
						"properties": {
							"going": {
								"type": "array",
								"items": {
									"type": "string"
								},
								"description": "List of participant IDs who confirmed attendance"
							},
							"notGoing": {
								"type": "array",
								"items": {
									"type": "string"
								},
								"description": "List of participant IDs who declined attendance"
							},
							"maybe": {
								"type": "array",
								"items": {
									"type": "string"
								},
								"description": "List of participant IDs with uncertain attendance"
							}
						},
						"description": "Event participants categorized by their response status"
					}
				}
			},
			"event-response message": {
				"type": "object",
				"properties": {
					"type": { "type": "string", "default": "event_response" },
					"id": { "$ref": "#/components/schemas/message-id" },
					"fromMe": { "type": "boolean", "example": false },
					"eventResponse": {
						"type": "string",
						"enum": ["going", "maybe", "notGoing"],
						"description": "User's response to the event invitation"
					}
				}
			},
			"channel-invite-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "channel_invite"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"inviteCode": {
						"type": "string",
						"description": "Single invite code",
						"example": "0029VasEb6g7oQhU2tLvhV"
					},
					"inviteLink": {
						"type": "string",
						"description": "Single invite link",
						"example": "https://whatsapp.com/channel/0029VasEb6g7oQhU2tL"
					},
					"invites": {
						"type": "array",
						"description": "Array of multiple invites",
						"items": {
							"type": "object",
							"properties": {
								"inviteCode": {
									"type": "string",
									"description": "Invite code"
								},
								"inviteLink": {
									"type": "string",
									"description": "Invite link"
								}
							}
						}
					},
					"text": {
						"type": "string",
						"default": "text"
					},
					"fromMe": {
						"type": "boolean",
						"example": false
					}
				}
			},
			"channel-admin-invite-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "channel_admin_invite"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"inviteCodeExp": {
						"type": "number",
						"description": "Invite code expiration timestamp",
						"example": 1752747875
					},
					"channelId": {
						"type": "string",
						"description": "Channel ID",
						"example": "120363419813552685@newsletter"
					},
					"text": {
						"type": "string",
						"description": "Admin invite message text"
					},
					"fromMe": {
						"type": "boolean",
						"example": false
					}
				}
			},
			"story-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "text"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"text": { "type": "string", "example": "Story answer content" },
					"storyId": { "type": "string", "example": "true_status@broadcast_3EB00968DB76C3F4593410_905301234567@c.us" },
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"reaction-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "reaction"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"parentMsgId": { "$ref": "#/components/schemas/parent-message-id" },
					"reaction": { "type": "string", "example": "😀" },
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"poll-vote-update-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "pollVoteUpdate"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"parentMsgId": { "$ref": "#/components/schemas/parent-message-id" },
					"currentVoteOption": {
						"type": "object",
						"properties": {
							"id": { "type": "integer", "example": 1 },
							"name": { "type": "string", "example": "a" },
							"votes": { "type": "integer", "example": 1 }
						}
					},
					"only_one": { "type": "boolean", "enum": [true, false] },
					"text": { "type": "string", "example": "Poll Message" },
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"location-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "location"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"payload": { "type": "string", "example": "38.3978531,28.968876", "description": "Format: 'latitude,longitude'" }
				}
			},
			"live-location-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "locationLive"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"payload": { "type": "string", "example": "38.3978531,28.968876", "description": "Format: 'latitude,longitude'" },
					"isLive": { "type": "boolean", "example": true }
				}
			},
			"vcard-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "vcard"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"vcardList": { "type": "array", "items": { "$ref": "#/components/schemas/vcard-data" } }
				}
			},
			"multi-vcard-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "multi_vcard"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"vcardList": { "type": "array", "items": { "$ref": "#/components/schemas/vcard-data" } }
				}
			},
			"vcard-data": {
				"type": "object",
				"properties": {
					"displayName": { "type": "string", "example": "Maytapi" },
					"vcard": { "type": "string", "example": "BEGIN:VCARD\nVERSION:3.0\nN:.......END:VCARD" }
				}
			},
			"product-data": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"example": "product"
					},
					"productId": { "type": "string", "example": "2878114402238236" },
					"image": { "type": "string", "example": "https://cdn.maytapi.com/flow/########.jpeg" },
					"url": { "type": "string", "example": "https://yourwebsite.com/..." },
					"price": { "type": "integer", "example": 30 },
					"price1000": { "type": "integer", "example": 30000 },
					"title": { "type": "string", "example": "Product Name" },
					"description": { "type": "string", "example": "Product Description" },
					"retailerId": { "type": "string", "example": "Product Retailer Id" },
					"business": { "type": "string", "example": "905301234567@c.us" },
					"currency": { "type": "string", "example": "TRY" },
					"id": { "$ref": "#/components/schemas/message-id" }
				}
			},
			"label-id": { "type": "string", "example": "1" },
			"labels-data": {
				"type": "object",
				"properties": {
					"id": { "type": "string", "example": "1" },
					"name": { "type": "string", "example": "New Customer" },
					"colorIndex": { "type": "integer", "example": 1 },
					"count": { "type": "integer", "example": 1 },
					"messageCount": { "type": "integer", "example": 1 },
					"chatCount": { "type": "integer", "example": 1 },
					"orderIndex": { "type": "integer", "example": 1 },
					"predefinedId": { "type": "integer", "example": 1 },
					"isActive": { "type": "boolean", "example": true },
					"type": { "type": "integer", "example": 4 },
					"hex": { "type": "string", "example": "#54C265" }
				}
			},
			"edited-labels-data": {
				"type": "object",
				"properties": {
					"id": { "type": "string", "example": "1" },
					"name": { "type": "string", "example": "VIP Customer" },
					"colorIndex": { "type": "integer", "example": 1 },
					"count": { "type": "integer", "example": 1 },
					"messageCount": { "type": "integer", "example": 1 },
					"chatCount": { "type": "integer", "example": 1 },
					"orderIndex": { "type": "integer", "example": 1 },
					"predefinedId": { "type": "integer", "example": 1 },
					"isActive": { "type": "boolean", "example": true },
					"type": { "type": "integer", "example": 4 }
				}
			},
			"short-contact-data": {
				"type": "object",
				"properties": {
					"id": { "type": "string", "example": "905301234567@c.us" },
					"name": { "type": "string", "example": "John Doe" },
					"phone": { "type": "string", "example": "905301234567" },
					"image": { "type": "string", "example": "https://pps.whatsapp.net/v/...." },
					"username": { "type": "string", "description": "Only present when the contact has a WhatsApp username.", "example": "john_doe" }
				}
			},
			"catalog-product-data": {
				"type": "object",
				"properties": {
					"business": { "type": "string", "example": "905301234567@c.us" },
					"productId": { "type": "string", "example": "8269823289766677" },
					"title": { "type": "string", "example": "test product" },
					"description": { "type": "string", "example": "test product desc" },
					"currency": { "type": "string", "example": "USD" },
					"price1000": { "type": "integer", "example": 12000 },
					"price": { "type": "number", "example": 12 },
					"status": { "type": "string", "example": "APPROVED" },
					"image": { "type": "string", "example": "http://placehold.it/180" },
					"url": { "type": "string", "example": "http://example.com" },
					"retailerId": { "type": "string", "example": "12" },
					"additionalImageCdnUrl": {
						"type": "array",
						"items": {
							"type": "string",
							"example": "http://placehold.it/180"
						}
					}
				}
			},
			"catalog-product-detail-data": {
				"type": "object",
				"properties": {
					"id": { "type": "string", "example": "9071175429559858" },
					"isHidden": { "type": "boolean", "example": false },
					"url": { "type": "string", "example": "" },
					"name": { "type": "string", "example": "test" },
					"description": { "type": "string", "example": "test product" },
					"availability": { "type": "string", "example": "unknown" },
					"maxAvailable": { "type": "integer", "example": 99 },
					"additionalImageCdnUrl": {
						"type": "array",
						"items": { "type": "string" },
						"example": []
					},
					"additionalImageHashes": {
						"type": "array",
						"items": { "type": "string" },
						"example": []
					},
					"imageCdnUrl": {
						"type": "string",
						"example": "http://placehold.it/180"
					},
					"imageHash": { "type": "string", "example": "524946573505187" },
					"reviewStatus": { "type": "string", "example": "NO_REVIEW" },
					"currency": { "type": "string", "example": "USD" },
					"priceAmount1000": { "type": "integer", "example": 10000 },
					"salePriceAmount1000": { "type": "integer", "nullable": true, "example": null },
					"salePriceStartDate": { "type": "string", "nullable": true, "example": null },
					"salePriceEndDate": { "type": "string", "nullable": true, "example": null },
					"retailerId": { "type": "string", "example": "" },
					"productMsgMediaData": { "type": "object", "nullable": true, "example": null },
					"imageCount": { "type": "integer", "example": 1 },
					"fetchedFromServer": { "type": "boolean", "example": true },
					"videos": {
						"type": "array",
						"items": { "type": "string" },
						"example": []
					},
					"t": { "type": "number", "format": "float", "example": 1728902082.921 },
					"old": { "type": "boolean", "example": false },
					"canAppeal": { "type": "boolean", "example": true },
					"checkmark": { "type": "boolean", "example": false }
				}
			},
			"catalog-collection-data": {
				"type": "object",
				"properties": {
					"canAppeal": { "type": "boolean", "example": true },
					"id": { "type": "string", "example": "563297932720268" },
					"isHidden": { "type": "boolean", "example": false },
					"name": {
						"type": "string",
						"example": "test collection"
					},
					"products": { "type": "array", "items": { "$ref": "#/components/schemas/catalog-product-data" } }
				}
			},
			"order-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "order"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"business": { "type": "string", "example": "905301234567@c.us" },
					"title": { "type": "string", "example": "Shop Name" },
					"products": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"type": { "type": "string", "example": "product" },
								"business": { "type": "string", "example": "905301234567@c.us" },
								"productId": { "type": "string", "example": "8269823289766677" },
								"title": { "type": "string", "example": "test product" },
								"description": { "type": "string", "example": "test product desc" },
								"currency": { "type": "string", "example": "USD" },
								"price1000": { "type": "integer", "example": 12000 },
								"price": { "type": "integer", "example": 12 },
								"image": { "type": "string", "example": "http://placehold.it/180" },
								"url": { "type": "string", "example": "http://example.com" },
								"retailerId": { "type": "string", "example": "12" },
								"quantity": { "type": "integer", "example": 1 }
							}
						}
					},
					"subtotal1000": { "type": "integer", "example": 12000 },
					"subtotal": { "type": "integer", "example": 12 },
					"total1000": { "type": "integer", "example": 12000 },
					"total": { "type": "integer", "example": 12 },
					"currency": { "type": "string", "example": "USD" },
					"createdAt": { "type": "integer", "example": 1768802838 },
					"_serialized": { "type": "string" },
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"order-detail": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "order"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"business": { "type": "string", "example": "905301234567@c.us" },
					"title": { "type": "string", "example": "Shop Name" },
					"products": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"type": { "type": "string", "example": "product" },
								"business": { "type": "string", "example": "905301234567@c.us" },
								"productId": { "type": "string", "example": "8269823289766677" },
								"title": { "type": "string", "example": "test product" },
								"description": { "type": "string", "example": "test product desc" },
								"currency": { "type": "string", "example": "USD" },
								"price1000": { "type": "integer", "example": 12000 },
								"price": { "type": "integer", "example": 12 },
								"image": { "type": "string", "example": "http://placehold.it/180" },
								"url": { "type": "string", "example": "http://example.com" },
								"retailerId": { "type": "string", "example": "12" },
								"quantity": { "type": "integer", "example": 1 }
							}
						}
					},
					"subtotal1000": { "type": "integer", "example": 12000 },
					"subtotal": { "type": "integer", "example": 12 },
					"total1000": { "type": "integer", "example": 12000 },
					"total": { "type": "integer", "example": 12 },
					"currency": { "type": "string", "example": "USD" },
					"createdAt": { "type": "integer", "example": 1768802838 },
					"_serialized": { "type": "string" }
				}
			},
			"catalog-link-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "catalog_link"
					},
					"id": { "$ref": "#/components/schemas/message-id" },
					"business": { "type": "string", "example": "905301234567@c.us" },
					"title": { "type": "string", "example": "View catalog on WhatsApp" },
					"description": { "type": "string", "example": "Learn more about their products & services" },
					"url": { "type": "string", "example": "https://wa.me/c/905301234567" },
					"image": { "type": "string", "example": "http://placehold.it/180" },
					"text": { "type": "string", "example": "Check my catalog" },
					"_serialized": { "type": "string" },
					"fromMe": { "type": "boolean", "example": false }
				}
			},
			"pin-message": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"default": "pinMessage"
					},
					"id": {
						"$ref": "#/components/schemas/message-id"
					},
					"parentMsgId": {
						"$ref": "#/components/schemas/parent-message-id"
					},
					"action": {
						"type": "integer",
						"enum": [1, 2],
						"description": "1 = Pin, 2 = Unpin"
					},
					"pinned": {
						"type": "boolean",
						"description": "true when pinned, false when unpinned"
					},
					"duration": {
						"type": "integer",
						"nullable": true,
						"enum": [86400, 604800, 2592000, null],
						"description": "Pin duration in seconds. 86400 = 24 hours, 604800 = 7 days, 2592000 = 30 days. null when action is unpin."
					},
					"fromMe": {
						"type": "boolean",
						"example": false
					}
				}
			}
		}
	}
}
