Bitel
2.0.0
2.0.0
  • Introduction
  • Authorization
  • API Structure
  • General API Errors
  • SMS
    • Introduction
    • Template SMS
    • OTP SMS
    • Single SMS
    • Batch SMS
    • Batch P2P SMS
    • SMS Status
  • Call
    • Introduction
    • OTP Call
    • Single Call
    • Single TTS Call
    • Batch Call
    • Batch TTS Call
    • Call Status
  • Webhook
    • Sms Webhook Events
    • Voice Webhook Events
  • Files
    • Introduction
    • Upload Voice
    • Text To Speech
    • Download Voice
  • Code Samples
    • C#
    • PHP
    • Python
Powered by GitBook
On this page

Was this helpful?

  1. SMS

Batch P2P SMS

Sending multiple messages to multiple phone numbers

Peer to peer sms, where each message is sent to the corresponding message in the array.

The default gateway number doesn't deliver messages to black listed number, however a dedicated gateway number can be purchased to overcome this limitation.

Get Cakes

POST https://api.bitel.rest/api/v2/sms/batch/p2p

Request Body

Name
Type
Description

gatewayNumber

string

Gateway number from which the SMS will be sent (up to 100 numbers)

messages

array

array of messages

phoneNumbers

array

array of phone numbers

{
  "result": [
    {
      "id": "39011bf93c9d427fb853b441a73337da",
      "gatewayNumber": "10009909",
      "phoneNumber": "0912*******",
      "message": "Hello from Bitel!",
      "requestDate": 1564575254,
      "status": 0,
      "statusText": "Waiting",
      "partCount": 1,
      "price": 0.0
    },
    {
      "id": "8f0f3c9de6b2439aba6ba4a24e706a81",
      "gatewayNumber": "10009909",
      "phoneNumber": "0912*******",
      "message": "Hello from Bitel!",
      "requestDate": 1564575254,
      "status": 0,
      "statusText": "Waiting",
      "partCount": 1,
      "price": 0.0
    }
  ],
  "error": null
}

Please not the number of messages should match the number of phone numbers

Sample Request

{
    "messages": [
        "Hi"
    ],
    "phoneNumbers": [
        "0912*******"
    ],
    "gatewayNumber": "10007200" // optional
}

Sample Response

{
  "result": [
    {
      "id": "39011bf93c9d427fb853b441a73337da",
      "gatewayNumber": "10009909",
      "phoneNumber": "0912*******",
      "message": "Hello from Bitel!",
      "requestDate": 1564575254,
      "status": 0,
      "statusText": "Waiting",
      "partCount": 1,
      "price": 0.0
    },
    {
      "id": "8f0f3c9de6b2439aba6ba4a24e706a81",
      "gatewayNumber": "10009909",
      "phoneNumber": "0912*******",
      "message": "Hello from Bitel!",
      "requestDate": 1564575254,
      "status": 0,
      "statusText": "Waiting",
      "partCount": 1,
      "price": 0.0
    }
  ],
  "error": null
}

Getting SMS Status

Error Codes

Code

Description

InvalidRequest

Submitted data is invalid

InvalidGateway

Gateway number is invalid, or the client doesn't have access to it

PreviousBatch SMSNextSMS Status

Last updated 5 years ago

Was this helpful?

In order to get the detail of a request, including the delivery status, price and more please refer to API.

Sms Status