{{ __('locale.developers.voice_api') }}
{!! __('locale.description.sms_api', ['brandname' => config('app.name')]) !!}

{{ __('locale.developers.api_endpoint') }}

                                
                                    {{ route('api.sms.send') }}
                                
                            
{{ __('locale.developers.parameters') }}
{{ __('locale.developers.parameter') }} {{ __('locale.labels.required') }} {{ __('locale.labels.description') }}
Authorization
{{ __('locale.labels.yes') }}
When calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token})
Accept
{{ __('locale.labels.yes') }}
Set to application/json
Send outbound SMS

{{ config('app.name') }}'s Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. {{ config('app.name') }} returns the created message object with each request.

Send your first SMS message with this example request.

{{ __('locale.developers.api_endpoint') }}

                                
                                    {{ route('api.sms.send') }}
                                
                            
{{ __('locale.developers.parameters') }}
{{ __('locale.developers.parameter') }} {{ __('locale.labels.required') }} {{ __('locale.labels.type') }} {{ __('locale.labels.description') }}
recipient
{{ __('locale.labels.yes') }}
string Number to send message
sender_id
{{ __('locale.labels.yes') }}
string The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
{{ __('locale.labels.yes') }}
string The type of the message. For text message you have to insert voice as sms type.
language
{{ __('locale.labels.yes') }}
string The language in which the message needs to be read to the recipient. Possible values are: cy-gb, da-dk, de-de, el-gr, en-au, en-gb, en-gb-wls, en-in, en-us, es-es, es-mx, es-us, fr-ca, fr-fr, id-id, is-is, it-it, ja-jp, ko-kr, ms-my, nb-no, nl-nl, pl-pl, pt-br, pt-pt, ro-ro, ru-ru, sv-se, ta-in, th-th, tr-tr, vi-vn, zh-cn, zh-hk.
gender
{{ __('locale.labels.yes') }}
string The gender in which the messages needs to be read to the recipient. Possible values are: male, female
message
{{ __('locale.labels.yes') }}
string The body of the SMS message.
schedule_time
{{ __('locale.labels.no') }}
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request
                                
curl -X POST {{ route('api.sms.send') }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"voice",
"language=en-gb",
"gender=female",
"message":"This is a test message"
}'
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "sms reports with all details",
}
                                
                            

If the request failed, an error object will be returned.

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
View an SMS

You can use {{ config('app.name') }}'s SMS API to retrieve information of an existing inbound or outbound SMS message.

You only need to supply the unique message id that was returned upon creation or receiving.

{{ __('locale.developers.api_endpoint') }}

                                
                                    {{config('app.url')}}/api/v3/sms/{uid}
                                
                            
{{ __('locale.developers.parameters') }}
{{ __('locale.developers.parameter') }} {{ __('locale.labels.required') }} {{ __('locale.labels.type') }} {{ __('locale.labels.description') }}
uid
{{ __('locale.labels.yes') }}
string A unique random uid which is created on the {{ config('app.name') }} platform and is returned upon creation of the object.
Example request
                                
curl -X GET {{ route('api.sms.view', ['uid' => '606812e63f78b']) }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "sms data with all details",
}
                                
                            

If the request failed, an error object will be returned.

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
View all messages

{{ __('locale.developers.api_endpoint') }}

                                
                                    {{config('app.url')}}/api/v3/sms/
                                
                            
Example request
                                
curl -X GET {{ route('api.sms.index') }} \
-H 'Authorization: Bearer {{ Auth::user()->api_token }}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "sms reports with pagination",
}
                                
                            

If the request failed, an error object will be returned.

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}