SMS Virtual Numbers
All operations require authentication.
List virtual numbersProduction
List virtual numbers. Returns the virtual numbers of the customer, as services. A virtual number receives SMS and lets receivers reply to the messages sent.
Query parameters
Filter resources on IAM tags
Response
Reads your token from $OVH_TOKEN
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ virtualNumbers \
-H "authorization: Bearer $OVH_TOKEN"[ "string"]
Get a virtual number serviceProduction
Get a virtual number service. Returns the virtual number service, with the number and the ISO code of its country.
Path parameters
Your virtual number
Response
The ISO formated country code of the number
bechdeesfrukIAM resource metadata
The virtual number
Example uses number = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ virtualNumbers/ {number} \
-H "authorization: Bearer $OVH_TOKEN"{ "countryCode": "be", "iam": { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "state": "EXPIRED", "tags": { "key": "string" }, "urn": "string" }, "number": "string"}
Get service informationProduction
Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.
Path parameters
Your virtual number
Response
Indicates that the service can be set up to be deleted at expiration
All the possible renew period of your service in month
Way of handling the renew
Detailed renewal type of a service
automaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoptionautorenewInProgressexpiredinCreationokpendingDebtunPaidExample uses number = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ virtualNumbers/ {number}/ serviceInfos \
-H "authorization: Bearer $OVH_TOKEN"{ "canDeleteAtExpiration": true, "contactAdmin": "string", "contactBilling": "string", "contactTech": "string", "creation": "2024-01-01", "domain": "string", "engagedUpTo": "2024-01-01", "expiration": "2024-01-01", "possibleRenewPeriod": [ 0 ], "renew": { "automatic": true, "deleteAtExpiration": true, "forced": true, "manualPayment": true, "period": 0 }, "renewalType": "automaticForcedProduct", "serviceId": 0, "status": "autorenewInProgress"}
Update service informationProduction
Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.
Path parameters
Your virtual number
Request body (required)
Indicates that the service can be set up to be deleted at expiration
All the possible renew period of your service in month
Way of handling the renew
Detailed renewal type of a service
automaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoptionautorenewInProgressexpiredinCreationokpendingDebtunPaidResponse
Example uses number = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ virtualNumbers/ {number}/ serviceInfos \
-H "authorization: Bearer $OVH_TOKEN"List virtual numbersProduction
List virtual numbers. Returns the virtual numbers of the account. A virtual number receives SMS and lets receivers reply.
Path parameters
The internal name of your SMS offer
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers \
-H "authorization: Bearer $OVH_TOKEN"[ "string"]
Get a virtual numberProduction
Get a virtual number. Returns the virtual number attached to the SMS account and the ISO code of its country.
Path parameters
The virtual number
The internal name of your SMS offer
Response
The ISO formated country code of the number
bechdeesfrukThe virtual number
Example uses number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number} \
-H "authorization: Bearer $OVH_TOKEN"{ "countryCode": "be", "number": "string"}
Get the web accessProduction
Get the web access. Returns the web access to the chat application of the virtual number: its URL and creation date.
Path parameters
The virtual number
The internal name of your SMS offer
Response
The creation date of this access
The url of the web access
Example uses number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ chatAccess \
-H "authorization: Bearer $OVH_TOKEN"{ "creationDate": "2024-01-01T12:00:00Z", "id": 0, "url": "string"}
Create the web accessProduction
Create the web access. Creates a web access to the chat application of the virtual number. Returns its URL.
Path parameters
The virtual number
The internal name of your SMS offer
Response
The creation date of this access
The url of the web access
Example uses number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ chatAccess \
-H "authorization: Bearer $OVH_TOKEN"{ "creationDate": "2024-01-01T12:00:00Z", "id": 0, "url": "string"}
Delete the web accessProduction
Delete the web access. Deletes the web access to the chat application of the virtual number. Its URL no longer gives access to the chat.
Path parameters
The virtual number
The internal name of your SMS offer
Response
Example uses number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ chatAccess \
-H "authorization: Bearer $OVH_TOKEN"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 virtual number
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 number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ 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 virtual number
The internal name of your SMS offer
Response
Example uses id = 0, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ 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 virtual number
The internal name of your SMS offer
Response
Example uses id = 0, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ 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 virtual number
The internal name of your SMS offer
Response
Example uses number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ 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 virtual number
The internal name of your SMS offer
Response
Example uses id = 0, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ jobs/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "creationDatetime": "2024-01-01T12:00:00Z", "credits": 0, "deliveryReceipt": 0, "differedDelivery": 0, "id": 0, "message": "string", "messageLength": 0, "numberOfSms": 0, "ptt": 0, "receiver": "string"}
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 virtual number
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
The priority of the message
highlowmediumveryLowThe receivers list
The receivers document url link in csv format
The receivers document slot id
The identifier group tag
The maximum time -in minute(s)- before the message is dropped
Response
Example uses number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ jobs \
-H "authorization: Bearer $OVH_TOKEN"{ "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 virtual number
The internal name of your SMS offer
Response
Example uses id = 0, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ jobs/ {id} \
-H "authorization: Bearer $OVH_TOKEN"List sent SMSProduction
List sent SMS. Returns the identifiers of the sent SMS. Get a sent SMS for its receiver, message, delivery status, number of SMS parts and credits used.
Path parameters
The virtual number
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 deliveryReceipt property (=)
Filter the value of differedDelivery property (=)
Filter the value of ptt property (=)
Filter the value of receiver property (=)
Filter the value of sender property (=)
Filter the value of tag property (=)
Response
Example uses number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ outgoing \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get a sent SMSProduction
Get a sent SMS. Returns the sent SMS: receiver, message, delivery status, number of SMS parts and credits used.
Path parameters
Id of the object
The virtual number
The internal name of your SMS offer
Response
Tariff code applied on the sms
Example uses id = 0, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ 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
Delete a sent SMS. Deletes the sent SMS from the history. It no longer appears in the list of sent SMS of the user or number.
Path parameters
Id of the object
The virtual number
The internal name of your SMS offer
Response
Example uses id = 0, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ outgoing/ {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 virtual number
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, number = string, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ sms/ {serviceName}/ virtualNumbers/ {number}/ outgoing/ {id}/ hlr \
-H "authorization: Bearer $OVH_TOKEN"{ "country": "string", "countryCode": "string", "network": "string", "operator": "string", "region": "string"}