{
    "info": {
        "_postman_id": "wylto-api-collection",
        "name": "Wylto API",
        "description": "API for interacting with Wylto services.\n\n## Authentication\n\nTo authenticate requests, use the Bearer authentication scheme.\n\n1. Obtain your Bearer token from the settings page in your Wylto account.\n2. Include the token in the Authorization header:\n\n```\nAuthorization: Bearer <your_token_here>\n```",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{bearer_token}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://server.wylto.com",
            "type": "string"
        },
        {
            "key": "bearer_token",
            "value": "<your_token_here>",
            "type": "string"
        }
    ],
    "item": [
        {
            "name": "WhatsApp",
            "description": "Endpoints for sending WhatsApp messages, managing templates, and phone number details.",
            "item": [
                {
                    "name": "Send Message to Phone Number",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/wa/send",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "wa",
                                "send"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"to\": \"+919876012345\",\n  \"message\": {\n    \"type\": \"text\",\n    \"text\": {\n      \"message\": \"Hi, this is a test message\"\n    }\n  }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "description": "Send a message to a phone number.\n\nSupported message types: `text`, `template`, `image`, `document`, `video`, `audio`."
                    },
                    "response": [
                        {
                            "name": "Send Text Message",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/send",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "send"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"to\": \"+919876012345\",\n  \"message\": {\n    \"type\": \"text\",\n    \"text\": {\n      \"message\": \"Hi, this is a test message\"\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        },
                        {
                            "name": "Send Image Message",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/send",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "send"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"to\": \"+919876012345\",\n  \"message\": {\n    \"type\": \"image\",\n    \"image\": {\n      \"url\": \"https://example.com/image.jpg\",\n      \"mimeType\": \"image/jpeg\",\n      \"message\": \"Check out this image!\"\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        },
                        {
                            "name": "Send Document Message",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/send",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "send"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"to\": \"+919876012345\",\n  \"message\": {\n    \"type\": \"document\",\n    \"document\": {\n      \"url\": \"https://example.com/document.pdf\",\n      \"filename\": \"invoice.pdf\",\n      \"mimeType\": \"application/pdf\",\n      \"message\": \"Here is your invoice\"\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        },
                        {
                            "name": "Send Template Message",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/send",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "send"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"to\": \"+919876012345\",\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"example_template_name\",\n      \"language\": \"en\",\n      \"header\": {\n        \"type\": \"text\",\n        \"text\": \"Your header text here\"\n      },\n      \"body\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Your body text here\"\n        }\n      ],\n      \"buttons\": [\n        {\n          \"type\": \"your_button_type\",\n          \"payload\": \"your_button_payload\",\n          \"index\": 0\n        }\n      ]\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        },
                        {
                            "name": "Send OTP Template Message",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/send",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "send"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"to\": \"+919876012345\",\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"otp_template_name\",\n      \"language\": \"en\",\n      \"body\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"122335\"\n        }\n      ]\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        }
                    ]
                },
                {
                    "name": "Send Message to Contact",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/wa/send/:contactId",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "wa",
                                "send",
                                ":contactId"
                            ],
                            "variable": [
                                {
                                    "key": "contactId",
                                    "value": "",
                                    "description": "The ID of the contact to whom the message is being sent."
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"example_template_name\",\n      \"header\": {\n        \"type\": \"text\",\n        \"text\": \"Your header text here\"\n      },\n      \"body\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Your body text here\"\n        }\n      ],\n      \"buttons\": [\n        {\n          \"type\": \"your_button_type\",\n          \"payload\": \"your_button_payload\",\n          \"index\": 0\n        }\n      ]\n    }\n  }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "description": "Send a message to a contact by their Wylto contact ID. Only template messages are supported."
                    },
                    "response": [
                        {
                            "name": "Send Template to Contact",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/send/:contactId",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "send",
                                        ":contactId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "contactId",
                                            "value": "contact_123"
                                        }
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"example_template_name\",\n      \"header\": {\n        \"type\": \"text\",\n        \"text\": \"Your header text here\"\n      },\n      \"body\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Your body text here\"\n        }\n      ],\n      \"buttons\": [\n        {\n          \"type\": \"your_button_type\",\n          \"payload\": \"your_button_payload\",\n          \"index\": 0\n        }\n      ]\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        },
                        {
                            "name": "Send OTP to Contact",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/send/:contactId",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "send",
                                        ":contactId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "contactId",
                                            "value": "contact_123"
                                        }
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"otp_template_name\",\n      \"body\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"122335\"\n        }\n      ]\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        }
                    ]
                },
                {
                    "name": "List Templates",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/api/v1/wa/templates",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "wa",
                                "templates"
                            ]
                        },
                        "description": "Returns all WhatsApp message templates for the app's default connection."
                    },
                    "response": [
                        {
                            "name": "Templates List",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/templates",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "templates"
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "[\n  {\n    \"id\": \"123456789\",\n    \"name\": \"welcome_message\",\n    \"language\": \"en\",\n    \"category\": \"MARKETING\",\n    \"status\": \"APPROVED\",\n    \"components\": [\n      {\n        \"type\": \"BODY\",\n        \"text\": \"Hi {{1}}, welcome!\"\n      }\n    ]\n  }\n]"
                        }
                    ]
                },
                {
                    "name": "Create Template",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/wa/templates",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "wa",
                                "templates"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"name\": \"welcome_message\",\n  \"language\": \"en\",\n  \"category\": \"MARKETING\",\n  \"components\": [\n    {\n      \"type\": \"HEADER\",\n      \"format\": \"TEXT\",\n      \"text\": \"Welcome to {{1}}!\"\n    },\n    {\n      \"type\": \"BODY\",\n      \"text\": \"Hi {{1}}, thank you for joining us. We're excited to have you!\"\n    },\n    {\n      \"type\": \"FOOTER\",\n      \"text\": \"Reply STOP to unsubscribe\"\n    },\n    {\n      \"type\": \"BUTTONS\",\n      \"buttons\": [\n        {\n          \"type\": \"QUICK_REPLY\",\n          \"text\": \"Learn More\"\n        }\n      ]\n    }\n  ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "description": "Create a WhatsApp message template. Categories: MARKETING, UTILITY, AUTHENTICATION."
                    },
                    "response": [
                        {
                            "name": "Marketing Template Created",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/templates",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "templates"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"name\": \"welcome_message\",\n  \"language\": \"en\",\n  \"category\": \"MARKETING\",\n  \"components\": [\n    {\n      \"type\": \"HEADER\",\n      \"format\": \"TEXT\",\n      \"text\": \"Welcome to {{1}}!\"\n    },\n    {\n      \"type\": \"BODY\",\n      \"text\": \"Hi {{1}}, thank you for joining us. We're excited to have you!\"\n    },\n    {\n      \"type\": \"FOOTER\",\n      \"text\": \"Reply STOP to unsubscribe\"\n    },\n    {\n      \"type\": \"BUTTONS\",\n      \"buttons\": [\n        {\n          \"type\": \"QUICK_REPLY\",\n          \"text\": \"Learn More\"\n        }\n      ]\n    }\n  ]\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"123456789\",\n  \"status\": \"PENDING\",\n  \"category\": \"MARKETING\"\n}"
                        },
                        {
                            "name": "Utility Template Created",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/templates",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "templates"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"name\": \"order_confirmation\",\n  \"language\": \"en\",\n  \"category\": \"UTILITY\",\n  \"components\": [\n    {\n      \"type\": \"BODY\",\n      \"text\": \"Your order #{{1}} has been confirmed. Expected delivery: {{2}}\"\n    }\n  ]\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"987654321\",\n  \"status\": \"PENDING\",\n  \"category\": \"UTILITY\"\n}"
                        }
                    ]
                },
                {
                    "name": "Get Template Quality",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/api/v1/wa/templates/:templateId/quality",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "wa",
                                "templates",
                                ":templateId",
                                "quality"
                            ],
                            "variable": [
                                {
                                    "key": "templateId",
                                    "value": "",
                                    "description": "The ID of the template."
                                }
                            ]
                        },
                        "description": "Get template quality score. Returns the template's status and quality score."
                    },
                    "response": [
                        {
                            "name": "Template Quality",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/templates/:templateId/quality",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "templates",
                                        ":templateId",
                                        "quality"
                                    ],
                                    "variable": [
                                        {
                                            "key": "templateId",
                                            "value": "123456789"
                                        }
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"123456789\",\n  \"name\": \"welcome_message\",\n  \"status\": \"APPROVED\",\n  \"qualityScore\": \"GREEN\"\n}"
                        }
                    ]
                },
                {
                    "name": "Get Phone Number Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/api/v1/wa/phone-number",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "wa",
                                "phone-number"
                            ]
                        },
                        "description": "Returns details about the WhatsApp phone number including quality rating and messaging limits."
                    },
                    "response": [
                        {
                            "name": "Phone Number Details",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{base_url}}/api/v1/wa/phone-number",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "wa",
                                        "phone-number"
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"verified_name\": \"My Business\",\n  \"display_phone_number\": \"+1234567890\",\n  \"quality_rating\": \"GREEN\",\n  \"messaging_limit_tier\": \"TIER_10K\",\n  \"platform_type\": \"CLOUD_API\",\n  \"throughput\": {\n    \"level\": \"STANDARD\"\n  },\n  \"code_verification_status\": \"VERIFIED\",\n  \"last_onboarded_time\": \"2024-01-01T00:00:00Z\",\n  \"id\": \"180876681785984\"\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Contact",
            "description": "Endpoints for managing contacts.",
            "item": [
                {
                    "name": "Get Contact by ID",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/api/v1/contact/:contactId",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "contact",
                                ":contactId"
                            ],
                            "variable": [
                                {
                                    "key": "contactId",
                                    "value": "",
                                    "description": "The ID of the contact to fetch."
                                }
                            ]
                        },
                        "description": "Fetch a contact by their Wylto contact ID."
                    },
                    "response": [
                        {
                            "name": "Contact Found",
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"wylto-contact-id-456\",\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john@example.com\"\n}"
                        }
                    ]
                },
                {
                    "name": "Get Contact by Phone Number",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/api/v1/contact?phoneNumber=919876012345",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "contact"
                            ],
                            "query": [
                                {
                                    "key": "phoneNumber",
                                    "value": "919876012345",
                                    "description": "Phone number to look up the contact by. '+' is auto-prepended if missing; minimum 10 digits."
                                }
                            ]
                        },
                        "description": "Fetch a contact by phone number. The number is normalized before lookup."
                    },
                    "response": [
                        {
                            "name": "Contact Found",
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"wylto-contact-id-456\",\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john@example.com\"\n}"
                        }
                    ]
                },
                {
                    "name": "Create Contact",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/contact",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "contact"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john@example.com\",\n  \"utm\": {\n    \"source\": \"google\",\n    \"medium\": \"cpc\",\n    \"campaign\": \"diwali_sale\"\n  }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "description": "Create a new contact in Wylto."
                    },
                    "response": [
                        {
                            "name": "Contact Created",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/contact",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "contact"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john@example.com\"\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"wylto-contact-id-456\",\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john@example.com\",\n  \"createdAt\": 1704067200000,\n  \"updatedAt\": 1704067200000\n}"
                        }
                    ]
                },
                {
                    "name": "Update Contact",
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/contact/:contactId",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "contact",
                                ":contactId"
                            ],
                            "variable": [
                                {
                                    "key": "contactId",
                                    "value": "",
                                    "description": "The ID of the contact to update."
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"id\": \"wylto-contact-id-456\",\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe Updated\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john.updated@example.com\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "description": "Update an existing contact by their Wylto contact ID."
                    },
                    "response": [
                        {
                            "name": "Contact Updated",
                            "originalRequest": {
                                "method": "PUT",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/contact/:contactId",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "contact",
                                        ":contactId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "contactId",
                                            "value": "wylto-contact-id-456"
                                        }
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"id\": \"wylto-contact-id-456\",\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe Updated\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john.updated@example.com\"\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"wylto-contact-id-456\",\n  \"externalId\": \"your-system-id-123\",\n  \"name\": \"John Doe Updated\",\n  \"phoneNumber\": \"+919876012345\",\n  \"email\": \"john.updated@example.com\",\n  \"createdAt\": 1704067200000,\n  \"updatedAt\": 1704153600000\n}"
                        }
                    ]
                },
                {
                    "name": "Delete Contact",
                    "request": {
                        "method": "DELETE",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/api/v1/contact/:contactId",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "contact",
                                ":contactId"
                            ],
                            "variable": [
                                {
                                    "key": "contactId",
                                    "value": "",
                                    "description": "The ID of the contact to delete."
                                }
                            ]
                        },
                        "description": "Delete a contact by their Wylto contact ID."
                    },
                    "response": [
                        {
                            "name": "Contact Deleted",
                            "originalRequest": {
                                "method": "DELETE",
                                "url": {
                                    "raw": "{{base_url}}/api/v1/contact/:contactId",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "contact",
                                        ":contactId"
                                    ],
                                    "variable": [
                                        {
                                            "key": "contactId",
                                            "value": "wylto-contact-id-456"
                                        }
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"success\": true\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Campaigns",
            "description": "Endpoints for creating campaigns and viewing campaign reports.",
            "item": [
                {
                    "name": "Create Campaign",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/campaigns",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "campaigns"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"campaignName\": \"January Promo\",\n  \"contacts\": [\n    {\n      \"name\": \"John Doe\",\n      \"phoneNumber\": \"+1234567890\"\n    },\n    {\n      \"name\": \"Jane Smith\",\n      \"phoneNumber\": \"+0987654321\"\n    }\n  ],\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"promo_offer\",\n      \"language\": \"en\",\n      \"body\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"20%\"\n        }\n      ]\n    }\n  }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "description": "Creates a campaign and sends messages to the provided contacts. Only CSV type campaigns are supported via API."
                    },
                    "response": [
                        {
                            "name": "Template Campaign Created",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/campaigns",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "campaigns"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"campaignName\": \"January Promo\",\n  \"contacts\": [\n    {\n      \"name\": \"John Doe\",\n      \"phoneNumber\": \"+1234567890\"\n    },\n    {\n      \"name\": \"Jane Smith\",\n      \"phoneNumber\": \"+0987654321\"\n    }\n  ],\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"promo_offer\",\n      \"language\": \"en\",\n      \"body\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"20%\"\n        }\n      ]\n    }\n  }\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"campaign-abc123\",\n  \"name\": \"January Promo\",\n  \"type\": \"csv\",\n  \"status\": \"scheduled\",\n  \"channel\": \"whatsapp\",\n  \"count\": 2,\n  \"sent\": 0,\n  \"delivered\": 0,\n  \"read\": 0,\n  \"failed\": 0,\n  \"createdAt\": 1704067200000\n}"
                        },
                        {
                            "name": "MM Lite Campaign Created",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{base_url}}/api/v1/campaigns",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "campaigns"
                                    ]
                                },
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"campaignName\": \"Flash Sale\",\n  \"contacts\": [\n    {\n      \"name\": \"John Doe\",\n      \"phoneNumber\": \"+1234567890\"\n    }\n  ],\n  \"message\": {\n    \"type\": \"template\",\n    \"template\": {\n      \"templateName\": \"flash_sale\",\n      \"language\": \"en\"\n    }\n  },\n  \"isMMLite\": true,\n  \"ttl\": 86400\n}"
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"id\": \"campaign-def456\",\n  \"name\": \"Flash Sale\",\n  \"type\": \"csv\",\n  \"status\": \"scheduled\",\n  \"channel\": \"whatsapp\",\n  \"count\": 1,\n  \"sent\": 0,\n  \"delivered\": 0,\n  \"read\": 0,\n  \"failed\": 0,\n  \"createdAt\": 1704067200000\n}"
                        }
                    ]
                },
                {
                    "name": "Get Campaign Report",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/api/v1/campaigns/:campaignId/report",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "campaigns",
                                ":campaignId",
                                "report"
                            ],
                            "variable": [
                                {
                                    "key": "campaignId",
                                    "value": "",
                                    "description": "The ID of the campaign."
                                }
                            ]
                        },
                        "description": "Returns campaign details and all message delivery statuses."
                    },
                    "response": [
                        {
                            "name": "Campaign Report",
                            "originalRequest": {
                                "method": "GET",
                                "url": {
                                    "raw": "{{base_url}}/api/v1/campaigns/:campaignId/report",
                                    "host": [
                                        "{{base_url}}"
                                    ],
                                    "path": [
                                        "api",
                                        "v1",
                                        "campaigns",
                                        ":campaignId",
                                        "report"
                                    ],
                                    "variable": [
                                        {
                                            "key": "campaignId",
                                            "value": "abc123"
                                        }
                                    ]
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"campaign\": {\n    \"id\": \"abc123\",\n    \"name\": \"January Promo\",\n    \"type\": \"csv\",\n    \"status\": \"completed\",\n    \"channel\": \"whatsapp\",\n    \"count\": 100,\n    \"sent\": 95,\n    \"delivered\": 90,\n    \"read\": 50,\n    \"failed\": 5,\n    \"createdAt\": 1704067200000\n  },\n  \"messages\": [\n    {\n      \"id\": \"msg123\",\n      \"name\": \"John Doe\",\n      \"phoneNumber\": \"+1234567890\",\n      \"state\": \"delivered\",\n      \"buttonClicks\": [],\n      \"createdAt\": 1704067200000\n    },\n    {\n      \"id\": \"msg124\",\n      \"name\": \"Jane Smith\",\n      \"phoneNumber\": \"+0987654321\",\n      \"state\": \"failed\",\n      \"error\": \"131026- Message undeliverable\",\n      \"buttonClicks\": [],\n      \"createdAt\": 1704067200000\n    }\n  ]\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Webhooks",
            "description": "Webhook payloads sent by Wylto to your server.",
            "item": [
                {
                    "name": "On New Message (Webhook Payload)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{your_webhook_url}}",
                            "host": [
                                "{{your_webhook_url}}"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"contactId\": \"wylto-contact-id\",\n  \"clientContactId\": \"your-system-contact-id\",\n  \"conversationId\": \"wylto-conversation-id\",\n  \"clientMessageId\": \"your-system-message-id\",\n  \"message\": {\n    \"from\": \"+919876012345\",\n    \"id\": \"wamid.abc123\",\n    \"timestamp\": \"2024-01-01T00:00:00Z\",\n    \"type\": \"text\",\n    \"text\": {\n      \"body\": \"Hello!\"\n    }\n  }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "description": "This is the payload Wylto sends to your webhook URL when a new message is received. This request is for reference — you don't call this endpoint; Wylto calls yours."
                    },
                    "response": [
                        {
                            "name": "Webhook Acknowledged",
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "body": "{\n  \"message\": \"Event received\"\n}"
                        }
                    ]
                }
            ]
        }
    ]
}