# Web Cloud › SMS › API Users API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 24 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/sms/api-users.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/sms/api-users.json?format=openapi3

## Operations

- `GET /sms/{serviceName}/users` — List users
- `GET /sms/{serviceName}/users/{login}` — Get a user
- `POST /sms/{serviceName}/users` — Create a user
- `DELETE /sms/{serviceName}/users/{login}` — Delete a user
- `PUT /sms/{serviceName}/users/{login}` — Update a user
- `GET /sms/{serviceName}/users/{login}/document` — Export SMS to a document
- `GET /sms/{serviceName}/users/{login}/incoming` — List received SMS
- `GET /sms/{serviceName}/users/{login}/incoming/{id}` — Get a received SMS
- `DELETE /sms/{serviceName}/users/{login}/incoming/{id}` — Delete a received SMS
- `GET /sms/{serviceName}/users/{login}/jobs` — List pending jobs
- `GET /sms/{serviceName}/users/{login}/jobs/{id}` — Get a pending job
- `POST /sms/{serviceName}/users/{login}/jobs` — Send SMS
- `DELETE /sms/{serviceName}/users/{login}/jobs/{id}` — Delete a pending job
- `GET /sms/{serviceName}/users/{login}/outgoing` — List sent SMS
- `GET /sms/{serviceName}/users/{login}/outgoing/{id}` — Get a sent SMS
- `DELETE /sms/{serviceName}/users/{login}/outgoing/{id}` — Delete a sent SMS
- `GET /sms/{serviceName}/users/{login}/outgoing/{id}/hlr` — Get the receiver operator
- `GET /sms/{serviceName}/users/{login}/receivers` — List receiver lists
- `GET /sms/{serviceName}/users/{login}/receivers/{slotId}` — Get a receiver list
- `POST /sms/{serviceName}/users/{login}/receivers` — Create a receiver list
- `DELETE /sms/{serviceName}/users/{login}/receivers/{slotId}` — Delete a receiver list
- `PUT /sms/{serviceName}/users/{login}/receivers/{slotId}` — Update a receiver list
- `POST /sms/{serviceName}/users/{login}/receivers/{slotId}/clean` — Clean a receiver list
- `GET /sms/{serviceName}/users/{login}/receivers/{slotId}/csv` — Get the receiver list CSV

## List users

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/get`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users");

print_r($result);
?>
```

## Get a user

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `alertThresholdInformations` | sms.AlertThreshold |  | A structure describing all information about alert threshold informations |
| `alertThresholdInformations.alertEmail` | string |  |  |
| `alertThresholdInformations.alertNumber` | string |  |  |
| `alertThresholdInformations.alertThreshold` | integer |  |  |
| `alertThresholdInformations.support` | sms.SupportEnum |  | The media support used to be contacted in case of alert — one of `both`, `mail`, `sms` |
| `callBack` | string |  | URL called when state of a sent SMS changes |
| `ipRestrictions` | string[] |  |  |
| `login` | string | read-only | The sms user login |
| `password` | string |  |  |
| `quotaInformations` | sms.Quota |  | A structure describing all information about quota informations |
| `quotaInformations.quotaLeft` | number |  |  |
| `quotaInformations.quotaStatus` | sms.QuotaStatusUserEnum |  | Current quota status — one of `active`, `inactive` |
| `stopCallBack` | string |  | URL called when a STOP is received after a receiver replied stop to a SMS |

```json
{
  "alertThresholdInformations": {
    "alertEmail": "string",
    "alertNumber": "string",
    "alertThreshold": 0,
    "support": "both"
  },
  "callBack": "string",
  "ipRestrictions": [
    "string"
  ],
  "login": "string",
  "password": "string",
  "quotaInformations": {
    "quotaLeft": 0,
    "quotaStatus": "active"
  },
  "stopCallBack": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}");

print_r($result);
?>
```

## Create a user

`POST /1.0/sms/{serviceName}/users`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#post-sms-servicename-users

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/create`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `login` | string | yes | The sms login |
| `password` | string | yes | The sms password |

```json
{
  "login": "string",
  "password": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/sms/{serviceName}/users",
	login = None, # The sms login (type: string)
	password = None, # The sms password (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/sms/{serviceName}/users", array(
	login => null, // The sms login (type: string)
	password => null, // The sms password (type: string)
));

print_r($result);
?>
```

## Delete a user

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#delete-sms-servicename-users-login

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/delete`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/sms/{serviceName}/users/{login}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/sms/{serviceName}/users/{login}");

print_r($result);
?>
```

## Update a user

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#put-sms-servicename-users-login

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/edit`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Request body (required)

Type: `sms.User`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `alertThresholdInformations` | sms.AlertThreshold |  | A structure describing all information about alert threshold informations |
| `alertThresholdInformations.alertEmail` | string |  |  |
| `alertThresholdInformations.alertNumber` | string |  |  |
| `alertThresholdInformations.alertThreshold` | integer |  |  |
| `alertThresholdInformations.support` | sms.SupportEnum |  | The media support used to be contacted in case of alert — one of `both`, `mail`, `sms` |
| `callBack` | string |  | URL called when state of a sent SMS changes |
| `ipRestrictions` | string[] |  |  |
| `login` | string | read-only | The sms user login |
| `password` | string |  |  |
| `quotaInformations` | sms.Quota |  | A structure describing all information about quota informations |
| `quotaInformations.quotaLeft` | number |  |  |
| `quotaInformations.quotaStatus` | sms.QuotaStatusUserEnum |  | Current quota status — one of `active`, `inactive` |
| `stopCallBack` | string |  | URL called when a STOP is received after a receiver replied stop to a SMS |

```json
{
  "alertThresholdInformations": {
    "alertEmail": "string",
    "alertNumber": "string",
    "alertThreshold": 0,
    "support": "both"
  },
  "callBack": "string",
  "ipRestrictions": [
    "string"
  ],
  "password": "string",
  "quotaInformations": {
    "quotaLeft": 0,
    "quotaStatus": "active"
  },
  "stopCallBack": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: sms.User
result = client.put("/sms/{serviceName}/users/{login}",
	alertThresholdInformations = None, #  (type: )
	callBack = None, # URL called when state of a sent SMS changes (type: string, nullable)
	ipRestrictions = None, #  (type: array)
	password = None, #  (type: string)
	quotaInformations = None, #  (type: )
	stopCallBack = None, # URL called when a STOP is received after a receiver replied stop to a SMS (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: sms.User
$result = $ovh->put("/sms/{serviceName}/users/{login}", array(
	alertThresholdInformations => null, //  (type: )
	callBack => null, // URL called when state of a sent SMS changes (type: string, nullable)
	ipRestrictions => null, //  (type: array)
	password => null, //  (type: string)
	quotaInformations => null, //  (type: )
	stopCallBack => null, // URL called when a STOP is received after a receiver replied stop to a SMS (type: string, nullable)
));

print_r($result);
?>
```

## Export SMS to a document

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-document

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/document/get`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `creationDatetime.from` | query | string (date-time) |  | Filter the value of creationDatetime property (>=) |
| `creationDatetime.to` | query | string (date-time) |  | Filter the value of creationDatetime property (<=) |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `tag` | query | string |  | Select sms with a specific identifier group tag |
| `wayType` | query | sms.DocumentWayTypeEnum | yes | specify outgoing or incoming sms — one of `incoming`, `outgoing` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/document" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/document")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/document");

print_r($result);
?>
```

## List received SMS

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-incoming

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/incoming/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `sender` | query | string |  | Filter the value of sender property (=) |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `tag` | query | string |  | Filter the value of tag property (=) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/incoming" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/incoming")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/incoming");

print_r($result);
?>
```

## Get a received SMS

`GET /1.0/sms/{serviceName}/users/{login}/incoming/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-incoming-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/incoming/get`

Get a received SMS. Returns the received SMS: sender, message, reception date, credits used and tag. The tag groups SMS for filtering and export.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.Incoming | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDatetime` | string (date-time) | read-only |  |
| `credits` | number | read-only |  |
| `id` | integer | read-only |  |
| `message` | string | read-only |  |
| `sender` | string | read-only |  |
| `tag` | string | read-only |  |

```json
{
  "creationDatetime": "2024-01-01T12:00:00Z",
  "credits": 0,
  "id": 0,
  "message": "string",
  "sender": "string",
  "tag": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/incoming/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/incoming/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/incoming/{id}");

print_r($result);
?>
```

## Delete a received SMS

`DELETE /1.0/sms/{serviceName}/users/{login}/incoming/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#delete-sms-servicename-users-login-incoming-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/incoming/delete`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/incoming/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/sms/{serviceName}/users/{login}/incoming/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/sms/{serviceName}/users/{login}/incoming/{id}");

print_r($result);
?>
```

## List pending jobs

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-jobs

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/jobs/get`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/jobs" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/jobs")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/jobs");

print_r($result);
?>
```

## Get a pending job

`GET /1.0/sms/{serviceName}/users/{login}/jobs/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-jobs-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/jobs/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.Job | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDatetime` | string (date-time) | read-only |  |
| `credits` | number | read-only |  |
| `deliveredAt` | string (date-time) | read-only |  |
| `deliveryReceipt` | integer | read-only |  |
| `differedDelivery` | integer | read-only |  |
| `id` | integer | read-only |  |
| `message` | string | read-only |  |
| `messageLength` | integer | read-only |  |
| `numberOfSms` | integer | read-only |  |
| `ptt` | integer | read-only |  |
| `receiver` | string | read-only |  |
| `sender` | string | read-only |  |
| `sentAt` | string (date-time) | read-only |  |

```json
{
  "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"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/jobs/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/jobs/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/jobs/{id}");

print_r($result);
?>
```

## Send SMS

`POST /1.0/sms/{serviceName}/users/{login}/jobs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#post-sms-servicename-users-login-jobs

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/jobs/create`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `charset` | sms.CharsetEnum |  | The sms coding — one of `UTF-8` |
| `class` | sms.ClassEnum |  | Deprecated: The sms class — one of `flash`, `phoneDisplay`, `sim`, `toolkit` |
| `coding` | sms.CodingEnum |  | Deprecated: the coding is deduced from the message and its charset — one of `7bit`, `8bit` |
| `differedPeriod` | integer |  | The time -in minute(s)- to wait before sending the message |
| `message` | string | yes | The sms message |
| `noStopClause` | boolean |  | Do not display STOP clause in the message, this requires that this is not an advertising message |
| `priority` | sms.PriorityEnum |  | The priority of the message — one of `high`, `low`, `medium`, `veryLow` |
| `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 |

```json
{
  "charset": "UTF-8",
  "class": "flash",
  "coding": "7bit",
  "differedPeriod": 0,
  "message": "string",
  "noStopClause": true,
  "priority": "high",
  "receivers": [
    "string"
  ],
  "receiversDocumentUrl": "string",
  "receiversSlotId": "string",
  "sender": "string",
  "senderForResponse": true,
  "tag": "string",
  "validityPeriod": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.SmsSendingReportUser | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creditsLeft` | number |  |  |
| `ids` | integer[] |  |  |
| `invalidReceivers` | string[] |  |  |
| `tag` | string |  |  |
| `totalCreditsRemoved` | number |  |  |
| `validReceivers` | string[] |  |  |

```json
{
  "creditsLeft": 0,
  "ids": [
    0
  ],
  "invalidReceivers": [
    "string"
  ],
  "tag": "string",
  "totalCreditsRemoved": 0,
  "validReceivers": [
    "string"
  ]
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/jobs" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/sms/{serviceName}/users/{login}/jobs",
	charset = None, # The sms coding (type: sms.CharsetEnum, nullable)
	class = None, # Deprecated: The sms class (type: sms.ClassEnum, nullable)
	coding = None, # Deprecated: the coding is deduced from the message and its charset (type: sms.CodingEnum, nullable)
	differedPeriod = None, # The time -in minute(s)- to wait before sending the message (type: long, nullable)
	message = None, # The sms message (type: string)
	noStopClause = None, # Do not display STOP clause in the message, this requires that this is not an advertising message (type: boolean, nullable)
	priority = None, # The priority of the message (type: sms.PriorityEnum, nullable)
	receivers = None, # The receivers list (type: string[], nullable)
	receiversDocumentUrl = None, # The receivers document url link in csv format (type: string, nullable)
	receiversSlotId = None, # The receivers document slot id (type: string, nullable)
	sender = None, # The sender (type: string, nullable)
	senderForResponse = None, # Set the flag to send a special sms which can be reply by the receiver (smsResponse). (type: boolean, nullable)
	tag = None, # The identifier group tag (type: string, nullable)
	validityPeriod = None, # The maximum time -in minute(s)- before the message is dropped (type: long, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/sms/{serviceName}/users/{login}/jobs", array(
	charset => null, // The sms coding (type: sms.CharsetEnum, nullable)
	class => null, // Deprecated: The sms class (type: sms.ClassEnum, nullable)
	coding => null, // Deprecated: the coding is deduced from the message and its charset (type: sms.CodingEnum, nullable)
	differedPeriod => null, // The time -in minute(s)- to wait before sending the message (type: long, nullable)
	message => null, // The sms message (type: string)
	noStopClause => null, // Do not display STOP clause in the message, this requires that this is not an advertising message (type: boolean, nullable)
	priority => null, // The priority of the message (type: sms.PriorityEnum, nullable)
	receivers => null, // The receivers list (type: string[], nullable)
	receiversDocumentUrl => null, // The receivers document url link in csv format (type: string, nullable)
	receiversSlotId => null, // The receivers document slot id (type: string, nullable)
	sender => null, // The sender (type: string, nullable)
	senderForResponse => null, // Set the flag to send a special sms which can be reply by the receiver (smsResponse). (type: boolean, nullable)
	tag => null, // The identifier group tag (type: string, nullable)
	validityPeriod => null, // The maximum time -in minute(s)- before the message is dropped (type: long, nullable)
));

print_r($result);
?>
```

## Delete a pending job

`DELETE /1.0/sms/{serviceName}/users/{login}/jobs/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#delete-sms-servicename-users-login-jobs-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/jobs/delete`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/jobs/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/sms/{serviceName}/users/{login}/jobs/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/sms/{serviceName}/users/{login}/jobs/{id}");

print_r($result);
?>
```

## List sent SMS

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-outgoing

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/outgoing/get`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `deliveryReceipt` | query | integer |  | Filter the value of deliveryReceipt property (=) |
| `differedDelivery` | query | integer |  | Filter the value of differedDelivery property (=) |
| `login` | path | string | yes | The sms user login |
| `ptt` | query | integer |  | Filter the value of ptt property (=) |
| `receiver` | query | string |  | Filter the value of receiver property (=) |
| `sender` | query | string |  | Filter the value of sender property (=) |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `tag` | query | string |  | Filter the value of tag property (=) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/outgoing" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/outgoing")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/outgoing");

print_r($result);
?>
```

## Get a sent SMS

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-outgoing-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/outgoing/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.Outgoing | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDatetime` | string (date-time) | read-only |  |
| `credits` | number | read-only |  |
| `deliveredAt` | string (date-time) | read-only |  |
| `deliveryReceipt` | integer | read-only |  |
| `differedDelivery` | integer | read-only |  |
| `id` | integer | read-only |  |
| `message` | string | read-only |  |
| `messageLength` | integer | read-only |  |
| `numberOfSms` | integer | read-only |  |
| `ptt` | integer | read-only |  |
| `receiver` | string | read-only |  |
| `sender` | string | read-only |  |
| `sentAt` | string (date-time) | read-only |  |
| `tag` | string | read-only |  |
| `tariffCode` | string | read-only | Tariff code applied on the sms |

```json
{
  "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"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/outgoing/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/outgoing/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/outgoing/{id}");

print_r($result);
?>
```

## Delete a sent SMS

`DELETE /1.0/sms/{serviceName}/users/{login}/outgoing/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#delete-sms-servicename-users-login-outgoing-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/outgoing/delete`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/outgoing/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/sms/{serviceName}/users/{login}/outgoing/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/sms/{serviceName}/users/{login}/outgoing/{id}");

print_r($result);
?>
```

## Get the receiver operator

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-outgoing-id-hlr

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/outgoing/hlr/get`

Get the receiver operator. Returns the operator of the phone number, from the network query trace: country, country code, region, operator and network.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.Hlr | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string | read-only | The country |
| `countryCode` | string | read-only | The countryCode prefix number |
| `network` | string | read-only | The network name |
| `operator` | string | read-only | The operator name |
| `region` | string | read-only | The region |

```json
{
  "country": "string",
  "countryCode": "string",
  "network": "string",
  "operator": "string",
  "region": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/outgoing/{id}/hlr" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/outgoing/{id}/hlr")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/outgoing/{id}/hlr");

print_r($result);
?>
```

## List receiver lists

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-receivers

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/receivers/get`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/receivers")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/receivers");

print_r($result);
?>
```

## Get a receiver list

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-receivers-slotid

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/receivers/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `slotId` | path | integer | yes | Slot number id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.Receiver | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoUpdate` | boolean |  | Download file from URL before sending to contacts (works only with csvUrl and not document ID) |
| `canAutoUpdate` | boolean | read-only | Is the object compatible with autoUpdate |
| `datetime` | string (date-time) | read-only | Creation date of the document |
| `description` | string |  | Description name of the document |
| `records` | integer | read-only | Number of receiver records in the document |
| `slotId` | integer | read-only | Slot number id |

```json
{
  "autoUpdate": true,
  "canAutoUpdate": true,
  "datetime": "2024-01-01T12:00:00Z",
  "description": "string",
  "records": 0,
  "slotId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/receivers/{slotId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/receivers/{slotId}");

print_r($result);
?>
```

## Create a receiver list

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#post-sms-servicename-users-login-receivers

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/receivers/create`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoUpdate` | boolean | yes | 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` | string | yes | Description name of the document |
| `documentId` | string |  | ID of the /me/document file you want to import |
| `slotId` | integer | yes | Slot number id used to handle the document |

```json
{
  "autoUpdate": true,
  "csvUrl": "string",
  "description": "string",
  "documentId": "string",
  "slotId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.Receiver | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoUpdate` | boolean |  | Download file from URL before sending to contacts (works only with csvUrl and not document ID) |
| `canAutoUpdate` | boolean | read-only | Is the object compatible with autoUpdate |
| `datetime` | string (date-time) | read-only | Creation date of the document |
| `description` | string |  | Description name of the document |
| `records` | integer | read-only | Number of receiver records in the document |
| `slotId` | integer | read-only | Slot number id |

```json
{
  "autoUpdate": true,
  "canAutoUpdate": true,
  "datetime": "2024-01-01T12:00:00Z",
  "description": "string",
  "records": 0,
  "slotId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: long
result = client.post("/sms/{serviceName}/users/{login}/receivers",
	autoUpdate = None, # Download file from URL before sending to contacts (works only with csvUrl and not document ID) (type: boolean)
	csvUrl = None, # URL of the file you want to import (type: string, nullable)
	description = None, # Description name of the document (type: string)
	documentId = None, # ID of the /me/document file you want to import (type: string, nullable)
	slotId = None, # Slot number id used to handle the document (type: long)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: long
$result = $ovh->post("/sms/{serviceName}/users/{login}/receivers", array(
	autoUpdate => null, // Download file from URL before sending to contacts (works only with csvUrl and not document ID) (type: boolean)
	csvUrl => null, // URL of the file you want to import (type: string, nullable)
	description => null, // Description name of the document (type: string)
	documentId => null, // ID of the /me/document file you want to import (type: string, nullable)
	slotId => null, // Slot number id used to handle the document (type: long)
));

print_r($result);
?>
```

## Delete a receiver list

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#delete-sms-servicename-users-login-receivers-slotid

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/receivers/delete`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `slotId` | path | integer | yes | Slot number id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/sms/{serviceName}/users/{login}/receivers/{slotId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/sms/{serviceName}/users/{login}/receivers/{slotId}");

print_r($result);
?>
```

## Update a receiver list

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#put-sms-servicename-users-login-receivers-slotid

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/receivers/edit`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `slotId` | path | integer | yes | Slot number id |

### Request body (required)

Type: `sms.Receiver`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoUpdate` | boolean |  | Download file from URL before sending to contacts (works only with csvUrl and not document ID) |
| `canAutoUpdate` | boolean | read-only | Is the object compatible with autoUpdate |
| `datetime` | string (date-time) | read-only | Creation date of the document |
| `description` | string |  | Description name of the document |
| `records` | integer | read-only | Number of receiver records in the document |
| `slotId` | integer | read-only | Slot number id |

```json
{
  "autoUpdate": true,
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: sms.Receiver
result = client.put("/sms/{serviceName}/users/{login}/receivers/{slotId}",
	autoUpdate = None, # Download file from URL before sending to contacts (works only with csvUrl and not document ID) (type: boolean)
	description = None, # Description name of the document (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: sms.Receiver
$result = $ovh->put("/sms/{serviceName}/users/{login}/receivers/{slotId}", array(
	autoUpdate => null, // Download file from URL before sending to contacts (works only with csvUrl and not document ID) (type: boolean)
	description => null, // Description name of the document (type: string)
));

print_r($result);
?>
```

## Clean a receiver list

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#post-sms-servicename-users-login-receivers-slotid-clean

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/receivers/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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `slotId` | path | integer | yes | Slot number id |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `freemium` | boolean | yes | Limit checks to syntaxical validation |
| `priceOnly` | boolean | yes | Only get action's price in credits without executing it |

```json
{
  "freemium": true,
  "priceOnly": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.ReceiversAsynchronousCleanReport | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `taskId` | integer |  |  |
| `totalCreditsRemoved` | number |  |  |

```json
{
  "taskId": 0,
  "totalCreditsRemoved": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}/clean" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/sms/{serviceName}/users/{login}/receivers/{slotId}/clean",
	freemium = None, # Limit checks to syntaxical validation (type: boolean)
	priceOnly = None, # Only get action's price in credits without executing it (type: boolean)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/sms/{serviceName}/users/{login}/receivers/{slotId}/clean", array(
	freemium => null, // Limit checks to syntaxical validation (type: boolean)
	priceOnly => null, // Only get action's price in credits without executing it (type: boolean)
));

print_r($result);
?>
```

## Get the receiver list CSV

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/api-users/#get-sms-servicename-users-login-receivers-slotid-csv

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:users/receivers/csv/get`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The sms user login |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `slotId` | path | integer | yes | Slot number id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/users/{login}/receivers/{slotId}/csv" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/sms/{serviceName}/users/{login}/receivers/{slotId}/csv")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/sms/{serviceName}/users/{login}/receivers/{slotId}/csv");

print_r($result);
?>
```
