Examples HTTP API requests

Get balance

Request:

https://api.quantumtec.eu/v1/Common/balance?X-ApiKey=testAPIkey

Response:


[
    {
    "amount": 392.50,
    "currency": "EUR"
    }
]


Send single SMS message by GET request

Request:

https://api.quantumtec.eu/v1/sms/single?X-ApiKey=testAPIkey&To=37250000000&From=INFO&Text=Test

Response:


{
"messageId": "19915880-9424-4686-a8af-54af8338b96d",
"partIds": [
    "300000001"
],
"sent": "2018-01-01T00:00:01.00000Z"
}

Sending multi-part SMS GET with the text "очень длинный текст очень длинный текст очень длинный текст очень длинный текст очень длинный текст":

https://api.quantumtec.eu/v1/sms/single?X-ApiKey=testAPIkey&To=37250000000&From=INFO&Text=очень%20длинный%20текст%20очень%20длинный%20текст%20очень%20длинный%20текст%20очень%20длинный%20текст%20очень%20длинный%20текст

Response:


{
"messageId": "24e8836d5-3f34-486f-a00f-1ba567398944",
"partIds": [
    "300000002",
    "300000003"
],
"sent": "2018-01-01T00:00:01.00000Z"
}


Receiving a message delivery report by GET request

Request:

https://api.quantumtec.eu/v1/sms/report?X-ApiKey==isdosfiBdufsd343&messageId=1 9915880-9424-4686-a8af-54af8338b96d

Response:


[
    {
    "messageId": "19915880-9424-4686-a8af-54af8338b96d",
    "to": 37250000000,
    "partId": "300000001",
    "state": 2,
    "delivered": "2018-01-01T00:00:02.00000Z",
    "errorCode": "000"
    }
]


Sending a single SMS message by POST request

Request:


POST /v1/sms/single HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
"to": "37250000000",
"text": "Test message",
"from": "INFO"
}

Response:


{
"messageId": "19905880-9404-4686-a8af-54af8888b96d",
"partIds": [
    "300000005"
],
"sent": "2018-01-01T00:00:01.00000Z"
}


Receive messages' delivery reports by POST request

Request:


POST /v1/sms/report HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
"messageId": "19905880-9404-4686-a8af-54af8888b96d"
}

Response:


[
    {
    "messageId": "19905880-9404-4686-a8af-54af8888b96d",
    "to": 37250000000,
    "partId": "300000005",
    "state": 3,
    "delivered": "2018-01-01T00:00:05.00000Z",
    "errorCode": "000"
    }
]


Sending a SMS campaign by POST request

Request:


POST /v1/sms/bulk HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
"text": "TEST MESSAGE",
"from": "INFO",
"recipients": [
    {
    "to": 37250000000
    },
    {
    "to": 37250000001
    },
    {
    "to": 37250000002
    }
]
}

Response:


{
"bulkId": "1545e7e0-ad73-1f42-831a-5345bd11d5b4"
}


Getting all messages identifiers of the campaign by POST request

Request:


POST /v1/sms/messages HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
"bulkId": "1545e7e0-ad73-1f42-831a-5345bd11d5b4"
}

Response:


{
"bulkId": "1545e7e0-ad73-1f42-831a-5345bd11d5b4",
"status": 9,
"messagesIds": [
    {
    "to": 37250000000,
    "messageId": "3d995d09-0953-48e7-866f-4a247e716293"
    },
    {
    "to": 37250000001,
    "messageId": "bcbda353-1f3c-4b00-a5cc-16b2285fcb15"
    },
    {
    "to": 37250000002,
    "messageId": "2dd91626-f019-493a-acc8-ae5f373a912b"
    }
]
}


Receive campaign's messages delivery reports by POST request

Request:


POST /v1/sms/report/bulk HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
"bulkId": "1545e7e0-ad73-1f42-831a-5345bd11d5b4"
}

Response:


{
"bulkId": "1545e7e0-ad73-1f42-831a-5345bd11d5b4",
"status": 9,
"deliveryResults": [
    {
    "messageId": "3d995d09-0953-48e7-866f-4a247e716293",
    "to": 37250000000,
    "partId": "30000006",
    "state": 2,
    "delivered": "2018-01-01T00:00:02.000",
    "errorCode": "000"
    },
    {
    "messageId": "bcbda353-1f3c-4b00-a5cc-16b2285fcb15",
    "to": 37250000001,
    "partId": "30000007",
    "state": 2,
    "delivered": "2018-01-01T00:00:07.000",
    "errorCode": "000"
    },
    {
    "messageId": "2dd91626-f019-493a-acc8-ae5f373a912b",
    "to": 37250000002,
    "partId": "30000008",
    "state": 5,
    "delivered": "2018-01-01T00:00:06.000",
    "errorCode": "000"
    }
]
}


Sending single Email

Request:


POST /v1/email/single HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
"to": "test@quantumtec.eu",
"from": "hello@quantumtec.eu",
"text": "Hello this is test message.",
"subject": "Test theme",
"isHtml": "true",
"replyTo": "info@quantumtec.eu"
}

Response:



{
    "messageId": "edebae3f-8573-48fb-a1e9-e02ea29a8616",
    "sent": "2020-02-13T14:22:49.1944256Z"
}


Sending Email campaign

Request:


POST /v1/email/bulk HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
  "from": "INFO ",
  "text": "Hello",
  "subject": "Test theme",
  "replyTo": "info@quantumtec.eu",
  "recipients": [
    {
      "to": "test@quantumtec.eu"
    },
     {
      "to": "test2@quantumtec.eu"
    }
  ]
}

Response:


{
    "bulkId": "jdfsiji4321-4442-48fb-a1e9-e02ea00a8006",
}


Sending single Viber message

Request:


POST /v1/viber/single HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
"to": "37250000000",
"from": "QuantumTec",
"text": "Hello",
"buttonText": "Test",
"buttonUrl": "https://quantumtec.eu",
"pictureUrl": "https://quantumtec.eu/quantum.png"
}

Response:



{
    "messageId": "edebae3f-8573-48fb-a1e9-e02ea29a8616",
    "sent": "2020-02-13T14:22:49.1944256Z"
}


Sending Viber campaign

Request:


POST /v1/viber/bulk HTTP/1.1
Host: api.quantumtec.eu
Content-Type: application/json
Accept: application/json
X-ApiKey: testAPIkey
Cache-Control: no-cache
{
  "from": "QuantumTec",
  "text": "Hello",
  "buttonText": "Test",
  "buttonUrl": "https://quantumtec.eu",
  "pictureUrl": "https://quantumtec.eu/quantum.png"
  "recipients": [
    {
      "to": "37250000000"
    },
     {
      "to": "37250000001"
    }
  ]
}

Response:


{
    "bulkId": "pfdofdo14-4442-48fb-a1e9-e02ea00a8006",
}