src/api/EndpointsAPI.js
/**
   * PUT /endpoints/sendMessage
   *
   * Send a message to some technology URI or endpoint.
   *
   * *API available since Asterisk 12.5*
   *
   * @param {object} params
   * @param {string} params.to The endpoint resource or technology specific
   *  URI to send the message to. Valid resources are 'sip', 'pjsip', and
   *  'xmpp'.
   * @param {string} params.from The endpoint resource or technology specific
   *  identity to send this message from. Valid resources are 'sip', 'pjsip',
   *  and 'xmpp'.
   * @param {string} params.body The body of the message.
   * @param {object} [params.variables] An object of key/value pairs that
   *  should be sent to set variables for the sendMessage request.
   * @returns {Promise} Resolves if the message has been successfully sent.
   *  Rejects if invalid params are provided for sending the message (status
   *  400) or the specified destination could not be found (status 404).
   */
PUT /endpoints/sendMessage
Send a message to some technology URI or endpoint.

*API available since Asterisk 12.5

@param {object} params
@param {string} params.to The endpoint resource or technology specific
URI to send the message to.
PUT / endpoints / sendMessage Send a message to some technology URI or endpoint . * API available since Asterisk 12 . 5 @param { object } params @param { string } params . to The endpoint resource or technology specific URI to send the message to .
sendMessage(params) {
    const { to, from, body, variables } = params;
    return this._request({
      method: "PUT",
      url: `${this._baseUrl}/endpoints/sendMessage`,
      params: { to, from, body },
      data: { variables },
    });
  }
sendMessage ( params ) { const { to , from , body , variables } = params ; return this . _request ( { method : "PUT" , url : ` ${ this . _baseUrl } ` , params : { to , from , body } , data : { variables } , } ) ; }
PUT /endpoints/sendMessage
 Send a message to some technology URI or endpoint.
PUT / endpoints / sendMessage Send a message to some technology URI or endpoint .