# Web Cloud › SMS › SMS Virtual Numbers 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

> 20 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/sms-virtual-numbers/

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

## Operations

- `GET /sms/virtualNumbers` — List virtual numbers
- `GET /sms/virtualNumbers/{number}` — Get a virtual number service
- `GET /sms/virtualNumbers/{number}/serviceInfos` — Get service information
- `PUT /sms/virtualNumbers/{number}/serviceInfos` — Update service information
- `GET /sms/{serviceName}/virtualNumbers` — List virtual numbers
- `GET /sms/{serviceName}/virtualNumbers/{number}` — Get a virtual number
- `GET /sms/{serviceName}/virtualNumbers/{number}/chatAccess` — Get the web access
- `POST /sms/{serviceName}/virtualNumbers/{number}/chatAccess` — Create the web access
- `DELETE /sms/{serviceName}/virtualNumbers/{number}/chatAccess` — Delete the web access
- `GET /sms/{serviceName}/virtualNumbers/{number}/incoming` — List received SMS
- `GET /sms/{serviceName}/virtualNumbers/{number}/incoming/{id}` — Get a received SMS
- `DELETE /sms/{serviceName}/virtualNumbers/{number}/incoming/{id}` — Delete a received SMS
- `GET /sms/{serviceName}/virtualNumbers/{number}/jobs` — List pending jobs
- `GET /sms/{serviceName}/virtualNumbers/{number}/jobs/{id}` — Get a pending job
- `POST /sms/{serviceName}/virtualNumbers/{number}/jobs` — Send SMS
- `DELETE /sms/{serviceName}/virtualNumbers/{number}/jobs/{id}` — Delete a pending job
- `GET /sms/{serviceName}/virtualNumbers/{number}/outgoing` — List sent SMS
- `GET /sms/{serviceName}/virtualNumbers/{number}/outgoing/{id}` — Get a sent SMS
- `DELETE /sms/{serviceName}/virtualNumbers/{number}/outgoing/{id}` — Delete a sent SMS
- `GET /sms/{serviceName}/virtualNumbers/{number}/outgoing/{id}/hlr` — Get the receiver operator

## List virtual numbers

`GET /1.0/sms/virtualNumbers`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-virtualnumbers

**Status:** Stable production version  
**IAM actions:** `smsVirtualNumbers:apiovh:get`

List virtual numbers. Returns the virtual numbers of the customer, as services. A virtual number receives SMS and lets receivers reply to the messages sent.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/virtualNumbers" \
  -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/virtualNumbers")

# 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/virtualNumbers");

print_r($result);
?>
```

## Get a virtual number service

`GET /1.0/sms/virtualNumbers/{number}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-virtualnumbers-number

**Status:** Stable production version  
**IAM actions:** `smsVirtualNumbers:apiovh:get`

Get a virtual number service. Returns the virtual number service, with the number and the ISO code of its country.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `number` | path | string | yes | Your virtual number |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `countryCode` | sms.VirtualNumberIsoCountryCodeEnum | read-only | The ISO formated country code of the number — one of `be`, `ch`, `de`, `es`, `fr`, `uk` |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `number` | string | read-only | The virtual number |

```json
{
  "countryCode": "be",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "number": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/virtualNumbers/{number}" \
  -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/virtualNumbers/{number}")

# 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/virtualNumbers/{number}");

print_r($result);
?>
```

## Get service information

`GET /1.0/sms/virtualNumbers/{number}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-virtualnumbers-number-serviceinfos

**Status:** Stable production version  
**IAM actions:** `smsVirtualNumbers:apiovh:serviceInfos/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `number` | path | string | yes | Your virtual number |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/virtualNumbers/{number}/serviceInfos" \
  -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/virtualNumbers/{number}/serviceInfos")

# 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/virtualNumbers/{number}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/sms/virtualNumbers/{number}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#put-sms-virtualnumbers-number-serviceinfos

**Status:** Stable production version  
**IAM actions:** `smsVirtualNumbers:apiovh:serviceInfos/edit`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `number` | path | string | yes | Your virtual number |

### Request body (required)

Type: `services.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/sms/virtualNumbers/{number}/serviceInfos" \
  -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: services.Service
result = client.put("/sms/virtualNumbers/{number}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, 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: services.Service
$result = $ovh->put("/sms/virtualNumbers/{number}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## List virtual numbers

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers

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

List virtual numbers. Returns the virtual numbers of the account. A virtual number receives SMS and lets receivers reply.

### 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}/virtualNumbers" \
  -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}/virtualNumbers")

# 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}/virtualNumbers");

print_r($result);
?>
```

## Get a virtual number

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number

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

Get a virtual number. Returns the virtual number attached to the SMS account and the ISO code of its country.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `countryCode` | sms.VirtualNumberIsoCountryCodeEnum | read-only | The ISO formated country code of the number — one of `be`, `ch`, `de`, `es`, `fr`, `uk` |
| `number` | string | read-only | The virtual number |

```json
{
  "countryCode": "be",
  "number": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/virtualNumbers/{number}" \
  -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}/virtualNumbers/{number}")

# 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}/virtualNumbers/{number}");

print_r($result);
?>
```

## Get the web access

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/chatAccess`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-chataccess

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

Get the web access. Returns the web access to the chat application of the virtual number: its URL and creation date.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | The creation date of this access |
| `id` | integer | read-only |  |
| `url` | string | read-only | The url of the web access |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "url": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/virtualNumbers/{number}/chatAccess" \
  -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}/virtualNumbers/{number}/chatAccess")

# 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}/virtualNumbers/{number}/chatAccess");

print_r($result);
?>
```

## Create the web access

`POST /1.0/sms/{serviceName}/virtualNumbers/{number}/chatAccess`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#post-sms-servicename-virtualnumbers-number-chataccess

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

Create the web access. Creates a web access to the chat application of the virtual number. Returns its URL.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | The creation date of this access |
| `id` | integer | read-only |  |
| `url` | string | read-only | The url of the web access |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "url": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/virtualNumbers/{number}/chatAccess" \
  -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.post("/sms/{serviceName}/virtualNumbers/{number}/chatAccess")

# 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}/virtualNumbers/{number}/chatAccess");

print_r($result);
?>
```

## Delete the web access

`DELETE /1.0/sms/{serviceName}/virtualNumbers/{number}/chatAccess`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#delete-sms-servicename-virtualnumbers-number-chataccess

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

Delete the web access. Deletes the web access to the chat application of the virtual number. Its URL no longer gives access to the chat.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/chatAccess" \
  -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}/virtualNumbers/{number}/chatAccess")

# 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}/virtualNumbers/{number}/chatAccess");

print_r($result);
?>
```

## List received SMS

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/incoming`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-incoming

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| --- | --- | --- | --- | --- |
| `creationDatetime.from` | query | string (date-time) |  | Filter the value of creationDatetime property (>=) |
| `creationDatetime.to` | query | string (date-time) |  | Filter the value of creationDatetime property (<=) |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/incoming");

print_r($result);
?>
```

## Get a received SMS

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/incoming/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-incoming-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/incoming/{id}");

print_r($result);
?>
```

## Delete a received SMS

`DELETE /1.0/sms/{serviceName}/virtualNumbers/{number}/incoming/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#delete-sms-servicename-virtualnumbers-number-incoming-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/incoming/{id}");

print_r($result);
?>
```

## List pending jobs

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/jobs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-jobs

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| --- | --- | --- | --- | --- |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/jobs");

print_r($result);
?>
```

## Get a pending job

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/jobs/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-jobs-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| `number` | path | string | yes | The virtual number |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDatetime` | string (date-time) | read-only |  |
| `credits` | number | 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 |  |

```json
{
  "creationDatetime": "2024-01-01T12:00:00Z",
  "credits": 0,
  "deliveryReceipt": 0,
  "differedDelivery": 0,
  "id": 0,
  "message": "string",
  "messageLength": 0,
  "numberOfSms": 0,
  "ptt": 0,
  "receiver": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/jobs/{id}");

print_r($result);
?>
```

## Send SMS

`POST /1.0/sms/{serviceName}/virtualNumbers/{number}/jobs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#post-sms-servicename-virtualnumbers-number-jobs

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| --- | --- | --- | --- | --- |
| `number` | path | string | yes | The virtual number |
| `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 |
| `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 |
| `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",
  "priority": "high",
  "receivers": [
    "string"
  ],
  "receiversDocumentUrl": "string",
  "receiversSlotId": "string",
  "tag": "string",
  "validityPeriod": 0
}
```

### Responses

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

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

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/virtualNumbers/{number}/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
)

# Request body type: long
result = client.post("/sms/{serviceName}/virtualNumbers/{number}/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)
	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)
	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

// Request body type: long
$result = $ovh->post("/sms/{serviceName}/virtualNumbers/{number}/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)
	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)
	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}/virtualNumbers/{number}/jobs/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#delete-sms-servicename-virtualnumbers-number-jobs-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/jobs/{id}");

print_r($result);
?>
```

## List sent SMS

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/outgoing`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-outgoing

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| --- | --- | --- | --- | --- |
| `creationDatetime.from` | query | string (date-time) |  | Filter the value of creationDatetime property (>=) |
| `creationDatetime.to` | query | string (date-time) |  | Filter the value of creationDatetime property (<=) |
| `deliveryReceipt` | query | integer |  | Filter the value of deliveryReceipt property (=) |
| `differedDelivery` | query | integer |  | Filter the value of differedDelivery property (=) |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/outgoing");

print_r($result);
?>
```

## Get a sent SMS

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/outgoing/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-outgoing-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/outgoing/{id}");

print_r($result);
?>
```

## Delete a sent SMS

`DELETE /1.0/sms/{serviceName}/virtualNumbers/{number}/outgoing/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#delete-sms-servicename-virtualnumbers-number-outgoing-id

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/outgoing/{id}");

print_r($result);
?>
```

## Get the receiver operator

`GET /1.0/sms/{serviceName}/virtualNumbers/{number}/outgoing/{id}/hlr`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/sms-virtual-numbers/#get-sms-servicename-virtualnumbers-number-outgoing-id-hlr

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:virtualNumbers/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 |
| `number` | path | string | yes | The virtual number |
| `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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/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}/virtualNumbers/{number}/outgoing/{id}/hlr");

print_r($result);
?>
```
