Skip to content

Send & Receive

All operations require authentication.

30 operationsv1/sms/estimate · /sms/ptts · /sms/{serviceName}
Agent setup

Estimate a messageProduction

POST
/1.0/sms/estimate

Estimate a message. Returns the encoding, the length and the number of SMS parts needed to send a text message.

Request body (required)

message
required
string

The message to send

noStopClause
required
boolean

Do not display STOP clause in the message, this requires that this is not an advertising message

senderType
required
TypeSenderEnum

Sender type that will be used to send the message

Valuesalphanumericshortcodetime2chatvirtual

Response

200JobEstimatesuccessful operation
characters
integer

The number of characters the message contains, including invisible escaped characters

charactersClass
EncodingEnum

The characters class that will be used to send the SMS, depending on characters in message

Values7bitsunicode
maxCharactersPerPart
integer

The number of characters every SMS part can contain, depending on characters class and quantity of parts

parts
integer

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"
ResponseExample
{ "characters": 0, "charactersClass": "7bits", "maxCharactersPerPart": 0, "parts": 0}

List HLR lookupsProduction

GET
/1.0/sms/{serviceName}/hlr

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

serviceName
required
string

The internal name of your SMS offer

Response

200integer[]successful operation

Example uses serviceName = string

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

Get an HLR lookupProduction

GET
/1.0/sms/{serviceName}/hlr/{id}

Get an HLR lookup. Returns the result of the HLR lookup: validity, reachability, portability and roaming of the number.

Path parameters

id
required
integer

HLR id

serviceName
required
string

The internal name of your SMS offer

Response

200HlrLookupNumbersuccessful operation
datetime
read-only
stringdate-time

HLR creation datetime

id
read-only
integer

HLR id

msisdn
read-only
string

MSISDN

operatorCode
read-only
string

The {Mobile Country Code, Mobile Network Code} unique identifier

ported
read-only
boolean

Has the MSISDN been ported from its original network

reachable
read-only
boolean

Is the MSISDN currently reachable

roaming
read-only
boolean

Is the MSISDN currently roaming outside its natinal network

status
read-only
HlrStatuses

Status of the HLR request

Valuesdoingdoneerrortodo
valid
read-only
boolean

Is 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"
ResponseExample
{ "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

POST
/1.0/sms/{serviceName}/hlr

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

serviceName
required
string

The internal name of your SMS offer

Request body (required)

receivers
string[]

The receivers

receiversDocumentUrl
string

The receivers document url link in csv format

Response

200SmsSendingReportsuccessful operation
ids
integer[]
—
invalidReceivers
string[]
—
tag
string
—
totalCreditsRemoved
number
—
validReceivers
string[]
—

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/hlr \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "ids": [ 0 ], "invalidReceivers": [ "string" ], "tag": "string", "totalCreditsRemoved": 0, "validReceivers": [ "string" ]}

Get the receiver operatorProduction

GET
/1.0/sms/{serviceName}/hlr/{id}/operator

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
required
integer

HLR id

serviceName
required
string

The internal name of your SMS offer

Response

200Hlrsuccessful operation
country
read-only
string

The country

countryCode
read-only
string

The countryCode prefix number

network
read-only
string

The network name

operator
read-only
string

The operator name

region
read-only
string

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"
ResponseExample
{ "country": "string", "countryCode": "string", "network": "string", "operator": "string", "region": "string"}

List received SMSProduction

GET
/1.0/sms/{serviceName}/incoming

List received SMS. Returns the identifiers of the received SMS. Get a received SMS for its sender, message, date and credits used.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Query parameters

creationDatetime.from
stringdate-time

Filter the value of creationDatetime property (>=)

creationDatetime.to
stringdate-time

Filter the value of creationDatetime property (<=)

sender
string

Filter the value of sender property (=)

tag
string

Filter the value of tag property (=)

Response

200integer[]successful operation

Example uses serviceName = string

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

Get a received SMSProduction

GET
/1.0/sms/{serviceName}/incoming/{id}

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
required
integer

Id of the object

serviceName
required
string

The internal name of your SMS offer

Response

200Incomingsuccessful operation
creationDatetime
read-only
stringdate-time
—
credits
read-only
number
—
id
read-only
integer
—
message
read-only
string
—
sender
read-only
string
—
tag
read-only
string
—

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/incoming/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDatetime": "2024-01-01T12:00:00Z", "credits": 0, "id": 0, "message": "string", "sender": "string", "tag": "string"}

Delete a received SMSProduction

DELETE
/1.0/sms/{serviceName}/incoming/{id}

Delete a received SMS. Deletes the received SMS from the history. It no longer appears in the list of received SMS.

Path parameters

id
required
integer

Id of the object

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

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

GET
/1.0/sms/{serviceName}/jobs

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

serviceName
required
string

The internal name of your SMS offer

Response

200integer[]successful operation

Example uses serviceName = string

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

Get a pending jobProduction

GET
/1.0/sms/{serviceName}/jobs/{id}

Get a pending job. Returns the SMS waiting to be sent: receiver, message, number of SMS parts and credits.

Path parameters

id
required
integer

Id of the object

serviceName
required
string

The internal name of your SMS offer

Response

200Jobsuccessful operation
creationDatetime
read-only
stringdate-time
—
credits
read-only
number
—
deliveredAt
read-only
stringdate-time
—
deliveryReceipt
read-only
integer
—
differedDelivery
read-only
integer
—
id
read-only
integer
—
message
read-only
string
—
messageLength
read-only
integer
—
numberOfSms
read-only
integer
—
ptt
read-only
integer
—
receiver
read-only
string
—
sender
read-only
string
—
sentAt
read-only
stringdate-time
—

Example uses id = 0, serviceName = string

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

POST
/1.0/sms/{serviceName}/jobs

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

serviceName
required
string

The internal name of your SMS offer

Request body (required)

charset
CharsetEnum

The sms coding

ValuesUTF-8
class
ClassEnum

Deprecated: The sms class

ValuesflashphoneDisplaysimtoolkit
coding
CodingEnum

Deprecated: the coding is deduced from the message and its charset

Values7bit8bit
differedPeriod
integer

The time -in minute(s)- to wait before sending the message

message
required
string

The sms message

noStopClause
boolean

Do not display STOP clause in the message, this requires that this is not an advertising message

priority
PriorityEnum

The priority of the message

ValueshighlowmediumveryLow
receivers
string[]

The receivers list

receiversDocumentUrl
string

The receivers document url link in csv format

receiversSlotId
string

The receivers document slot id

sender
string

The sender

senderForResponse
boolean

Set the flag to send a special sms which can be reply by the receiver (smsResponse).

tag
string

The identifier group tag

validityPeriod
integer

The maximum time -in minute(s)- before the message is dropped

Response

200SmsSendingReportUsersuccessful operation
creditsLeft
number
—
ids
integer[]
—
invalidReceivers
string[]
—
tag
string
—
totalCreditsRemoved
number
—
validReceivers
string[]
—

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/jobs \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creditsLeft": 0, "ids": [ 0 ], "invalidReceivers": [ "string" ], "tag": "string", "totalCreditsRemoved": 0, "validReceivers": [ "string" ]}

Delete a pending jobProduction

DELETE
/1.0/sms/{serviceName}/jobs/{id}

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
required
integer

Id of the object

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

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
/1.0/sms/{serviceName}/outgoing/{id}/hlr

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
required
integer

Id of the object

serviceName
required
string

The internal name of your SMS offer

Response

200Hlrsuccessful operation
country
read-only
string

The country

countryCode
read-only
string

The countryCode prefix number

network
read-only
string

The network name

operator
read-only
string

The operator name

region
read-only
string

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"
ResponseExample
{ "country": "string", "countryCode": "string", "network": "string", "operator": "string", "region": "string"}

List message templatesProduction

GET
/1.0/sms/{serviceName}/templatesControl

List message templates. Returns the message templates. Sending SMS to the United States requires a template validated by a moderator.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Response

200string[]successful operation

Example uses serviceName = string

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

Get a message templateProduction

GET
/1.0/sms/{serviceName}/templatesControl/{name}

Get a message template. Returns the message template: pattern, activity, status and moderator comment.

Path parameters

name
required
string

Name of the template

serviceName
required
string

The internal name of your SMS offer

Response

200TemplateControlsuccessful operation
activity
TypeTemplateEnum

Specify the kind of template

Valuesalertingauthentificationtransactional
comment
read-only
string

Message sent by the moderator

datetime
read-only
stringdate-time

Template creation datetime

description
string

Template description

message
string

Message pattern to be moderated. Use "#VALUE#" format for dynamic text area.

name
string

Name of the template

status
StatusSenderEnum

Template status

ValuesdisableenablerefusedwaitingValidation

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/templatesControl/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "activity": "alerting", "comment": "string", "datetime": "2024-01-01T12:00:00Z", "description": "string", "message": "string", "name": "string", "status": "disable"}

Create a message templateProduction

POST
/1.0/sms/{serviceName}/templatesControl

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

serviceName
required
string

The internal name of your SMS offer

Request body (required)

activity
required
TypeTemplateEnum

Specify the kind of template

Valuesalertingauthentificationtransactional
description
string

Template description

message
required
string

Message pattern to be moderated. Use "#VALUE#" format for dynamic text area.

name
required
string

Name of the template

reason
string

Message seen by the moderator

Response

200—successful operation

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
/1.0/sms/{serviceName}/templatesControl/{name}

Delete a message template. Deletes the message template from the SMS account, whatever its moderation status.

Path parameters

name
required
string

Name of the template

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

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

PUT
/1.0/sms/{serviceName}/templatesControl/{name}

Update a message template. Updates the message template: description, message pattern with #VALUE# dynamic areas, and kind (alerting, authentification or transactional).

Path parameters

name
required
string

Name of the template

serviceName
required
string

The internal name of your SMS offer

Request body (required)

activity
TypeTemplateEnum

Specify the kind of template

Valuesalertingauthentificationtransactional
comment
read-only
string

Message sent by the moderator

datetime
read-only
stringdate-time

Template creation datetime

description
string

Template description

message
string

Message pattern to be moderated. Use "#VALUE#" format for dynamic text area.

name
string

Name of the template

status
StatusSenderEnum

Template status

ValuesdisableenablerefusedwaitingValidation

Response

200—successful operation

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

POST
/1.0/sms/{serviceName}/templatesControl/{name}/relaunchValidation

Relaunch template validation. Submits the message template to moderation again after a refusal, with an updated message pattern and description.

Path parameters

name
required
string

Name of the template

serviceName
required
string

The internal name of your SMS offer

Request body (required)

description
required
string

Template description

message
required
string

Message pattern to be moderated. Use "#VALUE#" format for dynamic text area

Response

200—successful operation

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
/1.0/sms/ptts

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

ptt
required
integer

The premium transaction tracking code

Response

200PttDetailssuccessful operation
comment
string

Ptt informations

description
string

Ptt short description

duration
PttDurationTypeEnum

Ptt volatility type

Valuesindeterminatedpermanenttemporary

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/sms/ptts \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "comment": "string", "description": "string", "duration": "indeterminated"}

List batchesProduction

GET
/1.0/sms/{serviceName}/batches

Returns the batches of the SMS account.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Response

200Batch[]successful operation
accountID
read-only
integer

SMS account ID

createdAt
read-only
stringdate-time

Creation datetime

errors
read-only
BatchError[]

Details on error(s) on the batch, if any

estimatedCredits
read-only
number

The estimated cost of the batch in credits

finishedAt
read-only
stringdate-time

Datetime when the batch finished processing SMSs

from
read-only
string

SMS sender

id
read-only
stringuuid

Batch ID

message
read-only
string

SMS message

name
read-only
string

Batch name

processedRecords
read-only
integer

Number of processed records in this batch

receivers
read-only
phoneNumber[]

SMS receivers list

sentAt
read-only
stringdate-time

Datetime when the SMSs of the batch are sent (based on deferred time if exists)

slotID
read-only
string

Slot ID

startedAt
read-only
stringdate-time

Datetime when the batch started processing SMSs

status
read-only
BatchStatusEnum

Batch status

ValuesCANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCEL
totalRecords
read-only
integer

Total number of records in this batch

updatedAt
read-only
stringdate-time

Last update datetime

Example uses serviceName = string

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

POST
/1.0/sms/{serviceName}/batches

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

serviceName
required
string

The internal name of your SMS offer

Request body (required)

class
BatchClassEnum

Deprecated: SMS class

ValuesFLASHPHONESIM
deferred
stringdate-time

SMS deferred sending date

from
string

SMS sender. Either "from" or "senderForResponse" must be passed

message
required
string

SMS message

name
string

Batch name

noStop
boolean

STOP clause not needed

senderForResponse
boolean

Ask to compute a sender that allows response. Either "from" or "senderForResponse" must be passed

slotID
string

SMS receivers slot ID. Either "to" or "slotID" must be passed

tag
string

SMS tag

to
phoneNumber[]

SMS receivers list. Either "to" or "slotID" must be passed

Response

200Batchsuccessful operation
accountID
read-only
integer

SMS account ID

createdAt
read-only
stringdate-time

Creation datetime

errors
read-only
BatchError[]

Details on error(s) on the batch, if any

estimatedCredits
read-only
number

The estimated cost of the batch in credits

finishedAt
read-only
stringdate-time

Datetime when the batch finished processing SMSs

from
read-only
string

SMS sender

id
read-only
stringuuid

Batch ID

message
read-only
string

SMS message

name
read-only
string

Batch name

processedRecords
read-only
integer

Number of processed records in this batch

receivers
read-only
phoneNumber[]

SMS receivers list

sentAt
read-only
stringdate-time

Datetime when the SMSs of the batch are sent (based on deferred time if exists)

slotID
read-only
string

Slot ID

startedAt
read-only
stringdate-time

Datetime when the batch started processing SMSs

status
read-only
BatchStatusEnum

Batch status

ValuesCANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCEL
totalRecords
read-only
integer

Total number of records in this batch

updatedAt
read-only
stringdate-time

Last update datetime

Example uses serviceName = string

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

GET
/1.0/sms/{serviceName}/batches/{id}

Returns the batch: message, sender, receivers, status, estimated credits and errors.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

The internal name of your SMS offer

Response

200Batchsuccessful operation
accountID
read-only
integer

SMS account ID

createdAt
read-only
stringdate-time

Creation datetime

errors
read-only
BatchError[]

Details on error(s) on the batch, if any

estimatedCredits
read-only
number

The estimated cost of the batch in credits

finishedAt
read-only
stringdate-time

Datetime when the batch finished processing SMSs

from
read-only
string

SMS sender

id
read-only
stringuuid

Batch ID

message
read-only
string

SMS message

name
read-only
string

Batch name

processedRecords
read-only
integer

Number of processed records in this batch

receivers
read-only
phoneNumber[]

SMS receivers list

sentAt
read-only
stringdate-time

Datetime when the SMSs of the batch are sent (based on deferred time if exists)

slotID
read-only
string

Slot ID

startedAt
read-only
stringdate-time

Datetime when the batch started processing SMSs

status
read-only
BatchStatusEnum

Batch status

ValuesCANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCEL
totalRecords
read-only
integer

Total number of records in this batch

updatedAt
read-only
stringdate-time

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"
ResponseExample
{ "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

PUT
/1.0/sms/{serviceName}/batches/{id}

Updates the batch name.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

The internal name of your SMS offer

Request body (required)

name
required
string

Batch name

Response

200Batchsuccessful operation
accountID
read-only
integer

SMS account ID

createdAt
read-only
stringdate-time

Creation datetime

errors
read-only
BatchError[]

Details on error(s) on the batch, if any

estimatedCredits
read-only
number

The estimated cost of the batch in credits

finishedAt
read-only
stringdate-time

Datetime when the batch finished processing SMSs

from
read-only
string

SMS sender

id
read-only
stringuuid

Batch ID

message
read-only
string

SMS message

name
read-only
string

Batch name

processedRecords
read-only
integer

Number of processed records in this batch

receivers
read-only
phoneNumber[]

SMS receivers list

sentAt
read-only
stringdate-time

Datetime when the SMSs of the batch are sent (based on deferred time if exists)

slotID
read-only
string

Slot ID

startedAt
read-only
stringdate-time

Datetime when the batch started processing SMSs

status
read-only
BatchStatusEnum

Batch status

ValuesCANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCEL
totalRecords
read-only
integer

Total number of records in this batch

updatedAt
read-only
stringdate-time

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"
ResponseExample
{ "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

DELETE
/1.0/sms/{serviceName}/batches/{id}

Deletes the batch.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

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

POST
/1.0/sms/{serviceName}/batches/{id}/cancel

Cancels a batch scheduled for later. Only possible if no SMS of the batch has been sent yet.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

The internal name of your SMS offer

Response

200Batchsuccessful operation
accountID
read-only
integer

SMS account ID

createdAt
read-only
stringdate-time

Creation datetime

errors
read-only
BatchError[]

Details on error(s) on the batch, if any

estimatedCredits
read-only
number

The estimated cost of the batch in credits

finishedAt
read-only
stringdate-time

Datetime when the batch finished processing SMSs

from
read-only
string

SMS sender

id
read-only
stringuuid

Batch ID

message
read-only
string

SMS message

name
read-only
string

Batch name

processedRecords
read-only
integer

Number of processed records in this batch

receivers
read-only
phoneNumber[]

SMS receivers list

sentAt
read-only
stringdate-time

Datetime when the SMSs of the batch are sent (based on deferred time if exists)

slotID
read-only
string

Slot ID

startedAt
read-only
stringdate-time

Datetime when the batch started processing SMSs

status
read-only
BatchStatusEnum

Batch status

ValuesCANCELEDCANCELINGCOMPLETEDFAILEDINSERTEDINSERTINGPENDINGTO_CANCEL
totalRecords
read-only
integer

Total number of records in this batch

updatedAt
read-only
stringdate-time

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"
ResponseExample
{ "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

GET
/1.0/sms/{serviceName}/batches/{id}/statistics

Returns the batch statistics: delivered, sent, pending, failed and stoplisted SMS, and the credits used.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

The internal name of your SMS offer

Response

200BatchStatisticssuccessful operation
credits
read-only
number

The cost of the batch in credits, computed during batch processing

delivered
read-only
integer

Number of SMS that are delivered

estimatedCredits
read-only
number

The estimated cost of the batch in credits, computed before batch processing

failed
read-only
integer

Number of SMS in error

id
read-only
stringuuid

Batch ID

pending
read-only
integer

Number of SMS that are in pending status

sent
read-only
integer

Number of SMS that are sent to the broker

stoplisted
read-only
integer

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"
ResponseExample
{ "credits": 0, "delivered": 0, "estimatedCredits": 0, "failed": 0, "id": "00000000-0000-0000-0000-000000000000", "pending": 0, "sent": 0, "stoplisted": 0}

List sent SMSProduction

GET
/1.0/sms/{serviceName}/outgoing

Returns the identifiers of the SMS sent from the account.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Query parameters

batchID
stringuuid

Filter on batch id property (=)

creationDatetime.from
stringdate-time

Filter on creationDatetime property (>=)

creationDatetime.to
stringdate-time

Filter on creationDatetime property (<=)

deliveryReceipt
integer

Filter on deliveryReceipt property (=)

differedDelivery
integer

Filter on differedDelivery property (=)

messageID
stringuuid

Filter on message id property (=)

ptt
integer

Filter on ptt property (=)

receiver
string

Filter on receiver property (=)

sender
string

Filter on sender property (=)

tag
string

Filter on tag property (=)

Response

200integer[]successful operation

Example uses serviceName = string

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

Get a sent SMSProduction

GET
/1.0/sms/{serviceName}/outgoing/{id}

Returns the sent SMS: receiver, message, delivery status, number of SMS parts and credits used.

Path parameters

id
required
integer

Id

serviceName
required
string

The internal name of your SMS offer

Response

200Outgoingsuccessful operation
creationDatetime
read-only
stringdate-time
—
credits
read-only
number
—
deliveredAt
read-only
stringdate-time
—
deliveryReceipt
read-only
integer
—
differedDelivery
read-only
integer
—
id
read-only
integer
—
message
read-only
string
—
messageLength
read-only
integer
—
numberOfSms
read-only
integer
—
ptt
read-only
integer
—
receiver
read-only
string
—
sender
read-only
string
—
sentAt
read-only
stringdate-time
—
tag
read-only
string
—
tariffCode
read-only
string

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"
ResponseExample
{ "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
/1.0/sms/{serviceName}/outgoing/{id}

Deletes the sent SMS from the history.

Path parameters

id
required
integer

Id

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

Example uses id = 0, serviceName = string

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