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

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

                                
                                    {{ route('api_http.sms.send') }}
                                
                            
{{ __('locale.developers.parameters') }}
{{ __('locale.developers.parameter') }} {{ __('locale.labels.required') }} {{ __('locale.labels.description') }}
api_token
{{ __('locale.labels.yes') }}
API Token From Developers option. Get API Token
Accept
{{ __('locale.labels.yes') }}
Set to application/json
Content-Type
{{ __('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_http.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. Use comma (,) to send multiple numbers. Ex. 31612345678,8801721970168
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 plain as sms type.
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)
dlt_template_id
{{ __('locale.labels.no') }}
string The ID of your registered DLT (Distributed Ledger Technology) content template.
Example request for Single Number
                                
curl -X POST {{ route('api_http.sms.send') }} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"{{ Auth::user()->api_token }}",
"recipient":"31612345678",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
                                
                            
Example request for GET method
    
        {{ route('api_http.sms.send') }}?recipient=31612345678&sender_id=YourName&message=test&api_token={{ Auth::user()->api_token }}
    
Example request for Multiple Numbers
                                
curl -X POST {{ route('api_http.sms.send') }} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"{{ Auth::user()->api_token }}",
"recipient":"31612345678,880172145789",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
                                
                            
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."
}
                                
                            
{{--
Send Campaign Using Contact list
--}} {{--

{{ config('app.name') }}'s Programmable SMS API enables you to programmatically send Campaigns 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 Campaign Using Contact List with this example request.

--}} {{--

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

--}} {{--
--}}
{{--                                --}}
{{--                                    {{ route('api.sms.campaign') }}--}}
{{--                                --}}
{{--                            
--}} {{--
{{ __('locale.developers.parameters') }}
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
{{ __('locale.developers.parameter') }}{{ __('locale.labels.required') }}{{ __('locale.labels.type') }}{{ __('locale.labels.description') }}
contact_list_id--}} {{--
{{ __('locale.labels.yes') }}
--}} {{--
stringContact list to send message. Use comma (,) to send multiple contact lists. Ex. 6415907d0d7a6,6415907d0d37a
sender_id--}} {{--
{{ __('locale.labels.yes') }}
--}} {{--
stringThe 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') }}
--}} {{--
stringThe type of the message. For text message you have to insert plain as sms type.
message--}} {{--
{{ __('locale.labels.yes') }}
--}} {{--
stringThe body of the SMS message.
schedule_time--}} {{--
{{ __('locale.labels.no') }}
--}} {{--
datetimeThe scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
dlt_template_id--}} {{--
{{ __('locale.labels.no') }}
--}} {{--
stringThe ID of your registered DLT (Distributed Ledger Technology) content template.
--}} {{--
--}} {{--
Example request for Single Contact List
--}} {{--
--}}
{{--                                --}}
{{--curl -X POST {{ route('api.sms.campaign') }} \--}}
{{---H 'Content-Type: application/json' \--}}
{{---H 'Accept: application/json' \--}}
{{---d '{--}}
{{--"api_token":"{{ Auth::user()->api_token }}",--}}
{{--"recipient":"6415907d0d37a",--}}
{{--"sender_id":"YourName",--}}
{{--"type":"plain",--}}
{{--"message":"This is a test message"--}}
{{--}'--}}
{{--                                --}}
{{--                            
--}} {{--
Example request for Multiple Contact Lists
--}} {{--
--}}
{{--                                --}}
{{--curl -X POST {{ route('api.sms.campaign') }} \--}}
{{---H 'Content-Type: application/json' \--}}
{{---H 'Accept: application/json' \--}}
{{---d '{--}}
{{--"api_token":"{{ Auth::user()->api_token }}",--}}
{{--"recipient":"6415907d0d37a,6415907d0d7a6",--}}
{{--"sender_id":"YourName",--}}
{{--"type":"plain",--}}
{{--"message":"This is a test message",--}}
{{--"schedule_time=2021-12-20 07:00"--}}
{{--}'--}}
{{--                                --}}
{{--                            
--}} {{--
Returns
--}} {{--

Returns a contact object if the request was successful.

--}} {{--
--}}
{{--                                --}}
{{--{--}}
{{--    "status": "success",--}}
{{--    "data": "campaign 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/http/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_http.sms.view', ['uid' => '606812e63f78b']) }} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"{{ Auth::user()->api_token }}"}'
                                
                            
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/http/sms/
                                
                            
Example request
                                
curl -X GET {{ route('api_http.sms.index') }} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"{{ Auth::user()->api_token }}"}'
                                
                            
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."
}