Skip to content

API Users

All operations require authentication.

24 operationsv1/sms/{serviceName}
Agent setup

List usersProduction

GET
/1.0/sms/{serviceName}/users

List users. Returns the logins of the API users of the SMS account. Each user sends SMS with its own login, callback URLs, quota and IP restrictions.

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}/users \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get a userProduction

GET
/1.0/sms/{serviceName}/users/{login}

Get a user. Returns the API user: login, callback URLs, quota left and status, alert threshold and the IP addresses allowed to send SMS.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Response

200Usersuccessful operation
alertThresholdInformations
AlertThreshold

A structure describing all information about alert threshold informations

callBack
string

URL called when state of a sent SMS changes

ipRestrictions
string[]
—
login
read-only
string

The sms user login

password
string
—
quotaInformations
Quota

A structure describing all information about quota informations

stopCallBack
string

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

Example uses login = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "alertThresholdInformations": { "alertEmail": "string", "alertNumber": "string", "alertThreshold": 0, "support": "both" }, "callBack": "string", "ipRestrictions": [ "string" ], "login": "string", "password": "string", "quotaInformations": { "quotaLeft": 0, "quotaStatus": "active" }, "stopCallBack": "string"}

Create a userProduction

POST
/1.0/sms/{serviceName}/users

Create a user. Creates an API user with a login and a password, to send SMS with its own callback URLs, quota and IP restrictions.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Request body (required)

login
required
string

The sms login

password
required
string

The sms password

Response

200—successful operation

Example uses serviceName = string

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

Delete a userProduction

DELETE
/1.0/sms/{serviceName}/users/{login}

Delete a user. Deletes the API user of the SMS account. Its login and password can no longer be used to send SMS.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

Example uses login = string, serviceName = string

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

Update a userProduction

PUT
/1.0/sms/{serviceName}/users/{login}

Update a user. Updates the API user: password, callback URLs, quota, alert threshold and the IP addresses allowed to send SMS.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Request body (required)

alertThresholdInformations
AlertThreshold

A structure describing all information about alert threshold informations

callBack
string

URL called when state of a sent SMS changes

ipRestrictions
string[]
—
login
read-only
string

The sms user login

password
string
—
quotaInformations
Quota

A structure describing all information about quota informations

stopCallBack
string

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

Response

200—successful operation

Example uses login = string, serviceName = string

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

Export SMS to a documentProduction

GET
/1.0/sms/{serviceName}/users/{login}/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

login
required
string

The sms user login

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 (<=)

tag
string

Select sms with a specific identifier group tag

wayType
required
DocumentWayTypeEnum

specify outgoing or incoming sms

Valuesincomingoutgoing

Response

200stringsuccessful operation

Example uses login = string, serviceName = string

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

List received SMSProduction

GET
/1.0/sms/{serviceName}/users/{login}/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

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Query parameters

sender
string

Filter the value of sender property (=)

tag
string

Filter the value of tag property (=)

Response

200integer[]successful operation

Example uses login = string, serviceName = string

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

Get a received SMSProduction

GET
/1.0/sms/{serviceName}/users/{login}/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

login
required
string

The sms user login

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, login = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/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}/users/{login}/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

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

Example uses id = 0, login = string, serviceName = string

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

List pending jobsProduction

GET
/1.0/sms/{serviceName}/users/{login}/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

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Response

200integer[]successful operation

Example uses login = string, serviceName = string

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

Get a pending jobProduction

GET
/1.0/sms/{serviceName}/users/{login}/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

login
required
string

The sms user login

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, login = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/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}/users/{login}/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

login
required
string

The sms user login

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 login = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/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}/users/{login}/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

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

Example uses id = 0, login = string, serviceName = string

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

List sent SMSProduction

GET
/1.0/sms/{serviceName}/users/{login}/outgoing

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

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Query parameters

deliveryReceipt
integer

Filter the value of deliveryReceipt property (=)

differedDelivery
integer

Filter the value of differedDelivery property (=)

ptt
integer

Filter the value of ptt property (=)

receiver
string

Filter the value of receiver property (=)

sender
string

Filter the value of sender property (=)

tag
string

Filter the value of tag property (=)

Response

200integer[]successful operation

Example uses login = string, serviceName = string

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

Get a sent SMSProduction

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

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

Path parameters

id
required
integer

Id of the object

login
required
string

The sms user login

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, login = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/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}/users/{login}/outgoing/{id}

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

Id of the object

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

Example uses id = 0, login = string, serviceName = string

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

Get the receiver operatorProduction

GET
/1.0/sms/{serviceName}/users/{login}/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

login
required
string

The sms user login

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, login = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/outgoing/{id}/hlr \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "country": "string", "countryCode": "string", "network": "string", "operator": "string", "region": "string"}

List receiver listsProduction

GET
/1.0/sms/{serviceName}/users/{login}/receivers

List receiver lists. Returns the identifiers (slotId) of the receiver lists. A receiver list is a CSV or text document of numbers, used to send SMS in bulk.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Response

200integer[]successful operation

Example uses login = string, serviceName = string

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

Get a receiver listProduction

GET
/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}

Get a receiver list. Returns the receiver list: description, number of records and automatic update settings.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

slotId
required
integer

Slot number id

Response

200Receiversuccessful operation
autoUpdate
boolean

Download file from URL before sending to contacts (works only with csvUrl and not document ID)

canAutoUpdate
read-only
boolean

Is the object compatible with autoUpdate

datetime
read-only
stringdate-time

Creation date of the document

description
string

Description name of the document

records
read-only
integer

Number of receiver records in the document

slotId
read-only
integer

Slot number id

Example uses login = string, serviceName = string, slotId = 0

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers/{slotId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "autoUpdate": true, "canAutoUpdate": true, "datetime": "2024-01-01T12:00:00Z", "description": "string", "records": 0, "slotId": 0}

Create a receiver listProduction

POST
/1.0/sms/{serviceName}/users/{login}/receivers

Create a receiver list. Creates a receiver list from a CSV file, given as a /me/document identifier or a URL. With a URL, the file can be downloaded again before each sending.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

Request body (required)

autoUpdate
required
boolean

Download file from URL before sending to contacts (works only with csvUrl and not document ID)

csvUrl
string

URL of the file you want to import

description
required
string

Description name of the document

documentId
string

ID of the /me/document file you want to import

slotId
required
integer

Slot number id used to handle the document

Response

200Receiversuccessful operation
autoUpdate
boolean

Download file from URL before sending to contacts (works only with csvUrl and not document ID)

canAutoUpdate
read-only
boolean

Is the object compatible with autoUpdate

datetime
read-only
stringdate-time

Creation date of the document

description
string

Description name of the document

records
read-only
integer

Number of receiver records in the document

slotId
read-only
integer

Slot number id

Example uses login = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "autoUpdate": true, "canAutoUpdate": true, "datetime": "2024-01-01T12:00:00Z", "description": "string", "records": 0, "slotId": 0}

Delete a receiver listProduction

DELETE
/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}

Delete a receiver list. Deletes the receiver list. It can no longer be used as the receivers of an SMS sending (receiversSlotId).

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

slotId
required
integer

Slot number id

Response

200—successful operation

Example uses login = string, serviceName = string, slotId = 0

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

Update a receiver listProduction

PUT
/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}

Update a receiver list. Updates the description of the receiver list and its automatic update, which downloads the file from its URL before each sending.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

slotId
required
integer

Slot number id

Request body (required)

autoUpdate
boolean

Download file from URL before sending to contacts (works only with csvUrl and not document ID)

canAutoUpdate
read-only
boolean

Is the object compatible with autoUpdate

datetime
read-only
stringdate-time

Creation date of the document

description
string

Description name of the document

records
read-only
integer

Number of receiver records in the document

slotId
read-only
integer

Slot number id

Response

200—successful operation

Example uses login = string, serviceName = string, slotId = 0

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

Clean a receiver listProduction

POST
/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}/clean

Clean a receiver list. Removes the invalid and inactive numbers from the receiver list, with an HLR lookup on each number. A report is sent by email at the end.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

slotId
required
integer

Slot number id

Request body (required)

freemium
required
boolean

Limit checks to syntaxical validation

priceOnly
required
boolean

Only get action's price in credits without executing it

Response

200ReceiversAsynchronousCleanReportsuccessful operation
taskId
integer
—
totalCreditsRemoved
number
—

Example uses login = string, serviceName = string, slotId = 0

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}/clean \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "taskId": 0, "totalCreditsRemoved": 0}

Get the receiver list CSVProduction

GET
/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}/csv

Get the receiver list CSV. Returns the content of the receiver list in CSV format. The number of records is given when getting the receiver list.

Path parameters

login
required
string

The sms user login

serviceName
required
string

The internal name of your SMS offer

slotId
required
integer

Slot number id

Response

200stringsuccessful operation

Example uses login = string, serviceName = string, slotId = 0

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