Skip to content

Contacts

All operations require authentication.

19 operationsv1/sms/{serviceName}
Agent setup

List phonebooksProduction

GET
/1.0/sms/{serviceName}/phonebooks

List phonebooks. Returns the identifiers (bookKey) of the phonebooks of the SMS account. A phonebook stores contacts with their phone numbers.

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

Get a phonebookProduction

GET
/1.0/sms/{serviceName}/phonebooks/{bookKey}

Get a phonebook. Returns the name and the identifier (bookKey) of the phonebook. Its contacts are listed with the phonebookContact route.

Path parameters

bookKey
required
string

Identifier of the phonebook

serviceName
required
string

The internal name of your SMS offer

Response

200Phonebooksuccessful operation
bookKey
read-only
string

Identifier of the phonebook

name
string

Phonebook name

phoneKey
read-only
string

Phone key identifier between the phone and phonebooks

Example uses bookKey = string, serviceName = string

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

Create a phonebookProduction

POST
/1.0/sms/{serviceName}/phonebooks

Create a phonebook. Creates a phonebook with a name. Returns its identifier (bookKey), used to add or import contacts.

Path parameters

serviceName
required
string

The internal name of your SMS offer

Request body (required)

name
required
string

Name of the wanted phonebook

Response

200stringsuccessful operation

Example uses serviceName = string

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

Delete a phonebookProduction

DELETE
/1.0/sms/{serviceName}/phonebooks/{bookKey}

Delete a phonebook. Deletes the phonebook and its contacts. Export the contacts first to keep a copy of them.

Path parameters

bookKey
required
string

Identifier of the phonebook

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

Example uses bookKey = string, serviceName = string

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

Update a phonebookProduction

PUT
/1.0/sms/{serviceName}/phonebooks/{bookKey}

Update a phonebook. Updates the name of the phonebook. The contacts are updated one by one with the phonebookContact route.

Path parameters

bookKey
required
string

Identifier of the phonebook

serviceName
required
string

The internal name of your SMS offer

Request body (required)

bookKey
read-only
string

Identifier of the phonebook

name
string

Phonebook name

phoneKey
read-only
string

Phone key identifier between the phone and phonebooks

Response

200—successful operation

Example uses bookKey = string, serviceName = string

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

Export contactsProduction

GET
/1.0/sms/{serviceName}/phonebooks/{bookKey}/export

Export contacts. Exports the contacts of the phonebook to a file in CSV format. Returns the file to download.

Path parameters

bookKey
required
string

Identifier of the phonebook

serviceName
required
string

The internal name of your SMS offer

Query parameters

format
required
ContactsExportFormatsEnum

Format of the file

Valuescsv

Response

200PcsFilesuccessful operation
filename
read-only
string
—
status
read-only
PcsFileStatusEnum

File providing task status

Valuesdoingdoneerrortodo
url
read-only
string
—
urlExpirationDatetime
read-only
stringdate-time
—

Example uses bookKey = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/phonebooks/{bookKey}/export \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "filename": "string", "status": "doing", "url": "string", "urlExpirationDatetime": "2024-01-01T12:00:00Z"}

Import contactsProduction

POST
/1.0/sms/{serviceName}/phonebooks/{bookKey}/import

Import contacts. Imports contacts into the phonebook from an Excel (.xls, .xlsx) or CSV file in /me/document. Returns the task that performs the import.

Path parameters

bookKey
required
string

Identifier of the phonebook

serviceName
required
string

The internal name of your SMS offer

Request body (required)

documentId
required
string

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

Response

200Tasksuccessful operation
action
read-only
string

Action associated with the task

message
read-only
string

Potential failure reason of the task

objectCreated
read-only
string

Object potentially created at the end of the task

serviceType
read-only
string
—
status
read-only
TaskStatusEnum

Status of the task

Valuesdoingdoneerrorpausetodo
taskId
read-only
integer
—

Example uses bookKey = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/phonebooks/{bookKey}/import \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "action": "string", "message": "string", "objectCreated": "string", "serviceType": "string", "status": "doing", "taskId": 0}

List contactsProduction

GET
/1.0/sms/{serviceName}/phonebooks/{bookKey}/phonebookContact

List contacts. Returns the identifiers of the contacts of the phonebook. Get a contact for its name, group and phone numbers.

Path parameters

bookKey
required
string

Identifier of the phonebook

serviceName
required
string

The internal name of your SMS offer

Response

200integer[]successful operation

Example uses bookKey = string, serviceName = string

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

Get a contactProduction

GET
/1.0/sms/{serviceName}/phonebooks/{bookKey}/phonebookContact/{id}

Get a contact. Returns the contact: name, surname, group, and office and home phone numbers, landline and mobile.

Path parameters

bookKey
required
string

Identifier of the phonebook

id
required
integer

Contact identifier

serviceName
required
string

The internal name of your SMS offer

Response

200PhonebookContactsuccessful operation
group
string

Group name of the phonebook

homeMobile
internationalPhoneNumber

Home mobile phone number of the contact

homePhone
internationalPhoneNumber

Home landline phone number of the contact

id
read-only
integer

Contact identifier

name
string

Contact name

surname
string

Contact surname

workMobile
internationalPhoneNumber

Mobile phone office number of the contact

workPhone
internationalPhoneNumber

Landline phone office number of the contact

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

$ curl https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/phonebooks/{bookKey}/phonebookContact/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "group": "string", "homeMobile": "string", "homePhone": "string", "id": 0, "name": "string", "surname": "string", "workMobile": "string", "workPhone": "string"}

Create a contactProduction

POST
/1.0/sms/{serviceName}/phonebooks/{bookKey}/phonebookContact

Create a contact. Creates a contact in the phonebook with a name, surname, group and phone numbers. Returns its identifier.

Path parameters

bookKey
required
string

Identifier of the phonebook

serviceName
required
string

The internal name of your SMS offer

Request body (required)

group
required
string

Group name of the phonebook

homeMobile
internationalPhoneNumber

Home mobile phone number of the contact

homePhone
internationalPhoneNumber

Home landline phone number of the contact

name
required
string

Name of the contact

surname
required
string

Contact surname

workMobile
internationalPhoneNumber

Mobile phone office number of the contact

workPhone
internationalPhoneNumber

Landline phone office number of the contact

Response

200integersuccessful operation

Example uses bookKey = string, serviceName = string

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

Delete a contactProduction

DELETE
/1.0/sms/{serviceName}/phonebooks/{bookKey}/phonebookContact/{id}

Delete a contact. Deletes the contact from the phonebook, with its name, group and office and home phone numbers.

Path parameters

bookKey
required
string

Identifier of the phonebook

id
required
integer

Contact identifier

serviceName
required
string

The internal name of your SMS offer

Response

200—successful operation

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

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

Update a contactProduction

PUT
/1.0/sms/{serviceName}/phonebooks/{bookKey}/phonebookContact/{id}

Update a contact. Updates the contact: name, surname, group, and office and home phone numbers, landline and mobile.

Path parameters

bookKey
required
string

Identifier of the phonebook

id
required
integer

Contact identifier

serviceName
required
string

The internal name of your SMS offer

Request body (required)

group
string

Group name of the phonebook

homeMobile
internationalPhoneNumber

Home mobile phone number of the contact

homePhone
internationalPhoneNumber

Home landline phone number of the contact

id
read-only
integer

Contact identifier

name
string

Contact name

surname
string

Contact surname

workMobile
internationalPhoneNumber

Mobile phone office number of the contact

workPhone
internationalPhoneNumber

Landline phone office number of the contact

Response

200—successful operation

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

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

List receiver listsProduction

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

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

Get a receiver listProduction

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

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

Path parameters

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

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

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

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

serviceName
required
string

The internal name of your SMS offer

slotId
required
integer

Slot number id

Response

200—successful operation

Example uses serviceName = string, slotId = 0

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

Update a receiver listProduction

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

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

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

Clean a receiver listProduction

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

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

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

Get the receiver list CSVProduction

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

serviceName
required
string

The internal name of your SMS offer

slotId
required
integer

Slot number id

Response

200stringsuccessful operation

Example uses serviceName = string, slotId = 0

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