{
  "info": {
    "name": "NavaPrastha API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Set the collection variable apiKey to a key from Developers in your dashboard. A read-only key can run every GET request."
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://navaprastha.in/api/v1"
    },
    {
      "key": "apiKey",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Account",
      "item": [
        {
          "name": "GET /me: Whose key this is and what it may do",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "me"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "GET /balance: The wallet and the plans",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/balance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "balance"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "GET /numbers: Your phone numbers and their lines",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/numbers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "numbers"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "GET /employees: The products on your account and how they are set up",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/employees",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "employees"
              ],
              "variable": [],
              "query": []
            }
          }
        }
      ]
    },
    {
      "name": "Leads",
      "item": [
        {
          "name": "GET /leads: List leads",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/leads?phone=&externalId=&status=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "leads"
              ],
              "variable": [],
              "query": [
                {
                  "key": "phone",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "externalId",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "POST /leads: Add or update a lead",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Ravi Kumar\",\n  \"phone\": \"98480 12345\",\n  \"externalId\": \"crm-1042\",\n  \"consent\": true,\n  \"tags\": [\n    \"vip\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/leads",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "leads"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "GET /leads/{id}: Read one lead",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/leads/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "leads",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        },
        {
          "name": "PATCH /leads/{id}: Change some fields of a lead",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"qualified\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/leads/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "leads",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        }
      ]
    },
    {
      "name": "Calls",
      "item": [
        {
          "name": "POST /calls: Place one call",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"98480 12345\",\n  \"purpose\": \"reminder\",\n  \"script\": \"Remind about tomorrow at 11 am.\",\n  \"consent\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/calls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "calls"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "GET /calls: The latest calls",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/calls?limit=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "calls"
              ],
              "variable": [],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET /calls/{id}: One call, with its transcript and outcome",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/calls/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "calls",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        }
      ]
    },
    {
      "name": "Campaigns",
      "item": [
        {
          "name": "GET /campaigns: Your campaigns",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/campaigns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "campaigns"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "POST /campaigns: Create a campaign, optionally with the people, and start it",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"April fee reminder\",\n  \"purpose\": \"reminder\",\n  \"script\": \"The April fee is due on the 10th.\",\n  \"consent\": true,\n  \"windowStart\": 600,\n  \"windowEnd\": 1080,\n  \"maxAttempts\": 2,\n  \"contacts\": [\n    {\n      \"name\": \"Anitha\",\n      \"phone\": \"98480 42345\",\n      \"amount\": \"5000\"\n    }\n  ],\n  \"start\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/campaigns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "campaigns"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "GET /campaigns/{id}: Progress and counts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/campaigns/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "campaigns",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        },
        {
          "name": "POST /campaigns/{id}/contacts: Add people to a draft or paused campaign",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"contacts\": [\n    {\n      \"name\": \"Bhavya\",\n      \"phone\": \"98480 42346\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/campaigns/:id/contacts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "campaigns",
                ":id",
                "contacts"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        },
        {
          "name": "POST /campaigns/{id}/start: Start or resume a campaign",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/campaigns/:id/start",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "campaigns",
                ":id",
                "start"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        },
        {
          "name": "POST /campaigns/{id}/pause: Pause a running campaign",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/campaigns/:id/pause",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "campaigns",
                ":id",
                "pause"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        }
      ]
    },
    {
      "name": "Do not call",
      "item": [
        {
          "name": "POST /dnc: Add a number",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"98480 12345\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/dnc",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "dnc"
              ],
              "variable": [],
              "query": []
            }
          }
        },
        {
          "name": "DELETE /dnc/{phone}: Take a number off the list",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/dnc/:phone",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "dnc",
                ":phone"
              ],
              "variable": [
                {
                  "key": "phone",
                  "value": ""
                }
              ],
              "query": []
            }
          }
        }
      ]
    },
    {
      "name": "Conversations and bookings",
      "item": [
        {
          "name": "GET /conversations: List conversations",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/conversations?channel=&status=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "conversations"
              ],
              "variable": [],
              "query": [
                {
                  "key": "channel",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET /conversations/{id}/messages: The messages of one conversation",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/conversations/:id/messages?limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "conversations",
                ":id",
                "messages"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET /appointments: Appointments the employee booked",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/appointments?status=&limit=&cursor=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "appointments"
              ],
              "variable": [],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          }
        }
      ]
    }
  ]
}
