How to send an SMS using Brevo from SQL?

The Brevo (formerly known as “Sendinblue”)-driver of Invantive SQL does not provide a table to send SMS-messages.

SMS-messages can be sent using Invantive SQL nonetheless after logging on to a database containg a Brevo data container:

insert into NATIVEPLATFORMSCALARREQUESTS@sib
( URL
, http_method
, CONTENT_TYPE
, FAIL_ON_ERROR
, PAYLOAD_TEXT
)
values
( 'https://api.brevo.com/v3/transactionalSMS/sms'
, 'POST'
, 'application/json'
, true
, '{ '
  || jsonelement('type', 'transactional') 
  || ',  '
  || jsonelement('unicodeEnabled', true) 
  || ',  '
  || jsonelement('sender', 'Invantive') 
  || ',  '
  || jsonelement('recipient', '+31612345678') 
  || ',  '
  || jsonelement('content', 'desired text payload') 
  || ',  '
  || jsonelement('organisationPrefix', 'Invantive') 
  || '}'
)

Upon failure, an error will be raised such as:

image

itgensib014
Sender name should not be greater than 15 characters.