Send & Receive
All operations require authentication.
Estimate a messageProduction
Estimate a message. Returns the encoding, the length and the number of SMS parts needed to send a text message.
Request body (required)
The message to send
Do not display STOP clause in the message, this requires that this is not an advertising message
Sender type that will be used to send the message
alphanumericshortcodetime2chatvirtualResponse
The number of characters the message contains, including invisible escaped characters
The characters class that will be used to send the SMS, depending on characters in message
7bitsunicodeThe number of characters every SMS part can contain, depending on characters class and quantity of parts
The quantity of SMS parts the message will be split in
Reads your token from $OVH_TOKEN
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ estimate \
-H "authorization: Bearer $OVH_TOKEN"{ "characters": 0, "charactersClass": "7bits", "maxCharactersPerPart": 0, "parts": 0}
List HLR lookupsProduction
List HLR lookups. Returns the identifiers of the HLR lookups. An HLR lookup checks whether a mobile number is valid, reachable, ported or roaming.
Path parameters
The internal name of your SMS offer
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ hlr \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get an HLR lookupProduction
Get an HLR lookup. Returns the result of the HLR lookup: validity, reachability, portability and roaming of the number.
Path parameters
HLR id
The internal name of your SMS offer
Response
HLR creation datetime
HLR id
MSISDN
The {Mobile Country Code, Mobile Network Code} unique identifier
Has the MSISDN been ported from its original network
Is the MSISDN currently reachable
Is the MSISDN currently roaming outside its natinal network
Status of the HLR request
doingdoneerrortodoIs the MSISDN valid
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ hlr/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "datetime": "2024-01-01T12:00:00Z", "id": 0, "msisdn": "string", "operatorCode": "string", "ported": true, "reachable": true, "roaming": true, "status": "doing", "valid": true}
Request HLR lookupsProduction
Request HLR lookups. Requests an HLR lookup for one or several mobile numbers, given as a list or a CSV document URL. Returns the lookup identifiers and the credits used.
Path parameters
The internal name of your SMS offer
Request body (required)
The receivers
The receivers document url link in csv format
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ hlr \
-H "authorization: Bearer $OVH_TOKEN"{ "ids": [ 0 ], "invalidReceivers": [ "string" ], "tag": "string", "totalCreditsRemoved": 0, "validReceivers": [ "string" ]}
Get the receiver operatorProduction
Get the receiver operator. Returns the operator of the phone number, from the network query trace: country, country code, region, operator and network.
Path parameters
HLR id
The internal name of your SMS offer
Response
The country
The countryCode prefix number
The network name
The operator name
The region
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ hlr/ {id}/ operator \
-H "authorization: Bearer $OVH_TOKEN"{ "country": "string", "countryCode": "string", "network": "string", "operator": "string", "region": "string"}
List received SMSProduction
List received SMS. Returns the identifiers of the received SMS. Get a received SMS for its sender, message, date and credits used.
Path parameters
The internal name of your SMS offer
Query parameters
Filter the value of creationDatetime property (>=)
Filter the value of creationDatetime property (<=)
Filter the value of sender property (=)
Filter the value of tag property (=)
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ incoming \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get a received SMSProduction
Get a received SMS. Returns the received SMS: sender, message, reception date, credits used and tag. The tag groups SMS for filtering and export.
Path parameters
Id of the object
The internal name of your SMS offer
Response
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ incoming/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "creationDatetime": "2024-01-01T12:00:00Z", "credits": 0, "id": 0, "message": "string", "sender": "string", "tag": "string"}
Delete a received SMSProduction
Delete a received SMS. Deletes the received SMS from the history. It no longer appears in the list of received SMS.
Path parameters
Id of the object
The internal name of your SMS offer
Response
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ incoming/ {id} \
-H "authorization: Bearer $OVH_TOKEN"List pending jobsProduction
List pending jobs. Returns the identifiers of the SMS waiting to be sent. Get a pending job for its receiver, message, number of SMS parts and credits.
Path parameters
The internal name of your SMS offer
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ jobs \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get a pending jobProduction
Get a pending job. Returns the SMS waiting to be sent: receiver, message, number of SMS parts and credits.
Path parameters
Id of the object
The internal name of your SMS offer
Response
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ jobs/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "creationDatetime": "2024-01-01T12:00:00Z", "credits": 0, "deliveredAt": "2024-01-01T12:00:00Z", "deliveryReceipt": 0, "differedDelivery": 0, "id": 0, "message": "string", "messageLength": 0, "numberOfSms": 0, "ptt": 0, "receiver": "string", "sender": "string", "sentAt": "2024-01-01T12:00:00Z"}
Send SMSProduction
Send SMS. Sends an SMS to one or several receivers, given as a list, a CSV document URL or a receiver list. Sending can be delayed, and a validity period drops the message if it is not delivered in time.
Path parameters
The internal name of your SMS offer
Request body (required)
The sms coding
UTF-8Deprecated: The sms class
flashphoneDisplaysimtoolkitDeprecated: the coding is deduced from the message and its charset
7bit8bitThe time -in minute(s)- to wait before sending the message
The sms message
Do not display STOP clause in the message, this requires that this is not an advertising message
The priority of the message
highlowmediumveryLowThe receivers list
The receivers document url link in csv format
The receivers document slot id
The sender
Set the flag to send a special sms which can be reply by the receiver (smsResponse).
The identifier group tag
The maximum time -in minute(s)- before the message is dropped
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ jobs \
-H "authorization: Bearer $OVH_TOKEN"{ "creditsLeft": 0, "ids": [ 0 ], "invalidReceivers": [ "string" ], "tag": "string", "totalCreditsRemoved": 0, "validReceivers": [ "string" ]}
Delete a pending jobProduction
Delete a pending job. Cancels the sending of an SMS that is still waiting to be sent, such as a delayed SMS. Sent SMS are in the sent SMS history.
Path parameters
Id of the object
The internal name of your SMS offer
Response
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ jobs/ {id} \
-H "authorization: Bearer $OVH_TOKEN"Get the receiver operatorProduction
Get the receiver operator. Returns the operator of the phone number, from the network query trace: country, country code, region, operator and network.
Path parameters
Id of the object
The internal name of your SMS offer
Response
The country
The countryCode prefix number
The network name
The operator name
The region
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ outgoing/ {id}/ hlr \
-H "authorization: Bearer $OVH_TOKEN"{ "country": "string", "countryCode": "string", "network": "string", "operator": "string", "region": "string"}
List message templatesProduction
List message templates. Returns the message templates. Sending SMS to the United States requires a template validated by a moderator.
Path parameters
The internal name of your SMS offer
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ templatesControl \
-H "authorization: Bearer $OVH_TOKEN"[ "string"]
Get a message templateProduction
Get a message template. Returns the message template: pattern, activity, status and moderator comment.
Path parameters
Name of the template
The internal name of your SMS offer
Response
Specify the kind of template
alertingauthentificationtransactionalMessage sent by the moderator
Template creation datetime
Template description
Message pattern to be moderated. Use "#VALUE#" format for dynamic text area.
Name of the template
Template status
disableenablerefusedwaitingValidationExample uses name = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ templatesControl/ {name} \
-H "authorization: Bearer $OVH_TOKEN"{ "activity": "alerting", "comment": "string", "datetime": "2024-01-01T12:00:00Z", "description": "string", "message": "string", "name": "string", "status": "disable"}
Create a message templateProduction
Create a message template. Creates a message template and submits it to moderation. Sending SMS to the United States requires a validated template.
Path parameters
The internal name of your SMS offer
Request body (required)
Specify the kind of template
alertingauthentificationtransactionalTemplate description
Message pattern to be moderated. Use "#VALUE#" format for dynamic text area.
Name of the template
Message seen by the moderator
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ templatesControl \
-H "authorization: Bearer $OVH_TOKEN"Delete a message templateProduction
Delete a message template. Deletes the message template from the SMS account, whatever its moderation status.
Path parameters
Name of the template
The internal name of your SMS offer
Response
Example uses name = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ templatesControl/ {name} \
-H "authorization: Bearer $OVH_TOKEN"Update a message templateProduction
Update a message template. Updates the message template: description, message pattern with #VALUE# dynamic areas, and kind (alerting, authentification or transactional).
Path parameters
Name of the template
The internal name of your SMS offer
Request body (required)
Specify the kind of template
alertingauthentificationtransactionalMessage sent by the moderator
Template creation datetime
Template description
Message pattern to be moderated. Use "#VALUE#" format for dynamic text area.
Name of the template
Template status
disableenablerefusedwaitingValidationResponse
Example uses name = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ templatesControl/ {name} \
-H "authorization: Bearer $OVH_TOKEN"Relaunch template validationProduction
Relaunch template validation. Submits the message template to moderation again after a refusal, with an updated message pattern and description.
Path parameters
Name of the template
The internal name of your SMS offer
Request body (required)
Template description
Message pattern to be moderated. Use "#VALUE#" format for dynamic text area
Response
Example uses name = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ templatesControl/ {name}/ relaunchValidation \
-H "authorization: Bearer $OVH_TOKEN"Get a PTT codeProduction
Get a PTT code. Returns the meaning of a PTT code. The PTT code is the delivery status code of an SMS, given in the ptt field of sent SMS and pending jobs.
Query parameters
The premium transaction tracking code
Response
Ptt informations
Ptt short description
Ptt volatility type
indeterminatedpermanenttemporaryReads your token from $OVH_TOKEN
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ ptts \
-H "authorization: Bearer $OVH_TOKEN"{ "comment": "string", "description": "string", "duration": "indeterminated"}
List batchesProduction
Returns the batches of the SMS account.
Path parameters
The internal name of your SMS offer
Response
SMS account ID
Creation datetime
Details on error(s) on the batch, if any
The estimated cost of the batch in credits
Datetime when the batch finished processing SMSs
SMS sender
Batch ID
SMS message
Batch name
Number of processed records in this batch
SMS receivers list
Datetime when the SMSs of the batch are sent (based on deferred time if exists)
Slot ID
Datetime when the batch started processing SMSs
Batch status
CANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCELTotal number of records in this batch
Last update datetime
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ batches \
-H "authorization: Bearer $OVH_TOKEN"[ { "accountID": 0, "createdAt": "2024-01-01T12:00:00Z", "errors": [ { "message": "string", "receiver": "string" } ], "estimatedCredits": 0, "finishedAt": "2024-01-01T12:00:00Z", "from": "string", "id": "00000000-0000-0000-0000-000000000000", "message": "string", "name": "string", "processedRecords": 0, "receivers": [ "string" ], "sentAt": "2024-01-01T12:00:00Z", "slotID": "string", "startedAt": "2024-01-01T12:00:00Z", "status": "CANCELED", "totalRecords": 0, "updatedAt": "2024-01-01T12:00:00Z" }]
Create a batchProduction
Creates a batch that sends one message to a list of receivers or to a receiver list. Set a sender, or ask for one that allows replies. Sending can be deferred to a later date.
Path parameters
The internal name of your SMS offer
Request body (required)
Deprecated: SMS class
FLASHPHONESIMSMS deferred sending date
SMS sender. Either "from" or "senderForResponse" must be passed
SMS message
Batch name
STOP clause not needed
Ask to compute a sender that allows response. Either "from" or "senderForResponse" must be passed
SMS receivers slot ID. Either "to" or "slotID" must be passed
SMS tag
SMS receivers list. Either "to" or "slotID" must be passed
Response
SMS account ID
Creation datetime
Details on error(s) on the batch, if any
The estimated cost of the batch in credits
Datetime when the batch finished processing SMSs
SMS sender
Batch ID
SMS message
Batch name
Number of processed records in this batch
SMS receivers list
Datetime when the SMSs of the batch are sent (based on deferred time if exists)
Slot ID
Datetime when the batch started processing SMSs
Batch status
CANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCELTotal number of records in this batch
Last update datetime
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ batches \
-H "authorization: Bearer $OVH_TOKEN"{ "accountID": 0, "createdAt": "2024-01-01T12:00:00Z", "errors": [ { "message": "string", "receiver": "string" } ], "estimatedCredits": 0, "finishedAt": "2024-01-01T12:00:00Z", "from": "string", "id": "00000000-0000-0000-0000-000000000000", "message": "string", "name": "string", "processedRecords": 0, "receivers": [ "string" ], "sentAt": "2024-01-01T12:00:00Z", "slotID": "string", "startedAt": "2024-01-01T12:00:00Z", "status": "CANCELED", "totalRecords": 0, "updatedAt": "2024-01-01T12:00:00Z"}
Get a batchProduction
Returns the batch: message, sender, receivers, status, estimated credits and errors.
Path parameters
Id
The internal name of your SMS offer
Response
SMS account ID
Creation datetime
Details on error(s) on the batch, if any
The estimated cost of the batch in credits
Datetime when the batch finished processing SMSs
SMS sender
Batch ID
SMS message
Batch name
Number of processed records in this batch
SMS receivers list
Datetime when the SMSs of the batch are sent (based on deferred time if exists)
Slot ID
Datetime when the batch started processing SMSs
Batch status
CANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCELTotal number of records in this batch
Last update datetime
Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ batches/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "accountID": 0, "createdAt": "2024-01-01T12:00:00Z", "errors": [ { "message": "string", "receiver": "string" } ], "estimatedCredits": 0, "finishedAt": "2024-01-01T12:00:00Z", "from": "string", "id": "00000000-0000-0000-0000-000000000000", "message": "string", "name": "string", "processedRecords": 0, "receivers": [ "string" ], "sentAt": "2024-01-01T12:00:00Z", "slotID": "string", "startedAt": "2024-01-01T12:00:00Z", "status": "CANCELED", "totalRecords": 0, "updatedAt": "2024-01-01T12:00:00Z"}
Update a batchProduction
Updates the batch name.
Path parameters
Id
The internal name of your SMS offer
Request body (required)
Batch name
Response
SMS account ID
Creation datetime
Details on error(s) on the batch, if any
The estimated cost of the batch in credits
Datetime when the batch finished processing SMSs
SMS sender
Batch ID
SMS message
Batch name
Number of processed records in this batch
SMS receivers list
Datetime when the SMSs of the batch are sent (based on deferred time if exists)
Slot ID
Datetime when the batch started processing SMSs
Batch status
CANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCELTotal number of records in this batch
Last update datetime
Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ batches/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "accountID": 0, "createdAt": "2024-01-01T12:00:00Z", "errors": [ { "message": "string", "receiver": "string" } ], "estimatedCredits": 0, "finishedAt": "2024-01-01T12:00:00Z", "from": "string", "id": "00000000-0000-0000-0000-000000000000", "message": "string", "name": "string", "processedRecords": 0, "receivers": [ "string" ], "sentAt": "2024-01-01T12:00:00Z", "slotID": "string", "startedAt": "2024-01-01T12:00:00Z", "status": "CANCELED", "totalRecords": 0, "updatedAt": "2024-01-01T12:00:00Z"}
Delete a batchProduction
Deletes the batch.
Path parameters
Id
The internal name of your SMS offer
Response
Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ batches/ {id} \
-H "authorization: Bearer $OVH_TOKEN"Cancel a deferred batchProduction
Cancels a batch scheduled for later. Only possible if no SMS of the batch has been sent yet.
Path parameters
Id
The internal name of your SMS offer
Response
SMS account ID
Creation datetime
Details on error(s) on the batch, if any
The estimated cost of the batch in credits
Datetime when the batch finished processing SMSs
SMS sender
Batch ID
SMS message
Batch name
Number of processed records in this batch
SMS receivers list
Datetime when the SMSs of the batch are sent (based on deferred time if exists)
Slot ID
Datetime when the batch started processing SMSs
Batch status
CANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCELTotal number of records in this batch
Last update datetime
Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ batches/ {id}/ cancel \
-H "authorization: Bearer $OVH_TOKEN"{ "accountID": 0, "createdAt": "2024-01-01T12:00:00Z", "errors": [ { "message": "string", "receiver": "string" } ], "estimatedCredits": 0, "finishedAt": "2024-01-01T12:00:00Z", "from": "string", "id": "00000000-0000-0000-0000-000000000000", "message": "string", "name": "string", "processedRecords": 0, "receivers": [ "string" ], "sentAt": "2024-01-01T12:00:00Z", "slotID": "string", "startedAt": "2024-01-01T12:00:00Z", "status": "CANCELED", "totalRecords": 0, "updatedAt": "2024-01-01T12:00:00Z"}
Get batch statisticsProduction
Returns the batch statistics: delivered, sent, pending, failed and stoplisted SMS, and the credits used.
Path parameters
Id
The internal name of your SMS offer
Response
The cost of the batch in credits, computed during batch processing
Number of SMS that are delivered
The estimated cost of the batch in credits, computed before batch processing
Number of SMS in error
Batch ID
Number of SMS that are in pending status
Number of SMS that are sent to the broker
Number of SMS that received a STOP by the receiver
Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ batches/ {id}/ statistics \
-H "authorization: Bearer $OVH_TOKEN"{ "credits": 0, "delivered": 0, "estimatedCredits": 0, "failed": 0, "id": "00000000-0000-0000-0000-000000000000", "pending": 0, "sent": 0, "stoplisted": 0}
List sent SMSProduction
Returns the identifiers of the SMS sent from the account.
Path parameters
The internal name of your SMS offer
Query parameters
Filter on batch id property (=)
Filter on creationDatetime property (>=)
Filter on creationDatetime property (<=)
Filter on deliveryReceipt property (=)
Filter on differedDelivery property (=)
Filter on message id property (=)
Filter on ptt property (=)
Filter on receiver property (=)
Filter on sender property (=)
Filter on tag property (=)
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ outgoing \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get a sent SMSProduction
Returns the sent SMS: receiver, message, delivery status, number of SMS parts and credits used.
Path parameters
Id
The internal name of your SMS offer
Response
Tariff code applied on the sms
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ outgoing/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "creationDatetime": "2024-01-01T12:00:00Z", "credits": 0, "deliveredAt": "2024-01-01T12:00:00Z", "deliveryReceipt": 0, "differedDelivery": 0, "id": 0, "message": "string", "messageLength": 0, "numberOfSms": 0, "ptt": 0, "receiver": "string", "sender": "string", "sentAt": "2024-01-01T12:00:00Z", "tag": "string", "tariffCode": "string"}
Delete a sent SMSProduction
Deletes the sent SMS from the history.
Path parameters
Id
The internal name of your SMS offer
Response
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ outgoing/ {id} \
-H "authorization: Bearer $OVH_TOKEN"