{
    "info": {
        "name": "Tavros Connect WhatsApp API",
        "_postman_id": "tavros-connect-api-v1",
        "description": "Docs: https://tavrosconnect.com/docs\nSet the collection variables api_key (tc_test_… to try safely), phone_number_id and waba_id.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{api_key}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://tavrosconnect.com"
        },
        {
            "key": "api_key",
            "value": "tc_test_REPLACE_ME"
        },
        {
            "key": "phone_number_id",
            "value": "PHONE_NUMBER_ID"
        },
        {
            "key": "waba_id",
            "value": "WABA_ID"
        }
    ],
    "item": [
        {
            "name": "Send template message",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/{{phone_number_id}}/messages",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{phone_number_id}}",
                        "messages"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"messaging_product\": \"whatsapp\",\n    \"to\": \"919876543210\",\n    \"type\": \"template\",\n    \"template\": {\n        \"name\": \"payment_receipt_v1\",\n        \"language\": {\n            \"code\": \"en\"\n        },\n        \"components\": [\n            {\n                \"type\": \"body\",\n                \"parameters\": [\n                    {\n                        \"type\": \"text\",\n                        \"text\": \"Priya\"\n                    },\n                    {\n                        \"type\": \"text\",\n                        \"text\": \"2499\"\n                    }\n                ]\n            }\n        ]\n    }\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Send text message (within 24 h)",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/{{phone_number_id}}/messages",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{phone_number_id}}",
                        "messages"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"messaging_product\": \"whatsapp\",\n    \"to\": \"919876543210\",\n    \"type\": \"text\",\n    \"text\": {\n        \"body\": \"Your order is ready\"\n    }\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Mark message as read",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/{{phone_number_id}}/messages",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{phone_number_id}}",
                        "messages"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"messaging_product\": \"whatsapp\",\n    \"status\": \"read\",\n    \"message_id\": \"wamid.REPLACE\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Upload media",
            "request": {
                "method": "POST",
                "url": {
                    "raw": "{{base_url}}/api/v1/{{phone_number_id}}/media",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{phone_number_id}}",
                        "media"
                    ]
                },
                "body": {
                    "mode": "formdata",
                    "formdata": [
                        {
                            "key": "messaging_product",
                            "value": "whatsapp",
                            "type": "text"
                        },
                        {
                            "key": "type",
                            "value": "application/pdf",
                            "type": "text"
                        },
                        {
                            "key": "file",
                            "type": "file",
                            "src": ""
                        }
                    ]
                }
            }
        },
        {
            "name": "List templates",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{base_url}}/api/v1/{{waba_id}}/message_templates?limit=50",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{waba_id}}",
                        "message_templates"
                    ],
                    "query": [
                        {
                            "key": "limit",
                            "value": "50"
                        }
                    ]
                }
            }
        },
        {
            "name": "Template status",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{base_url}}/api/v1/{{waba_id}}/message_templates?name=order_ready&fields=name,language,status,category,rejected_reason",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{waba_id}}",
                        "message_templates"
                    ],
                    "query": [
                        {
                            "key": "name",
                            "value": "order_ready"
                        },
                        {
                            "key": "fields",
                            "value": "name,language,status,category,rejected_reason"
                        }
                    ]
                }
            }
        },
        {
            "name": "Create template",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/{{waba_id}}/message_templates",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{waba_id}}",
                        "message_templates"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"name\": \"order_ready\",\n    \"language\": \"en\",\n    \"category\": \"UTILITY\",\n    \"components\": [\n        {\n            \"type\": \"BODY\",\n            \"text\": \"Hi {{1}}, your order {{2}} is ready for pickup.\",\n            \"example\": {\n                \"body_text\": [\n                    [\n                        \"Rahul\",\n                        \"A-1042\"\n                    ]\n                ]\n            }\n        }\n    ]\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                },
                "description": "Needs the \"Manage templates\" key permission. Test keys only validate."
            }
        },
        {
            "name": "Edit template",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/TEMPLATE_ID",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "TEMPLATE_ID"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"components\": [\n        {\n            \"type\": \"BODY\",\n            \"text\": \"Hi {{1}}, your order {{2}} is ready for pickup.\",\n            \"example\": {\n                \"body_text\": [\n                    [\n                        \"Rahul\",\n                        \"A-1042\"\n                    ]\n                ]\n            }\n        }\n    ]\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Delete template",
            "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                    "raw": "{{base_url}}/api/v1/{{waba_id}}/message_templates?name=order_ready",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "{{waba_id}}",
                        "message_templates"
                    ],
                    "query": [
                        {
                            "key": "name",
                            "value": "order_ready"
                        }
                    ]
                }
            }
        },
        {
            "name": "Get media info",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{base_url}}/api/v1/MEDIA_ID",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "MEDIA_ID"
                    ]
                }
            }
        },
        {
            "name": "Save contacts",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/contacts",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "contacts"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"contacts\": [\n        {\n            \"phone\": \"919876543210\",\n            \"name\": \"Rahul Patil\",\n            \"tags\": [\n                \"members\"\n            ],\n            \"attrs\": {\n                \"profile_id\": \"SDG-1042\",\n                \"city\": \"Kolhapur\"\n            }\n        }\n    ]\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Message status (one wamid)",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{base_url}}/api/v1/messages/wamid.REPLACE",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "messages",
                        "wamid.REPLACE"
                    ]
                },
                "description": "Delivery lifecycle with Meta timestamps (accepted → sent → delivered → read | failed). Key permission \"Send messages\"."
            }
        },
        {
            "name": "Message status (batch, up to 100)",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/messages/status:batch",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "messages",
                        "status:batch"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"wamids\": [\n        \"wamid.REPLACE_1\",\n        \"wamid.REPLACE_2\"\n    ]\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Sweep sent messages",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{base_url}}/api/v1/messages?since=2026-11-15T00:00:00Z&status=failed&limit=100",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "messages"
                    ],
                    "query": [
                        {
                            "key": "since",
                            "value": "2026-11-15T00:00:00Z"
                        },
                        {
                            "key": "status",
                            "value": "failed"
                        },
                        {
                            "key": "limit",
                            "value": "100"
                        }
                    ]
                },
                "description": "since, until, status, to, limit, cursor (next_cursor from the previous page), order."
            }
        },
        {
            "name": "Webhook replay (by wamid)",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/webhooks/replay",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "webhooks",
                        "replay"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"wamids\": [\n        \"wamid.REPLACE\"\n    ]\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                },
                "description": "Re-sends stored status events to your webhook. Or send {\"since\":\"…\",\"until\":\"…\"} (events received in that window)."
            }
        },
        {
            "name": "Webhook delivery log",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "{{base_url}}/api/v1/webhooks/deliveries?since=2026-11-15T00:00:00Z&limit=50",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "webhooks",
                        "deliveries"
                    ],
                    "query": [
                        {
                            "key": "since",
                            "value": "2026-11-15T00:00:00Z"
                        },
                        {
                            "key": "limit",
                            "value": "50"
                        }
                    ]
                },
                "description": "Every webhook attempt we made, with the HTTP code your server returned."
            }
        },
        {
            "name": "Test mode: simulate incoming message",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/api/v1/test/inbound",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "api",
                        "v1",
                        "test",
                        "inbound"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"from\": \"919876543210\",\n    \"name\": \"Rahul\",\n    \"text\": \"Hi\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                },
                "description": "Test keys only. Delivers a fake customer message to your webhook."
            }
        }
    ]
}