BulkGate Helpdesk
  • Languages iconEnglish
    • Čeština

Specification WhatsApp object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
senderText sender. Needs to be registered first. For registration contact support here.Yes-
expirationTime limit after which alternative channel will be usedNo3600
templateTemplate object. Cannot be used in tandem with following parameters (Message, File, Otp, Location) see Template objectNonull
messageMessage object. Cannot be used in tandem with following parameters (Template, File, Otp, Location) see Message objectNonull
fileFile object. Cannot be used in tandem with following parameters (Template, Message, Otp, Location) see File objectNonull
otpOtp object. Cannot be used in tandem with following parameters (Template, Message, File, Location) see Otp objectNonull
locationLocation object. Cannot be used in tandem with following parameters (Template, Message, File, Otp) see Location objectNonull

Template object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
templateTemplate textNonull
languageLanguage in Iso formatNoen
headerTemplate header object, see Header objectNonull
bodyTemplate body object, see Body objectNonull
buttonsArray of template button objects, see Buttons objectNonull

Template header object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
typeType of header (image, video, text, location)Yes-
urlPath to video, or image (used with image, video type)Yes, not in tandem with following (text, location)-
captionFile description (used with type image, video)Yes, but not simultaneously with the following types (text, location)-
textText (used with text type)Yes, not in tandem with following (url, caption, location)-
locationLocation object (used with location type), see Location objectYes, not in tandem with following (url, text, caption)-

Template body object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
typeType of body (text, price, currency)Notext
textText (used with text type)Yes, not in tandem with following (amount, currency)-
amountAmount of set currencyYes, not in tandem with following (text)-
currencyCurrencyYes, not in tandem with following (text)-

Template buttons object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
typeType of button (payload, url)Nourl
indexIndex of defined buttonYes-
payloadMeta data sent after clicking the buttonYes, only with payload type-
textUrl to which recipient will be redirected toYes, only with url type-

Example of template object request:

{
  "application_id": "APPLICATION_ID",
  "application_token": "APPLICATION_TOKEN",
  "number": [
    "+420777777777"
  ],
  "text": "Test text",
  "channel": {
    "whatsapp": {
      "sender": "420777777777",
      "expiration": 300,
      "template": {
        "template": "test_template",
        "language": "cz",
        "header": {
          "type": "image",
          "url": "test_url",
          "caption": "test_caption"
        },
        "body": [
          {
            "type": "currency",
            "amount": 20.5,
            "currency": "euro"
          }
        ],
        "buttons": [
          {
            "type": "payload",
            "index": 1,
            "payload": "test_payload"
          }
        ]
      }
    }
  }
}

Example Template object

Template Object

Message object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
textText of a messageYes-
preview_urlPreview sent url as a thumbnailNotrue

Example of message object:

{
  "application_id": "APPLICATION_ID",
  "application_token": "APPLICATION_TOKEN",
  "number": [
    "+420777777777"
  ],
  "text": "Test text",
  "channel": {
    "whatsapp": {
      "sender": "420777777777",
      "expiration": 300,
      "message": {
        "text": "title",
        "preview_url": true
      }
    }
  }
}

File object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
typeType of file (image, video, audio, document, sticker)Noimage
urlPath to the fileYes-
captionCaption of sent fileNo""

Example of File object:

{
  "application_id": "APPLICATION_ID",
  "application_token": "APPLICATION_TOKEN",
  "number": [
    "+420777777777"
  ],
  "text": "Test text",
  "channel": {
    "whatsapp": {
      "sender": "420777777777",
      "expiration": 300,
      "file": {
        "type": "image",
        "url": "url_test",
        "caption": "caption_test"
      }
    }
  }
}

Example File object

File Object

Otp object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
templateTemplate of text message being send with the codeYes-
codeOne time codeYes-
languageLanguage used to send the message containing code (if null is used language will be detected from phone number)Yes-

Example of Otp object:

{
  "application_id": "APPLICATION_ID",
  "application_token": "APPLICATION_TOKEN",
  "number": [
    "+420777777777"
  ],
  "text": "Test text",
  "channel": {
    "whatsapp": {
      "sender": "420777777777",
      "expiration": 300,
      "otp": {
        "template": "test_template",
        "language": "cz",
        "code": "0451"
      }
    }
  }
}

Location object

PARAMETER NAMEVALUEMANDATORYDEFAULT VALUE
latitudeLatitude in floating point numberNo-
longitudeLongitude in floating point numberNo-
nameName of sent locationNo-
addressAddress of sent locationNo-

Example of Location object request:

{
  "application_id": "APPLICATION_ID",
  "application_token": "APPLICATION_TOKEN",
  "number": [
    "+420777777777"
  ],
  "text": "Test text",
  "channel": {
    "whatsapp": {
      "sender": "420777777777",
      "expiration": 300,
      "location": {
        "latitude": 0.1,
        "longitude": 0.1,
        "name": "test_name",
        "address": "test_address"
      }
    }
  }
}

Example Location object

Location Object

  • Template object
    • Template header object
    • Template body object
    • Template buttons object
    • Example Template object
  • Message object
  • File object
    • Example File object
  • Otp object
  • Location object
    • Example Location object
SolutionsSMS GatewayViber for BusinessBroadcastBulk SMSSMS NotificationsTwo-way SMSMobile ConnectWeb Portal
Partners & DevelopersSMS APIIntegrationsAffiliate programWhite label
SourcesBlogYouTubeFacebookLinkedInTwitterGitHubPackagist
CompanyContactPrivacyTerms and Conditions
Price listsPrice list SMSPrice list ViberPrice list Mobile Connect
SMS GatewayTOPefekt s.r.o. © 2026