Skip to content

Account

All operations require authentication, except the 2 marked Public.

13 operationsv1/sms · /sms/rates · /sms/{serviceName}
Agent setup

List SMS accountsProduction

GET
/1.0/sms

List SMS accounts. Returns the service names of the SMS accounts of the customer. Get an SMS account for its status, credits left and settings.

Query parameters

iamTags
object

Filter resources on IAM tags

Response

200string[]successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/sms \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get rates for a countryProductionPublic

GET
/1.0/sms/rates/destinations

Get rates for a country. Returns the credits consumed and the price of one SMS sent to a country, for credits bought in the billing country, with the VAT rate.

Query parameters

billingCountry
BillingCountryEnum

Country where you buy credits

Valuesesfrgbieitpl
country
required
CountryEnum

Country where you send SMS

Valuesadaeafagaialallamanaoaratauawazbabbbdbebfbgbhbibjbmbnbobrbsbtbwbybzcacdcfcgchcickclcmcncocrcucvcyczdedkdmdzeceeegesetfifjfkfofrgagbgdgegfghgiglgmgngpgqgrgtgugwgyhkhnhrhthuidieilinioiqirisitjmjojpkekgkhkmknkrkwkykzlalblclilklrlsltlulvlymamdmemgmkmlmnmomqmrmsmtmumvmwmxmymznancnengninlnonpnzompapepfpgphpkplpsptpyqarerorsrurwsasbscsdsesgsiskslsmsnsosrstsvsysztctdtgthtjtltmtntotrtttwtzuaugusuyuzvcvevgvivnvuwsyeytzazmzw

Response

200DestinationRatessuccessful operation
country
string

The country full name

countryCode
CountryEnum

The country 2-letters code

Valuesadaeafagaialallamanaoaratauawazbabbbdbebfbgbhbibjbmbnbobrbsbtbwbybzcacdcfcgchcickclcmcncocrcucvcyczdedkdmdzeceeegesetfifjfkfofrgagbgdgegfghgiglgmgngpgqgrgtgugwgyhkhnhrhthuidieilinioiqirisitjmjojpkekgkhkmknkrkwkykzlalblclilklrlsltlulvlymamdmemgmkmlmnmomqmrmsmtmumvmwmxmymznancnengninlnonpnzompapepfpgphpkplpsptpyqarerorsrurwsasbscsdsesgsiskslsmsnsosrstsvsysztctdtgthtjtltmtntotrtttwtzuaugusuyuzvcvevgvivnvuwsyeytzazmzw
credit
number

Credits consumed by sending one SMS towards the given destination

price
Price

Price of one SMS sent towards the given destination

vatRate
number

The VAT rate applied from the provided billing country.

Public: no token needed

$ curl https://api.eu.ovhcloud.com/1.0/sms/rates/destinations
ResponseExample
{ "country": "string", "countryCode": "ad", "credit": 0, "price": { "currencyCode": "AUD", "text": "string", "value": 0 }, "vatRate": 0}

List SMS pack pricesProductionPublic

GET
/1.0/sms/rates/packs

List SMS pack prices. Returns the SMS packs that can be bought for a destination country: credit and SMS quantities, prices, discount and VAT rate.

Query parameters

billingCountry
BillingCountryEnum

Country where you buy credits

Valuesesfrgbieitpl
country
required
CountryEnum

Country where you send SMS

Valuesadaeafagaialallamanaoaratauawazbabbbdbebfbgbhbibjbmbnbobrbsbtbwbybzcacdcfcgchcickclcmcncocrcucvcyczdedkdmdzeceeegesetfifjfkfofrgagbgdgegfghgiglgmgngpgqgrgtgugwgyhkhnhrhthuidieilinioiqirisitjmjojpkekgkhkmknkrkwkykzlalblclilklrlsltlulvlymamdmemgmkmlmnmomqmrmsmtmumvmwmxmymznancnengninlnonpnzompapepfpgphpkplpsptpyqarerorsrurwsasbscsdsesgsiskslsmsnsosrstsvsysztctdtgthtjtltmtntotrtttwtzuaugusuyuzvcvevgvivnvuwsyeytzazmzw

Response

200PackDetails[]successful operation
countryCode
CountryEnum

Destination country code

Valuesadaeafagaialallamanaoaratauawazbabbbdbebfbgbhbibjbmbnbobrbsbtbwbybzcacdcfcgchcickclcmcncocrcucvcyczdedkdmdzeceeegesetfifjfkfofrgagbgdgegfghgiglgmgngpgqgrgtgugwgyhkhnhrhthuidieilinioiqirisitjmjojpkekgkhkmknkrkwkykzlalblclilklrlsltlulvlymamdmemgmkmlmnmomqmrmsmtmumvmwmxmymznancnengninlnonpnzompapepfpgphpkplpsptpyqarerorsrurwsasbscsdsesgsiskslsmsnsosrstsvsysztctdtgthtjtltmtntotrtttwtzuaugusuyuzvcvevgvivnvuwsyeytzazmzw
credit
number

Credits consumed by sending one SMS towards the given destination

creditPrice
Price

Price of one credit, including pack's promotion

creditQuantityMax
integer

Maximum quantity (excluded) of credit to order to have this price

creditQuantityMin
integer

Minimum quantity (included) of credit to order to have this price

discountCreditPrice
Price

Price of one credit, during a promotional event

discountPercentage
integer

Percentage applied as part of a promotional event

discountSmsPrice
Price

Price of one SMS, during a promotional event

smsPrice
Price

Price of one SMS sent towards the given destination, including pack's promotion

smsQuantityMax
integer

Maximum quantity (excluded) of SMS you can obtain with this pack

smsQuantityMin
integer

Minimum quantity (included) of SMS you can obtain with this pack

vatRate
number

The VAT rate applied from the provided billing country.

Public: no token needed

$ curl https://api.eu.ovhcloud.com/1.0/sms/rates/packs
ResponseExample
[ { "countryCode": "ad", "credit": 0, "creditPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }, "creditQuantityMax": 0, "creditQuantityMin": 0, "discountCreditPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }, "discountPercentage": 0, "discountSmsPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }, "smsPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }, "smsQuantityMax": 0, "smsQuantityMin": 0, "vatRate": 0 }]

Get an SMS accountProduction

GET
/1.0/sms/{serviceName}

Get an SMS account. Returns the SMS account: status, credits left, callback URLs, automatic recredit settings and channel.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Response

200AccountWithIAMsuccessful operation
automaticRecreditAmount
PackQuantityAutomaticRecreditEnum

Pack quantity automatic recredit possibilities

Values1002002505001000500010000
callBack
string

URL called when state of a sent SMS changes

channel
read-only
ChannelEnum

For what purpose this account can be used for

Valuesbothmarketingtransactional
creditThresholdForAutomaticRecredit
number

Credit threshold after which an automatic recredit is launched

creditsHoldByQuota
read-only
number
—
creditsLeft
read-only
number
—
description
string
—
iam
read-only
ResourceMetadata

IAM resource metadata

name
read-only
string
—
smpp
read-only
boolean

Whether the account can be used for smpp or not

smsResponse
Response

A structure describing how to manage an sms Response

status
read-only
StatusAccountEnum

Account status

Valuesdisableenable
stopCallBack
string

URL called when a STOP is received after a receiver replied stop to a SMS

templates
Templates

A structure describing all information about templates informations

userQuantityWithQuota
read-only
integer
—

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "automaticRecreditAmount": 100, "callBack": "string", "channel": "both", "creditThresholdForAutomaticRecredit": 0, "creditsHoldByQuota": 0, "creditsLeft": 0, "description": "string", "iam": { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "state": "EXPIRED", "tags": { "key": "string" }, "urn": "string" }, "name": "string", "smpp": true, "smsResponse": { "cgiUrl": "string", "responseType": "cgi", "text": "string", "trackingDefaultSmsSender": "string", "trackingOptions": [ { "media": "email", "sender": "string", "target": "string" } ] }, "status": "disable", "stopCallBack": "string", "templates": { "customizedEmailMode": true, "customizedSmsMode": true, "emailBody": "string", "emailFrom": "string", "emailSubject": "string", "smsBody": "string" }, "userQuantityWithQuota": 0}

Update an SMS accountProduction

PUT
/1.0/sms/{serviceName}

Update an SMS account. Updates the SMS account settings, such as the callback URLs, the templates and the automatic recredit.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Request body (required)

automaticRecreditAmount
PackQuantityAutomaticRecreditEnum

Pack quantity automatic recredit possibilities

Values1002002505001000500010000
callBack
string

URL called when state of a sent SMS changes

channel
read-only
ChannelEnum

For what purpose this account can be used for

Valuesbothmarketingtransactional
creditThresholdForAutomaticRecredit
number

Credit threshold after which an automatic recredit is launched

creditsHoldByQuota
read-only
number
—
creditsLeft
read-only
number
—
description
string
—
name
read-only
string
—
smpp
read-only
boolean

Whether the account can be used for smpp or not

smsResponse
Response

A structure describing how to manage an sms Response

status
read-only
StatusAccountEnum

Account status

Valuesdisableenable
stopCallBack
string

URL called when a STOP is received after a receiver replied stop to a SMS

templates
Templates

A structure describing all information about templates informations

userQuantityWithQuota
read-only
integer
—

Response

200—successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName} \
  -H "authorization: Bearer $OVH_TOKEN"

Export SMS to a documentProduction

GET
/1.0/sms/{serviceName}/document

Export SMS to a document. Generates a document with the SMS of the account, filtered by tag, date, direction or batch. Returns the identifier of the document in /me/document.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Query parameters

batchID
stringuuid

Filter SMSs with their batch ID (outgoing SMSs only)

creationDatetime.from
stringdate-time

Filter the value of creationDatetime property (>=)

creationDatetime.to
stringdate-time

Filter the value of creationDatetime property (<=)

tag
string

Select sms with a specific identifier group tag

wayType
required
DocumentWayTypeEnum

specify outgoing or incoming sms

Valuesincomingoutgoing

Response

200stringsuccessful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/document \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
"string"

List sending restrictions for a numberProduction

GET
/1.0/sms/{serviceName}/exceptions

List sending restrictions for a number. Returns the operator restrictions and substitutions that apply when sending SMS to the given number.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Query parameters

receiver
required
string

The receiver number to check

Response

200Exception[]successful operation
countrySuffixe
read-only
string

The abreviated country code.

messages
read-only
string[]

The exception message

operators
read-only
string

The list of operators impacted.

restrictionCode
read-only
RestrictionCodeEnum

The type of routing restriction imposed by the operator

ValuesALPHABAD_DLRBLOCKEDCODINGDLRFLASHONLYMSISDN
substitution
read-only
string

The substitution sender used to bypass operator filter

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/exceptions \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "countrySuffixe": "string", "messages": [ "string" ], "operators": "string", "restrictionCode": "ALPHA", "substitution": "string" }]

List SMS offersProduction

GET
/1.0/sms/{serviceName}/seeOffers

List SMS offers. Returns the SMS pack offers available for the account, by quantity and destination country.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Query parameters

countryCurrencyPrice
required
CountryEnum

Filter to have the currency country prices

Valuesallcaczdeenesfifrgbieitltmanlplppptqcrusksntnwe
countryDestination
required
CountryEnum

Filter to have the country destination

Valuesadaeafagaialallamanaoaratauawazbabbbdbebfbgbhbibjbmbnbobrbsbtbwbybzcacdcfcgchcickclcmcncocrcucvcyczdedkdmdzeceeegesetfifjfkfofrgagbgdgegfghgiglgmgngpgqgrgtgugwgyhkhnhrhthuidieilinioiqirisitjmjojpkekgkhkmknkrkwkykzlalblclilklrlsltlulvlymamdmemgmkmlmnmomqmrmsmtmumvmwmxmymznancnengninlnonpnzompapepfpgphpkplpsptpyqarerorsrurwsasbscsdsesgsiskslsmsnsosrstsvsysztctdtgthtjtltmtntotrtttwtzuaugusuyuzvcvevgvivnvuwsyeytzazmzw
quantity
required
PackQuantityEnum

Sms pack offer quantity

Values1002002505001000250050001000025000500001000001000000

Response

200PackOffer[]successful operation
countryDestination
string
—
giftPrice
number
—
giftQuantity
number
—
language
string
—
price
number
—
quantity
integer
—
smsQuantity
number
—
totalPrice
number
—

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/seeOffers \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "countryDestination": "string", "giftPrice": 0, "giftQuantity": 0, "language": "string", "price": 0, "quantity": 0, "smsQuantity": 0, "totalPrice": 0 }]

Get service informationProduction

GET
/1.0/sms/{serviceName}/serviceInfos

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Response

200Servicesuccessful operation
canDeleteAtExpiration
read-only
boolean

Indicates that the service can be set up to be deleted at expiration

contactAdmin
read-only
string
—
contactBilling
read-only
string
—
contactTech
read-only
string
—
creation
read-only
stringdate
—
domain
read-only
string
—
engagedUpTo
read-only
stringdate
—
expiration
read-only
stringdate
—
possibleRenewPeriod
read-only
integer[]

All the possible renew period of your service in month

renew
RenewType

Way of handling the renew

renewalType
read-only
RenewalTypeEnum

Detailed renewal type of a service

ValuesautomaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoption
serviceId
read-only
integer
—
status
read-only
StateEnum
—
ValuesautorenewInProgressexpiredinCreationokpendingDebtunPaid

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/serviceInfos \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "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

PUT
/1.0/sms/{serviceName}/serviceInfos

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Request body (required)

canDeleteAtExpiration
read-only
boolean

Indicates that the service can be set up to be deleted at expiration

contactAdmin
read-only
string
—
contactBilling
read-only
string
—
contactTech
read-only
string
—
creation
read-only
stringdate
—
domain
read-only
string
—
engagedUpTo
read-only
stringdate
—
expiration
read-only
stringdate
—
possibleRenewPeriod
read-only
integer[]

All the possible renew period of your service in month

renew
RenewType

Way of handling the renew

renewalType
read-only
RenewalTypeEnum

Detailed renewal type of a service

ValuesautomaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoption
serviceId
read-only
integer
—
status
read-only
StateEnum
—
ValuesautorenewInProgressexpiredinCreationokpendingDebtunPaid

Response

200—successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/serviceInfos \
  -H "authorization: Bearer $OVH_TOKEN"

List tasksProduction

GET
/1.0/sms/{serviceName}/task

List tasks. Returns the identifiers of the operations run on the SMS account. Get a task for its function, current step and status.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Query parameters

status
TaskStatusEnum

Filter the value of status property (=)

Valuesdoingdoneerrorpausetodo

Response

200integer[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/task \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get a taskProduction

GET
/1.0/sms/{serviceName}/task/{taskId}

Get a task. Returns an operation run on the SMS account, with the function performed, its current step and its status.

Path parameters

serviceName
required
string

The internal name of your SMS offer

taskId
required
integer
—

Response

200Tasksuccessful operation
function
read-only
TodoGeneralPublicFunctionsEnum

The task function

ValuescleanSmsReceivers
status
read-only
TaskStatusEnum

Task status

Valuesdoingdoneerrorpausetodo
step
read-only
TodoGeneralPublicStepsEnum

The task step

ValuescheckOrdercreateHlrsfinishingsendMailReportstartingwaitForHlrs
taskId
read-only
integer
—

Example uses serviceName = string, taskId = 0

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/task/{taskId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "function": "cleanSmsReceivers", "status": "doing", "step": "checkOrder", "taskId": 0}

Transfer creditsProduction

POST
/1.0/sms/{serviceName}/transferCredits

Transfer credits. Transfers an amount of credits from this SMS account to another SMS account, given by its service name.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Request body (required)

credits
required
number

Amount of credits to transfer.

smsAccountTarget
required
string

Sms account destination.

Response

200—successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/transferCredits \
  -H "authorization: Bearer $OVH_TOKEN"