Agile Telecom Agile Telecom
  • Products
    • SMS
    • 2 Way
    • Smart Content Verification
    • HLR Look Up
    • Testing Tool
  • Industries
    • Communications
    • Information Technology
    • Financial Services
    • Marketing
  • ATWS
  • How We Work
    • Who We Are
Sign In Contact us
Sign In Contact us

Send SMS

  • ENG – HTTP Protocol
  • ENG – SMPP Protocol
  • ITA – Protocollo HTTP
  • ITA – Protocollo SMPP

Receive SMS

  • ENG – Inbound SMS Service
  • ITA – Servizio di Ricezione SMS

Credit Check

  • ENG – SMS Credit Check
  • ITA – SMS Credit Check

Mobile Number Portability

  • ENG – Mobile Number Portability
  • ITA – Mobile Number Portability
  • Home
  • Documentation
  • Send SMS
  • ENG – HTTP Protocol
View Categories

ENG – HTTP Protocol

3 min read

HTTP PROTOCOL #

It is possible to send SMS via HTTP Rest Api through a call structured as follows:

  • URL: https://secure.agiletelecom.com/services/sms/send
  • METHOD: POST
  • AUTHENTICATION: Basic / Api-Key / OAuth1.1 (all in the header)
  • BODY: JSON as per the example below:
{
  "globalId" : "f9b865ef-5ce3-4e44-b65c-615fd71bbd09",
  "maxIdLen" : 64,
  "enableConcatenated": true,
  "enableUnicode": true,
  "enableDelivery": true,
  "simulation": false,
  "messages":[
    {
      "destinations": ["41793026727", "417930254674"],
      "ids": ["157d541b-e0cd-4340-ac77-bc5d530dd90e", "d0f2e3c1-a043-418d-ad5e-0248184b9833"],
      "sender": "InfoSMS",
      "body": "This is a message.",
      "hexBody": false,
      "udhData": "070645670000",
      "scheduling": "2022-05-09 09:00:00.002+0200"
    },
    ...
  ]
}

The variables to be sent are as follows:

FIELDTYPEMANDATORYDEFAULTNOTES
globalIdstringno Unique submission identifier for the client
maxIdLenintegerno64Maximum length (characters) of ids
enableConcatenatedbooleannotrueEnable concatenates if necessary
enableUnicodebooleannotrueEnable unicode text
enableDeliverybooleannotrueEnable delivery to the customer
simulationbooleannofalseAllows simulation, without actual sending of the message
messagesarrayyes List of messages to be sent. Each message can have multiple recipients
destinationsarrayyes List of recipients of a message
idsarrayno List of message related IDs
senderstringyes Sender of messages to be sent
bodystringyes Message text
hexBodybooleannofalseIndicates whether the text is entered in HEX or in normal UTF8/16
udhDatastringno If present, it indicates the UDH code to be included in the message
schedulingstringno Programming date, in the format “yyyyy-MM-dd HH:mm:ss.SSSZ”

The response will be in JSON format (with Jsend specification in case of errors):

  • 2XX (message accepted by the server)
{
  "globalId": "f9b865ef-5ce3-4e44-b65c-615fd71bbd09",
  "processedMessages": 2,
  "processedSmsParts": 4,
  "credit": 10.324
}
FIELDTYPENOTES
globalIdstringValue of globalid reported by the request
processedMessagesintegerMessages accepted as per the messages section on the request
processedSmsPartsintegerParts that will be shipped (differs from previous in case of concatenates)
creditdoubleAccount credit remaining expressed in €
  • 4XX (request rejected due to formal errors in parameters)
{
    "status": "fail",
    "data": { 
		"body": "Missing message body(ies)" 
		"number": "Wrong destination number(s)"
		
	},
	"code": 6
}
FIELDTYPENOTES
statusstringIt always applies “fail” for 4XX errors
dataobject / stringIt contains a key-value list, where the keys indicate the field to be passed in and the value indicates the problem found on that field. Or a string describing the problem.
body/number/…stringThese are two possible examples of fields passed to the API where problems were encountered
codeintegerCustom error code. Indicates the type of problem as specified in the error code table given next
  • 5XX (request not processed due to server-side errors)
{
    "status": "error",
    "message": "Number check service unavailable",
	"code": 9
}
FIELDTYPENOTES
statusstring“Error” always applies to 5XX errors
messagestringDescribes the type of server-side problem encountered while processing the request
codeintegerCustom error code. Indicates the type of problem as specified in the error code table given next

Table of error codes:

CODEDESCRIPTION
1Wrong credentials
2Insufficient credit
8Server error
9Server error (service timeout)
26Alias (Sender) is not allowed
100Source IP is not allowed
HTTP Delivery #

Used by AgileTelecom to send SMS delivery confirmation to customers who have requested it. Clients will receive an HTTP Rest API call to the URL they specified structured as follows:

  • URL: customer-defined
  • METHOD: Post
  • AUTHENTICATION: none
  • BODY: JSON (as per the example below)
{ 
  "messageId": "157d541b-e0cd-4340-ac77-bc5d530dd90e", 
  "destination": "41793026727",
  "statusCode": 3,
  "description": "Delivered",
  "doneDate": "2022-05-09 09:00:05.002+0200",
  "concatTotal": 2,
  "concatProgressive": 1,
  "lcrOperator": "22210",
  "realOperator": "22201",
  "price": 0.003
}
FIELDTYPENOTES
messageIdstringID that uniquely identifies for the client the messages sent
destinationstringPhone number of the recipient of the sent message
statusCodeintegerCode identifying the receiving status of the message1: Accepted2: Rejected3: Delivered4: Expired5: Deleted6: Undeliverable
descriptionstringStatus description
doneDatestringDate related to delivery
concatTotalintegerNumber of total parts in case of concatenated message
concatProgressiveintegerMessage part number in case of concatenated message
lcrOperatorstring(Optional, can be activated with customer parameter) Operator identified by LCR service.
realOperatorstring(Optional, can be activated with customer parameter) Real destination number operator
pricedouble(Optional, can be activated with customer parameter) Cost of sending
What are your Feelings
Table of Contents
  • HTTP PROTOCOL
  • HTTP Delivery

Via Baldassarre Peruzzi 26, 41012 – Carpi (MO)

VAT ID: IT02804070361

Agile Telecom is part of Growens

Products

SMS

2Way

Smart content verification

HLR Lookup

Testing Tool

Industries

Communications

Information Technology

Financial services

Marketing

Developers

Documentation

How we work

Our experience

Our people

Get in touch

Contact Us

Privacy Policy

Compliance

GDPR Infrastructure

Terms of Service

Private Area

AgCom Regulation