API Documentation for api.freesmsreceive.io

1.Introduction


Welcome to the API documentation for api.freesmsreceive.io. This API enables users to send and receive SMS and WhatsApp messages. This comprehensive documentation covers all necessary information to effectively utilize the API.

2.Authentication


2. Authentication

The API utilizes token-based authentication. Each user is provided with a unique API key for authentication. Requests without a valid API key will be rejected.

Example authentication request:

vbnet

GET /api/v1/messages
Host: api.freesmsreceive.io
Authorization: Bearer YOUR_API_KEY
  • Authorization: Header containing the word “Bearer” followed by your API key.
  • API Key: A unique key identifying your user account, granting access to the API.

3.Endpoints


Endpoints serve as access points for various operations. All endpoints use HTTPS for secure data transmission.

3.1 Sending SMS

  • URL: https://api.freesmsreceive.io/api/v1/messages/send
  • Method: POST
  • Description: Endpoint for sending SMS messages to any valid phone number.

3.2 Receiving SMS

  • URL: https://api.freesmsreceive.io/api/v1/messages/receive
  • Method: GET
  • Description: Endpoint for receiving SMS messages, providing a list of received messages on a specific phone number.

3.3 Sending WhatsApp Messages

  • URL: https://api.freesmsreceive.io/api/v1/whatsapp/send
  • Method: POST
  • Description: Endpoint for sending WhatsApp messages to any valid phone number.

3.4 Receiving WhatsApp Messages

  • URL: https://api.freesmsreceive.io/api/v1/whatsapp/receive
  • Method: GET
  • Description: Endpoint for receiving WhatsApp messages, offering a list of received messages on a specific phone number.

4.Status Codes


Standard HTTP status codes are utilized to indicate the result of a request. Understanding these codes is crucial for handling responses accurately.

  • 200 OK: Successful request.
  • 201 Created: Resource successfully created.
  • 400 Bad Request: Invalid request (e.g., incorrect data format).
  • 401 Unauthorized: Authentication failed (invalid API key).
  • 404 Not Found: Requested resource not found.
  • 429 Too Many Requests: Rate limit exceeded.
  • 500 Internal Server Error: Server error.

5.Error Handling


In the event of an error, the API returns a JSON object with error details to aid troubleshooting. Example error:

json
{
"error": "Invalid phone number"
}

6.Rate Limiting


The API imposes limits on requests per time unit to maintain service stability and performance.

  • Limit: 100 requests per minute.
  • 429 Too Many Requests: Indicates request limit exceeded. It is recommended to reduce the request rate and retry later.

Webhook Configuration

Webhooks allow automatic event notification, such as incoming messages. Configure a URL to receive notifications, especially beneficial for real-time applications requiring immediate event notification.

Conclusion

The api.freesmsreceive.io API offers robust functionality for SMS and WhatsApp messaging. With secure authentication, comprehensive documentation, and support for various programming languages, it’s an excellent choice for integrating messaging capabilities into applications.