{
  "info": {
    "name": "SendSMS API 1.0.4",
    "_postman_id": "6d6f2c1e-5e1d-4c1b-9a59-5e0d5a1b2c3d",
    "description": "Generated from https://docs.sendsms.to/openapi.json",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.sendsms.to"
    },
    {
      "key": "apiKey",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Messages",
      "item": [
        {
          "name": "Send an SMS",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/messages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "messages"
              ],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"channel\": \"sms\",\n  \"to\": \"994XXXXXXXXX\",\n  \"from\": \"APPROVED_SENDER\",\n  \"text\": \"Your order is ready\",\n  \"trafficClass\": \"transactional\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "POST /v1/messages\n\nhttps://docs.sendsms.to/en/api/send-sms/"
          }
        },
        {
          "name": "Message status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/messages/:message_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "messages",
                ":message_id"
              ],
              "variable": [
                {
                  "key": "message_id",
                  "value": "MESSAGE_ID"
                }
              ]
            },
            "description": "GET /v1/messages/{id}\n\nhttps://docs.sendsms.to/en/api/message-status/"
          }
        },
        {
          "name": "Message statuses",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/messages/statuses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "messages",
                "statuses"
              ],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"MESSAGE_ID\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "POST /v1/messages/statuses\n\nhttps://docs.sendsms.to/en/api/message-statuses/"
          }
        },
        {
          "name": "Batch SMS sending",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/messages/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "messages",
                "batch"
              ],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    {\n      \"idempotencyKey\": \"order-1001-sms\",\n      \"message\": {\n        \"channel\": \"sms\",\n        \"to\": \"994XXXXXXXXX\",\n        \"from\": \"APPROVED_SENDER\",\n        \"text\": \"Your order is ready\",\n        \"trafficClass\": \"transactional\"\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "POST /v1/messages/batch\n\nhttps://docs.sendsms.to/en/api/batch-send/"
          }
        }
      ]
    },
    {
      "name": "Scenarios",
      "item": [
        {
          "name": "Scenario event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/scenarios/:scenario_id/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "scenarios",
                ":scenario_id",
                "events"
              ],
              "variable": [
                {
                  "key": "scenario_id",
                  "value": "SCENARIO_ID"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"994XXXXXXXXX\",\n  \"variables\": {\n    \"order_id\": \"A-10492\",\n    \"place\": \"12 Nizami St\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "POST /v1/scenarios/{id}/events\n\nhttps://docs.sendsms.to/en/api/scenario-event/"
          }
        },
        {
          "name": "Scenario event state",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/scenarios/:scenario_id/events/:event_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "scenarios",
                ":scenario_id",
                "events",
                ":event_id"
              ],
              "variable": [
                {
                  "key": "scenario_id",
                  "value": "SCENARIO_ID"
                },
                {
                  "key": "event_id",
                  "value": "EVENT_ID"
                }
              ]
            },
            "description": "GET /v1/scenarios/{id}/events/{eventId}\n\nhttps://docs.sendsms.to/en/api/scenario-event-state/"
          }
        }
      ]
    },
    {
      "name": "Templates",
      "item": [
        {
          "name": "Create a template",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "templates"
              ],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Order ready\",\n  \"body\": \"Order {{order_id}} is ready\",\n  \"variables\": [\n    {\n      \"name\": \"order_id\",\n      \"sample\": \"A-10492\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "POST /v1/templates\n\nhttps://docs.sendsms.to/en/api/create-template/"
          }
        },
        {
          "name": "List templates",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "templates"
              ],
              "variable": []
            },
            "description": "GET /v1/templates\n\nhttps://docs.sendsms.to/en/api/list-templates/"
          }
        },
        {
          "name": "Template variables",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/templates/variables",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "templates",
                "variables"
              ],
              "variable": []
            },
            "description": "GET /v1/templates/variables\n\nhttps://docs.sendsms.to/en/api/template-variables/"
          }
        },
        {
          "name": "Read a template",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/templates/:template_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "templates",
                ":template_id"
              ],
              "variable": [
                {
                  "key": "template_id",
                  "value": "TEMPLATE_ID"
                }
              ]
            },
            "description": "GET /v1/templates/{id}\n\nhttps://docs.sendsms.to/en/api/get-template/"
          }
        },
        {
          "name": "Update a template",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/templates/:template_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "templates",
                ":template_id"
              ],
              "variable": [
                {
                  "key": "template_id",
                  "value": "TEMPLATE_ID"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"body\": \"Order {{order_id}} is ready for pickup\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "PUT /v1/templates/{id}\n\nhttps://docs.sendsms.to/en/api/update-template/"
          }
        },
        {
          "name": "Archive a template",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/templates/:template_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "templates",
                ":template_id"
              ],
              "variable": [
                {
                  "key": "template_id",
                  "value": "TEMPLATE_ID"
                }
              ]
            },
            "description": "DELETE /v1/templates/{id}\n\nhttps://docs.sendsms.to/en/api/archive-template/"
          }
        },
        {
          "name": "Preview a template",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/templates/:template_id/preview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "templates",
                ":template_id",
                "preview"
              ],
              "variable": [
                {
                  "key": "template_id",
                  "value": "TEMPLATE_ID"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"variables\": {\n    \"order_id\": \"A-10492\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "POST /v1/templates/{id}/preview\n\nhttps://docs.sendsms.to/en/api/preview-template/"
          }
        }
      ]
    },
    {
      "name": "Sender IDs",
      "item": [
        {
          "name": "List Sender IDs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/senders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "senders"
              ],
              "variable": []
            },
            "description": "GET /v1/senders\n\nhttps://docs.sendsms.to/en/api/list-senders/"
          }
        },
        {
          "name": "Read a Sender ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/senders/:sender_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "senders",
                ":sender_id"
              ],
              "variable": [
                {
                  "key": "sender_id",
                  "value": "SENDER_ID"
                }
              ]
            },
            "description": "GET /v1/senders/{id}\n\nhttps://docs.sendsms.to/en/api/get-sender/"
          }
        }
      ]
    },
    {
      "name": "Balance",
      "item": [
        {
          "name": "Money balance & SMS credits",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/balance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "balance"
              ],
              "variable": []
            },
            "description": "GET /v1/balance\n\nhttps://docs.sendsms.to/en/api/balance/"
          }
        }
      ]
    }
  ]
}
