{
	"info": {
		"_postman_id": "c3f6a9c2-6a1e-4c3a-9d2e-8b7f1a4e5d10",
		"name": "Atys Mensagens API",
		"description": "Coleção oficial do endpoint de envio de mensagens da API pública da Atys (POST /api/api-send-message).",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "1) Enviar Mensagem de Texto (síncrono)",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Authorization",
						"value": "Bearer {{token}}",
						"type": "text"
					},
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"platform\": \"whatsapp\",\n    \"sender_key\": \"5511999999999\",\n    \"contact_key\": \"5511988888888\",\n    \"contact_is_group\": false,\n    \"enqueue\": false,\n    \"text\": \"Olá! Como posso ajudar?\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{base_url}}/api/api-send-message",
					"host": [
						"{{base_url}}"
					],
					"path": [
						"api",
						"api-send-message"
					]
				},
				"description": "enqueue=false (default): a requisição aguarda o envio real ao WhatsApp e retorna o resultado já confirmado (ou o erro real de envio)."
			},
			"response": []
		},
		{
			"name": "2) Enviar Mensagem de Texto (assíncrono)",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Authorization",
						"value": "Bearer {{token}}",
						"type": "text"
					},
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"platform\": \"whatsapp\",\n    \"sender_key\": \"5511999999999\",\n    \"contact_key\": \"5511988888888\",\n    \"contact_is_group\": false,\n    \"enqueue\": true,\n    \"text\": \"Olá! Como posso ajudar?\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{base_url}}/api/api-send-message",
					"host": [
						"{{base_url}}"
					],
					"path": [
						"api",
						"api-send-message"
					]
				},
				"description": "enqueue=true: a resposta é imediata e confirma apenas que a mensagem foi aceita para processamento, não que foi entregue."
			},
			"response": []
		},
		{
			"name": "3) Enviar Mensagem com Arquivo",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Authorization",
						"value": "Bearer {{token}}",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "platform",
							"value": "whatsapp",
							"type": "text"
						},
						{
							"key": "sender_key",
							"value": "5511999999999",
							"type": "text"
						},
						{
							"key": "contact_key",
							"value": "5511988888888",
							"type": "text"
						},
						{
							"key": "contact_is_group",
							"value": "false",
							"type": "text"
						},
						{
							"key": "enqueue",
							"value": "false",
							"type": "text"
						},
						{
							"key": "text",
							"value": "Segue o documento solicitado",
							"type": "text"
						},
						{
							"key": "file",
							"type": "file",
							"src": []
						}
					]
				},
				"url": {
					"raw": "{{base_url}}/api/api-send-message",
					"host": [
						"{{base_url}}"
					],
					"path": [
						"api",
						"api-send-message"
					]
				},
				"description": "Envio de arquivo via multipart/form-data. Não envie o header Content-Type manualmente — o Postman/navegador define o boundary automaticamente."
			},
			"response": []
		}
	],
	"variable": [
		{
			"key": "base_url",
			"value": "https://api.atys.pro",
			"type": "string"
		},
		{
			"key": "token",
			"value": "SEU_ACCESS_TOKEN",
			"type": "string"
		}
	]
}
