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

> 13 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/account/

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

## Operations

- `GET /sms` — List SMS accounts
- `GET /sms/rates/destinations` — Get rates for a country
- `GET /sms/rates/packs` — List SMS pack prices
- `GET /sms/{serviceName}` — Get an SMS account
- `PUT /sms/{serviceName}` — Update an SMS account
- `GET /sms/{serviceName}/document` — Export SMS to a document
- `GET /sms/{serviceName}/exceptions` — List sending restrictions for a number
- `GET /sms/{serviceName}/seeOffers` — List SMS offers
- `GET /sms/{serviceName}/serviceInfos` — Get service information
- `PUT /sms/{serviceName}/serviceInfos` — Update service information
- `GET /sms/{serviceName}/task` — List tasks
- `GET /sms/{serviceName}/task/{taskId}` — Get a task
- `POST /sms/{serviceName}/transferCredits` — Transfer credits

## List SMS accounts

`GET /1.0/sms`

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

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

List SMS accounts. Returns the service names of the SMS accounts of the customer. Get an SMS account for its status, credits left and settings.

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

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

print_r($result);
?>
```

## Get rates for a country

`GET /1.0/sms/rates/destinations`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/account/#get-sms-rates-destinations

**Status:** Stable production version  
**Authentication:** none (public operation)

Get rates for a country. Returns the credits consumed and the price of one SMS sent to a country, for credits bought in the billing country, with the VAT rate.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingCountry` | query | sms.BillingCountryEnum |  | Country where you buy credits — one of `es`, `fr`, `gb`, `ie`, `it`, `pl` |
| `country` | query | sms.CountryEnum | yes | Country where you send SMS — one of `ad`, `ae`, `af`, `ag`, `ai`, `al`, `all`, `am`, `an`, `ao`, `ar`, `at`, … |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string |  | The country full name |
| `countryCode` | sms.CountryEnum |  | The country 2-letters code — one of `ad`, `ae`, `af`, `ag`, `ai`, `al`, `all`, `am`, `an`, `ao`, `ar`, `at`, … |
| `credit` | number |  | Credits consumed by sending one SMS towards the given destination |
| `price` | order.Price |  | Price of one SMS sent towards the given destination |
| `price.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `price.text` | string |  |  |
| `price.value` | number |  |  |
| `vatRate` | number |  | The VAT rate applied from the provided billing country. |

```json
{
  "country": "string",
  "countryCode": "ad",
  "credit": 0,
  "price": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "vatRate": 0
}
```

### Example

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

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

print_r($result);
?>
```

## List SMS pack prices

`GET /1.0/sms/rates/packs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/account/#get-sms-rates-packs

**Status:** Stable production version  
**Authentication:** none (public operation)

List SMS pack prices. Returns the SMS packs that can be bought for a destination country: credit and SMS quantities, prices, discount and VAT rate.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingCountry` | query | sms.BillingCountryEnum |  | Country where you buy credits — one of `es`, `fr`, `gb`, `ie`, `it`, `pl` |
| `country` | query | sms.CountryEnum | yes | Country where you send SMS — one of `ad`, `ae`, `af`, `ag`, `ai`, `al`, `all`, `am`, `an`, `ao`, `ar`, `at`, … |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.PackDetails[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `countryCode` | sms.CountryEnum |  | Destination country code — one of `ad`, `ae`, `af`, `ag`, `ai`, `al`, `all`, `am`, `an`, `ao`, `ar`, `at`, … |
| `credit` | number |  | Credits consumed by sending one SMS towards the given destination |
| `creditPrice` | order.Price |  | Price of one credit, including pack's promotion |
| `creditPrice.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `creditPrice.text` | string |  |  |
| `creditPrice.value` | number |  |  |
| `creditQuantityMax` | integer |  | Maximum quantity (excluded) of credit to order to have this price |
| `creditQuantityMin` | integer |  | Minimum quantity (included) of credit to order to have this price |
| `discountCreditPrice` | order.Price |  | Price of one credit, during a promotional event |
| `discountCreditPrice.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `discountCreditPrice.text` | string |  |  |
| `discountCreditPrice.value` | number |  |  |
| `discountPercentage` | integer |  | Percentage applied as part of a promotional event |
| `discountSmsPrice` | order.Price |  | Price of one SMS, during a promotional event |
| `discountSmsPrice.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `discountSmsPrice.text` | string |  |  |
| `discountSmsPrice.value` | number |  |  |
| `smsPrice` | order.Price |  | Price of one SMS sent towards the given destination, including pack's promotion |
| `smsPrice.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `smsPrice.text` | string |  |  |
| `smsPrice.value` | number |  |  |
| `smsQuantityMax` | integer |  | Maximum quantity (excluded) of SMS you can obtain with this pack |
| `smsQuantityMin` | integer |  | Minimum quantity (included) of SMS you can obtain with this pack |
| `vatRate` | number |  | The VAT rate applied from the provided billing country. |

```json
[
  {
    "countryCode": "ad",
    "credit": 0,
    "creditPrice": {
      "currencyCode": "AUD",
      "text": "string",
      "value": 0
    },
    "creditQuantityMax": 0,
    "creditQuantityMin": 0,
    "discountCreditPrice": {
      "currencyCode": "AUD",
      "text": "string",
      "value": 0
    },
    "discountPercentage": 0,
    "discountSmsPrice": {
      "currencyCode": "AUD",
      "text": "string",
      "value": 0
    },
    "smsPrice": {
      "currencyCode": "AUD",
      "text": "string",
      "value": 0
    },
    "smsQuantityMax": 0,
    "smsQuantityMin": 0,
    "vatRate": 0
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get an SMS account

`GET /1.0/sms/{serviceName}`

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

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

Get an SMS account. Returns the SMS account: status, credits left, callback URLs, automatic recredit settings and channel.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `automaticRecreditAmount` | sms.PackQuantityAutomaticRecreditEnum |  | Pack quantity automatic recredit possibilities — one of `100`, `200`, `250`, `500`, `1000`, `5000`, `10000` |
| `callBack` | string |  | URL called when state of a sent SMS changes |
| `channel` | sms.ChannelEnum | read-only | For what purpose this account can be used for — one of `both`, `marketing`, `transactional` |
| `creditThresholdForAutomaticRecredit` | number |  | Credit threshold after which an automatic recredit is launched |
| `creditsHoldByQuota` | number | read-only |  |
| `creditsLeft` | number | read-only |  |
| `description` | string |  |  |
| `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 |
| `name` | string | read-only |  |
| `smpp` | boolean | read-only | Whether the account can be used for smpp or not |
| `smsResponse` | sms.Response |  | A structure describing how to manage an sms Response |
| `smsResponse.cgiUrl` | string |  | Default url callback used for a given response. |
| `smsResponse.responseType` | sms.ResponseTypeEnum |  | Response type — one of `cgi`, `none`, `text` |
| `smsResponse.text` | string |  | Automatic notification sent by text in case of customer reply. |
| `smsResponse.trackingDefaultSmsSender` | string |  |  |
| `smsResponse.trackingOptions` | sms.ResponseTrackingOptions[] |  |  |
| `smsResponse.trackingOptions[].media` | sms.ResponseTrackingMediaEnum |  | The tracking media response — one of `email`, `sms`, `voice` |
| `smsResponse.trackingOptions[].sender` | string |  |  |
| `smsResponse.trackingOptions[].target` | string |  |  |
| `status` | sms.StatusAccountEnum | read-only | Account status — one of `disable`, `enable` |
| `stopCallBack` | string |  | URL called when a STOP is received after a receiver replied stop to a SMS |
| `templates` | sms.Templates |  | A structure describing all information about templates informations |
| `templates.customizedEmailMode` | boolean |  |  |
| `templates.customizedSmsMode` | boolean |  |  |
| `templates.emailBody` | string |  |  |
| `templates.emailFrom` | string |  |  |
| `templates.emailSubject` | string |  |  |
| `templates.smsBody` | string |  |  |
| `userQuantityWithQuota` | integer | read-only |  |

```json
{
  "automaticRecreditAmount": 100,
  "callBack": "string",
  "channel": "both",
  "creditThresholdForAutomaticRecredit": 0,
  "creditsHoldByQuota": 0,
  "creditsLeft": 0,
  "description": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "name": "string",
  "smpp": true,
  "smsResponse": {
    "cgiUrl": "string",
    "responseType": "cgi",
    "text": "string",
    "trackingDefaultSmsSender": "string",
    "trackingOptions": [
      {
        "media": "email",
        "sender": "string",
        "target": "string"
      }
    ]
  },
  "status": "disable",
  "stopCallBack": "string",
  "templates": {
    "customizedEmailMode": true,
    "customizedSmsMode": true,
    "emailBody": "string",
    "emailFrom": "string",
    "emailSubject": "string",
    "smsBody": "string"
  },
  "userQuantityWithQuota": 0
}
```

### Example

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

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

print_r($result);
?>
```

## Update an SMS account

`PUT /1.0/sms/{serviceName}`

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

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:put`

Update an SMS account. Updates the SMS account settings, such as the callback URLs, the templates and the automatic recredit.

### Parameters

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

### Request body (required)

Type: `sms.Account`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `automaticRecreditAmount` | sms.PackQuantityAutomaticRecreditEnum |  | Pack quantity automatic recredit possibilities — one of `100`, `200`, `250`, `500`, `1000`, `5000`, `10000` |
| `callBack` | string |  | URL called when state of a sent SMS changes |
| `channel` | sms.ChannelEnum | read-only | For what purpose this account can be used for — one of `both`, `marketing`, `transactional` |
| `creditThresholdForAutomaticRecredit` | number |  | Credit threshold after which an automatic recredit is launched |
| `creditsHoldByQuota` | number | read-only |  |
| `creditsLeft` | number | read-only |  |
| `description` | string |  |  |
| `name` | string | read-only |  |
| `smpp` | boolean | read-only | Whether the account can be used for smpp or not |
| `smsResponse` | sms.Response |  | A structure describing how to manage an sms Response |
| `smsResponse.cgiUrl` | string |  | Default url callback used for a given response. |
| `smsResponse.responseType` | sms.ResponseTypeEnum |  | Response type — one of `cgi`, `none`, `text` |
| `smsResponse.text` | string |  | Automatic notification sent by text in case of customer reply. |
| `smsResponse.trackingDefaultSmsSender` | string |  |  |
| `smsResponse.trackingOptions` | sms.ResponseTrackingOptions[] |  |  |
| `smsResponse.trackingOptions[].media` | sms.ResponseTrackingMediaEnum |  | The tracking media response — one of `email`, `sms`, `voice` |
| `smsResponse.trackingOptions[].sender` | string |  |  |
| `smsResponse.trackingOptions[].target` | string |  |  |
| `status` | sms.StatusAccountEnum | read-only | Account status — one of `disable`, `enable` |
| `stopCallBack` | string |  | URL called when a STOP is received after a receiver replied stop to a SMS |
| `templates` | sms.Templates |  | A structure describing all information about templates informations |
| `templates.customizedEmailMode` | boolean |  |  |
| `templates.customizedSmsMode` | boolean |  |  |
| `templates.emailBody` | string |  |  |
| `templates.emailFrom` | string |  |  |
| `templates.emailSubject` | string |  |  |
| `templates.smsBody` | string |  |  |
| `userQuantityWithQuota` | integer | read-only |  |

```json
{
  "automaticRecreditAmount": 100,
  "callBack": "string",
  "creditThresholdForAutomaticRecredit": 0,
  "description": "string",
  "smsResponse": {
    "cgiUrl": "string",
    "responseType": "cgi",
    "text": "string",
    "trackingDefaultSmsSender": "string",
    "trackingOptions": [
      {
        "media": "email",
        "sender": "string",
        "target": "string"
      }
    ]
  },
  "stopCallBack": "string",
  "templates": {
    "customizedEmailMode": true,
    "customizedSmsMode": true,
    "emailBody": "string",
    "emailFrom": "string",
    "emailSubject": "string",
    "smsBody": "string"
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}" \
  -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.Account
result = client.put("/sms/{serviceName}",
	automaticRecreditAmount = None, #  (type: sms.PackQuantityAutomaticRecreditEnum, nullable)
	callBack = None, # URL called when state of a sent SMS changes (type: string, nullable)
	creditThresholdForAutomaticRecredit = None, # Credit threshold after which an automatic recredit is launched (type: number)
	description = None, #  (type: string)
	smsResponse = None, #  (type: )
	stopCallBack = None, # URL called when a STOP is received after a receiver replied stop to a SMS (type: string, nullable)
	templates = None, #  (type: )
)

# 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.Account
$result = $ovh->put("/sms/{serviceName}", array(
	automaticRecreditAmount => null, //  (type: sms.PackQuantityAutomaticRecreditEnum, nullable)
	callBack => null, // URL called when state of a sent SMS changes (type: string, nullable)
	creditThresholdForAutomaticRecredit => null, // Credit threshold after which an automatic recredit is launched (type: number)
	description => null, //  (type: string)
	smsResponse => null, //  (type: )
	stopCallBack => null, // URL called when a STOP is received after a receiver replied stop to a SMS (type: string, nullable)
	templates => null, //  (type: )
));

print_r($result);
?>
```

## Export SMS to a document

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

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

**Status:** Stable production version  
**IAM actions:** `sms:apiovh: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 |
| --- | --- | --- | --- | --- |
| `batchID` | query | string (uuid) |  | Filter SMSs with their batch ID (outgoing SMSs only) |
| `creationDatetime.from` | query | string (date-time) |  | Filter the value of creationDatetime property (>=) |
| `creationDatetime.to` | query | string (date-time) |  | Filter the value of creationDatetime property (<=) |
| `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}/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}/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}/document");

print_r($result);
?>
```

## List sending restrictions for a number

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

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

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

List sending restrictions for a number. Returns the operator restrictions and substitutions that apply when sending SMS to the given number.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.Exception[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `countrySuffixe` | string | read-only | The abreviated country code. |
| `messages` | string[] | read-only | The exception message |
| `operators` | string | read-only | The list of operators impacted. |
| `restrictionCode` | sms.RestrictionCodeEnum | read-only | The type of routing restriction imposed by the operator — one of `ALPHA`, `BAD_DLR`, `BLOCKED`, `CODING`, `DLR`, `FLASHONLY`, `MSISDN` |
| `substitution` | string | read-only | The substitution sender used to bypass operator filter |

```json
[
  {
    "countrySuffixe": "string",
    "messages": [
      "string"
    ],
    "operators": "string",
    "restrictionCode": "ALPHA",
    "substitution": "string"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## List SMS offers

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

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

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

List SMS offers. Returns the SMS pack offers available for the account, by quantity and destination country.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `countryCurrencyPrice` | query | reference.CountryEnum | yes | Filter to have the currency country prices — one of `all`, `ca`, `cz`, `de`, `en`, `es`, `fi`, `fr`, `gb`, `ie`, `it`, `lt`, … |
| `countryDestination` | query | sms.CountryEnum | yes | Filter to have the country destination — one of `ad`, `ae`, `af`, `ag`, `ai`, `al`, `all`, `am`, `an`, `ao`, `ar`, `at`, … |
| `quantity` | query | sms.PackQuantityEnum | yes | Sms pack offer quantity — one of `100`, `200`, `250`, `500`, `1000`, `2500`, `5000`, `10000`, `25000`, `50000`, `100000`, `1000000` |
| `serviceName` | path | string | yes | The internal name of your SMS offer |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sms.PackOffer[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `countryDestination` | string |  |  |
| `giftPrice` | number |  |  |
| `giftQuantity` | number |  |  |
| `language` | string |  |  |
| `price` | number |  |  |
| `quantity` | integer |  |  |
| `smsQuantity` | number |  |  |
| `totalPrice` | number |  |  |

```json
[
  {
    "countryDestination": "string",
    "giftPrice": 0,
    "giftQuantity": 0,
    "language": "string",
    "price": 0,
    "quantity": 0,
    "smsQuantity": 0,
    "totalPrice": 0
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get service information

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

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

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

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

print_r($result);
?>
```

## Update service information

`PUT /1.0/sms/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/account/#put-sms-servicename-serviceinfos

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

### 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/{serviceName}/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/{serviceName}/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/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## List tasks

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

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

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

List tasks. Returns the identifiers of the operations run on the SMS account. Get a task for its function, current step and status.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your SMS offer |
| `status` | query | telephony.TaskStatusEnum |  | Filter the value of status property (=) — one of `doing`, `done`, `error`, `pause`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get a task

`GET /1.0/sms/{serviceName}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/sms/account/#get-sms-servicename-task-taskid

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

Get a task. Returns an operation run on the SMS account, with the function performed, its current step and its status.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `function` | sms.TodoGeneralPublicFunctionsEnum | read-only | The task function — one of `cleanSmsReceivers` |
| `status` | telephony.TaskStatusEnum | read-only | Task status — one of `doing`, `done`, `error`, `pause`, `todo` |
| `step` | sms.TodoGeneralPublicStepsEnum | read-only | The task step — one of `checkOrder`, `createHlrs`, `finishing`, `sendMailReport`, `starting`, `waitForHlrs` |
| `taskId` | integer | read-only |  |

```json
{
  "function": "cleanSmsReceivers",
  "status": "doing",
  "step": "checkOrder",
  "taskId": 0
}
```

### Example

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

# 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}/task/{taskId}");

print_r($result);
?>
```

## Transfer credits

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

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

**Status:** Stable production version  
**IAM actions:** `sms:apiovh:transferCredits`

Transfer credits. Transfers an amount of credits from this SMS account to another SMS account, given by its service name.

### 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 |
| --- | --- | --- | --- |
| `credits` | number | yes | Amount of credits to transfer. |
| `smsAccountTarget` | string | yes | Sms account destination. |

```json
{
  "credits": 0,
  "smsAccountTarget": "string"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sms/{serviceName}/transferCredits" \
  -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}/transferCredits",
	credits = None, # Amount of credits to transfer. (type: double)
	smsAccountTarget = None, # Sms account destination. (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}/transferCredits", array(
	credits => null, // Amount of credits to transfer. (type: double)
	smsAccountTarget => null, // Sms account destination. (type: string)
));

print_r($result);
?>
```
