API Documentation

API Documentation

Our SMS sending service enables your business to communicate quickly and efficiently with your customers via SMS. Our API solutions are accessible via SOAP and REST protocols, allowing for flexible integration into various systems. Below, we present our services and the necessary connection options.

API Connection Options

1. SOAP API Connection

  • You can also connect to our service via SOAP protocol, which offers a stable and reliable integration solution.
  • The SOAP API documentation block contains the functions we use to provide a comprehensive SMS service.

2. REST API Connection

  • Our RESTful API solution provides an easy-to-use, modern interface for communication between systems.
  • With the REST API, you can quickly and easily manage your SMS sending processes.
  • The REST API documentation block contains the functions we use to provide a comprehensive SMS service.

3. API Solutions Provided by Third Parties

API connections for SMS service providers being available on the domestic and international markets are also available from us. We want to help you and your business make switching providers simple and seamless.

SOAP API Documentation

The SOAP API (Simple Object Access Protocol) is a reliable and well-standardized protocol that enables secure communication between systems. Our service allows you to conveniently integrate SMS sending functions into your company's internal systems via our SOAP-based API. SOAP uses XML-based communication, which ensures that data is exchanged in a uniform and structured format.

Our API can be used for performing authentication operations, sending SMS/text messages, and querying SMS statuses. During integration, the system first connects using the connect function, where it authenticates the user. You can then access various functions, such as checking your SMS credit balance (getCreditNumber) or monitoring your SMS status (getStatus).

Due to its stability and reliability, the SOAP API is particularly useful for businesses that want to integrate SMS services into sophisticated or high-load systems. Since the SOAP standard ensures the correct format of data and also provides a high level of network security, it can be an ideal choice for systems that handle financial, health, and other sensitive data.

A simpleSMS SOAP API:

  • Endpoint: accessible at the URL https://api.simplesms.hu/sms.wsdl
  • You can download the PHP sample code from here.

Endpoints available in SOAP API

1. Connection

A connection is required for all further SOAP method calls. If there is no connection or it was unsuccessful, further requests will be rejected with an error message.

connect($userName, $userPassword, $domainName)

Parameters:

  • userName: the username specified in the API access section on the simplesms portal
  • userPassword: the password provided for API access on the simplesms portal
  • domainName: the password provided for API access on the simplesms portal

Return value:

  • we always return an array
  • in case of a successful message the value of success will be true, while the value of error will be false
  • in case of an incorrect answer, the two values are logically reversed (success false, error true). The API also returns an error code and error message.

2. Sending of SMS

sendSMS($strCountryCode, $strAreaCode, $strNumber, $strMessage)

Parameters:

  • strCountryCode: the country code (e.g. 36 for Hungary)
  • strAreaCode: the code of the telecommunication companies (e.g. 30 for Telekom, 20 for Yettel, 70 for One Hungary, 50 for Digi...)
  • strNumber: the rest of the phone number (e.g. 1234567)
  • strMessage: the content of the SMS intended for sending

Return value:

  • If the message is successful, we return the internal ID of the SMS in the response value, which can be used later to retrieve statuses or historical information.
  • In case of an incorrect response, the endpoint returns an error message and error code.

3. Balance inquiry

getCreditNumber()

There are no parameters.

Return value:

  • If successful, the value of the response field in the returned array contains the available balance.
  • In case of an error, the API endpoint returns an error code and error message.

4. Query of monthly statistics

getMonthlyStat()

There are no parameters.

Return value:

  • If the value is successful, the monthly statistics are returned in a single array in the return array, broken down by YYYY-MM, with domestic and foreign SMS numbers separated.
  • In case of an error, the API endpoint returns an error code and error message.

5. Status of SMS

The system provides the option to query the current status.

getStatus($numSMSID)

Parameters:

  • numSMSID is the internal ID of the SMS returned by sendSMS

Return value:

  • If the request is successful, the response is contained in the response field of the returned array, where all information related to the SMS can be found.
    • data provided at the time of sending
    • creation date
    • delivery status
    • time of last status changed
  • In case of an error, the API returns the usual error code and error message pair.

6. History of SMS status

The system provides the option to query SMS status changes.

getHistory($numSMSID)

Parameters:

  • numSMSID is the internal ID of the SMS returned by sendSMS

Return value:

  • If the request is successful, the response is contained in the response field of the returned array, where all information related to the SMS can be found.
    • last status data (code, message, date, comment for certain types)
  • In case of an error, the API returns the usual error code and error message pair.

REST API Documentation

The REST API (Representational State Transfer) is a modern, easy-to-use web service that enables simple and fast communication between systems. The REST API uses JSON or XML-based data exchange, which is familiar to many developers and easy to process, making it easy to integrate into any development environment. Our REST API offers a flexible and scalable solution for SMS sending and management functions.

You can access the REST API through HTTP methods such as POST, GET, and DELETE. The authentication process is performed using the connect function, where users of the API receive token-based authentication. After that, you can use the API to check your SMS sending credits (getCreditNumber), retrieve monthly statistics (getMonthlyStat), or even send an SMS using the sendSMS function.

The simplicity and speed of the REST API make it an excellent choice for developers, especially those who are considering flexible, web-based solutions. It can be an ideal choice for integration with various platforms, mobile applications, or other web systems. With our REST API, businesses can efficiently manage their SMS campaigns and notifications and track the status of sent messages in real time, all in a quick and easy way.

The simpleSMS REST API

  • endpoint is available at the URL https://api.simplesms.hu/rest/SMSapi/.
  • Rest API calls can be downloaded here in Postman.

1. Connection: connect (https://api.simplesms.hu/rest/SMSapi/connect)

A connection is required for all further REST API method calls. If there is no connection or the connection fails, further requests will be rejected with an error message.

The access_token obtained here can be used as a bearer token to access further methods.

Parameters: expects the parameters as a POST request

  • username: the username provided in the API access section of the simplesms portal
  • password: the password specified for API access on the simplesms portal
  • domain: the password specified for API access on the simplesms portal

Return value:

  • we always return an array
  • values returned for a successful message:
    • access_token: this must be used when calling further methods.
    • expires_in: the expiration date of the token
  • returns an error message in case of an incorrect response

2. Sending of SMS: sendSMS

Endpoint: https://api.simplesms.hu/rest/SMSapi/sendSMS

Parameters: This call also expects the parameters as POST.

  • country_code: country code (e.g. 36 for Hungary)

  • area_code: service provider code (e.g. 30 for Telekom, 20 for Yettel, 70 for Vodafone, 50 for Digi...)

  • number: the rest of the phone number (e.g. 1234567)

  • message: the content of the SMS intended for sending

Return value:

  • If the message is successful, we return the internal ID of the SMS in the response value, which can be used later to retrieve statuses or historical information.
  • In case of an incorrect response, the endpoint returns an error message.

3. Balance inquiry: getCreditNumber

Endpoint: https://api.simplesms.hu/rest/SMSapi/getCreditNumber

There are no parameters.

Return value:

  • if successful, the value of the response field in the returned array contains the available balance.
  • returns an error message in case of an error API endpoint.

4. Query of monthly statistics: getMonthlyStat

Endpoint: https://api.simplesms.hu/rest/SMSapi/getMonthlyStat

There are no parameters.

Return value:

  • If the value is successful, the monthly statistics are returned in a single array in the return array, broken down by YYYY-MM, with domestic and foreign SMS numbers separated.
  • returns an error message in case of an error API endpoint.

5. Status of SMS: getStatus

Endpoint: https://api.simplesms.hu/rest/SMSapi/getStatus

The system provides the option to query the current status.

Parameters: The parameter is expected as POST in the API call.

  • sms_id: the internal ID of the SMS returned by sendSMS.

Return value:

  • If the request is successful, the response is contained in the response field of the returned array, where all information related to the SMS can be found.
    • data provided at the time of sending
    • date of creation
    • delivery status
    • time of last status change
  • in case of an error, return the error message to the API.

6. History of SMS status: getHístory()

Endpoint: https://api.simplesms.hu/rest/SMSapi/getHistory

The system provides the option to query changes of SMS status.

Parameters: The parameter is expected as POST in the API call.

  • sms_id: the internal ID of the SMS returned by sendSMS

Return value:

  • If the request is successful, the response is contained in the response field of the returned array, where all information related to the SMS can be found.
    • last status data (code, message, date, comment for certain types)
  • In case of an error, the error message is returned by the API.

For more details and to set up integrations, please review the full API documentation or contact us if you have any questions!

Ez a weboldal sütiket (cookie) használ a látogatói élmény javítása érdekében., releváns hirdetések jelenítése, küldése miatt és az oldal forgalmának elemzése céljából. A sütik az Ön böngészojében tárolódnak, segítségükkel tudunk személyre szabott szolgáltatásokat nyújtani. A sütik beállítását Ön bármikor módosíthatja. Az Uniós jogszabályok értemében, kérjük, hogy az ELFOGADOM gombra kattintva engedélyezze a sütik használatát vagy zárja be az oldalt.