SMS API

From Planfix
Revision as of 18:01, 3 February 2022 by SliZzzZ (talk | contribs)
Jump to: navigation, search

API Overview

This API is intended for owners of services that send SMS messages. It allows you to connect your SMS service to Planfix if it's not in the list of available services for integration, thus enabling you to send SMS messages from Planfix through your service.

After setting up this integration, you can contact our Support Team to see about getting your service added to the list of integrations available to users in the Planfix interface. The exchange happens over HTTPS. Planfix sends requests to the service address specified in the integration settings.


Connecting in the Planfix interface

To connect and configure the integration, go to the section Account management / Integrations / Integrations with SMS services


FfZNGB.png


In this section, go to the bottom of the list and select Planfix API (using username and password) or Planfix API (using key), depending on the method you wish to use to authorize requests in your service.


wTIVao.png


A window will open with integration settings.


uDslLx.png


Here, you will specify the address to which Planfix will send requests; the client's username and password; and the SMS sender name (when authorizing using a key, you'll enter the API key instead of the username and password)


API call format for sending SMS when using username and password

The request is sent using a POST method in the format application/x-www-form-urlencoded, to the address specified in the integration settings.

API call parameters

Name Description Data type/format Notes
username username, entered in the integration settings string
password password, entered in the integration settings string
from sender name string
to phone number to which SMS is being sent string
text message body string


API call format for sending SMS when using a key

The request is sent using a POST method in the format application/x-www-form-urlencoded, to the address specified in the integration settings.

API call parameters

Имя Описание Тип/формат данных Примечание
key API key, entered in the integration settings string
from sender name string
to phone number to which SMS is being sent string
text message body string


Testing the integration

To test the integration, go to the integration settings, enter all the necessary data, and click the flask icon:


RkJrzw.png


In the section that opens, enter the phone number you'd like to send the SMS to, and the body of your message. Then click Test


CNGc3L.png


Planfix then makes the call to send the message. The response, or an error message, will be displayed.


GwIO0X.png


Go To