API Documentation: Send MMS Messages

April 16, 2024

Enhance your customer engagement with our MMS messaging service. This API allows you to send text messages combined with images directly to a phone number. Below is the detailed documentation for using this service.

Endpoint Overview

Endpoint: Send MMS Message
Method: GET
URL: /api/messaging/send/

Required Query Parameters

ParameterData TypeRequiredDescription
tostringYesRecipient's phone number in E.164 format, e.g., +1234567890.
bodystringYesThe text of the message.
imagestringYesURL of the image to be sent with the message.
apiKeystringYesAPI key for authorization.

Responses

Success Response:

  • Code: 200 OK
  • Content:json { "status": "success", "message": "Message sent successfully.", "message-id": "unique_message_identifier" }

Error Responses:

  • 400 Bad Request
    Missing or invalid parameters.json { "status": "error", "message": "Missing required parameters." }
  • 401 Unauthorized
    Invalid API key.json { "status": "error", "message": "Invalid API key." }
  • 500 Internal Server Error
    Server error when processing the request.json { "status": "error", "message": "Failed to send message due to a server error." }

Sample Request

http GET /api/messaging/send/?to=%2B1234567890&body=Welcome%20to%20our%20dispensary!&image=https%3A%2F%2Fexample.com%2Fwelcome.jpg&apiKey=yourApiKeyHere

Security Considerations

  • Ensure that the API key is securely stored and not exposed in client-side code or publicly accessible areas.

Usage Tips

  • Always URL-encode query parameters to avoid errors.
  • Confirm that the phone number includes the country code and is in the correct format.
  • Ensure the image URL is publicly accessible and points directly to a valid image file.

This documentation should provide all necessary details for developers to integrate the MMS messaging capability into your existing systems, enhancing communication with your customers.