# Web Cloud › Telephony › Billing Accounts › Billing & Usage History 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

> 18 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/telephony/billing-accounts/billing-usage-history/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/telephony/billing-accounts/billing-usage-history.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/telephony/billing-accounts/billing-usage-history.json?format=openapi3

## Operations

- `GET /telephony/{billingAccount}/allowedCreditThreshold` — List allowed credit thresholds
- `GET /telephony/{billingAccount}/amountSecurityDeposit` — List security deposit amounts
- `POST /telephony/{billingAccount}/canTransferSecurityDeposit` — Check a security deposit transfer
- `GET /telephony/{billingAccount}/historyConsumption` — List billed consumptions
- `GET /telephony/{billingAccount}/historyConsumption/{date}` — Get a billed consumption
- `GET /telephony/{billingAccount}/historyConsumption/{date}/file` — Get billed consumption files
- `GET /telephony/{billingAccount}/historyRepaymentConsumption` — List repayment bills
- `GET /telephony/{billingAccount}/historyRepaymentConsumption/{date}` — Get a repayment bill
- `POST /telephony/{billingAccount}/historyRepaymentConsumption` — Request a repayment
- `GET /telephony/{billingAccount}/historyRepaymentConsumption/{date}/document` — Get the bill as CSV
- `GET /telephony/{billingAccount}/historyTollfreeConsumption` — List toll-free bills
- `GET /telephony/{billingAccount}/historyTollfreeConsumption/{date}` — Get a toll-free bill
- `GET /telephony/{billingAccount}/historyTollfreeConsumption/{date}/document` — Get the bill as CSV
- `GET /telephony/{billingAccount}/outplanNotification` — List out-of-plan alerts
- `GET /telephony/{billingAccount}/outplanNotification/{id}` — Get an out-of-plan alert
- `POST /telephony/{billingAccount}/outplanNotification` — Create an out-of-plan alert
- `DELETE /telephony/{billingAccount}/outplanNotification/{id}` — Delete an out-of-plan alert
- `POST /telephony/{billingAccount}/transferSecurityDeposit` — Transfer the security deposit

## List allowed credit thresholds

`GET /1.0/telephony/{billingAccount}/allowedCreditThreshold`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-allowedcreditthreshold

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:allowedCreditThreshold/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | order.Price[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `text` | string |  |  |
| `value` | number |  |  |

```json
[
  {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  }
]
```

### Example

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

# 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("/telephony/{billingAccount}/allowedCreditThreshold");

print_r($result);
?>
```

## List security deposit amounts

`GET /1.0/telephony/{billingAccount}/amountSecurityDeposit`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-amountsecuritydeposit

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:amountSecurityDeposit/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | order.Price[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `text` | string |  |  |
| `value` | number |  |  |

```json
[
  {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  }
]
```

### Example

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

# 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("/telephony/{billingAccount}/amountSecurityDeposit");

print_r($result);
?>
```

## Check a security deposit transfer

`POST /1.0/telephony/{billingAccount}/canTransferSecurityDeposit`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#post-telephony-billingaccount-cantransfersecuritydeposit

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:canTransferSecurityDeposit/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingAccountDestination` | string | yes | The destination billing account |

```json
{
  "billingAccountDestination": "string"
}
```

### Responses

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

```json
true
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/canTransferSecurityDeposit" \
  -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: string
result = client.post("/telephony/{billingAccount}/canTransferSecurityDeposit",
	billingAccountDestination = None, # The destination billing account (type: string)
)

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

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

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

// Request body type: string
$result = $ovh->post("/telephony/{billingAccount}/canTransferSecurityDeposit", array(
	billingAccountDestination => null, // The destination billing account (type: string)
));

print_r($result);
?>
```

## List billed consumptions

`GET /1.0/telephony/{billingAccount}/historyConsumption`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historyconsumption

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyConsumption/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (date)[] | successful operation |

```json
[
  "2024-01-01"
]
```

### Example

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

# 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("/telephony/{billingAccount}/historyConsumption");

print_r($result);
?>
```

## Get a billed consumption

`GET /1.0/telephony/{billingAccount}/historyConsumption/{date}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historyconsumption-date

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyConsumption/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `date` | path | string (date) | yes |  |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.HistoryConsumption | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date) | read-only |  |
| `price` | order.Price | read-only | Price with it's currency and textual representation |
| `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 |  |  |
| `priceOutplan` | order.Price | read-only | Price with it's currency and textual representation |
| `priceOutplan.currencyCode` | order.CurrencyCodeEnum |  | one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `priceOutplan.text` | string |  |  |
| `priceOutplan.value` | number |  |  |
| `status` | telephony.BillStatusEnum | read-only | Billing progress status — one of `doing`, `done`, `error`, `todo` |

```json
{
  "date": "2024-01-01",
  "price": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "priceOutplan": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "status": "doing"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/historyConsumption/{date}" \
  -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("/telephony/{billingAccount}/historyConsumption/{date}")

# 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("/telephony/{billingAccount}/historyConsumption/{date}");

print_r($result);
?>
```

## Get billed consumption files

`GET /1.0/telephony/{billingAccount}/historyConsumption/{date}/file`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historyconsumption-date-file

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyConsumption/file/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `date` | path | string (date) | yes |  |
| `extension` | query | telephony.BillDocument | yes | Document suffix — one of `csv`, `pdf`, `received.csv`, `xml` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.PcsFile | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filename` | string | read-only |  |
| `status` | telephony.PcsFileStatusEnum | read-only | File providing task status — one of `doing`, `done`, `error`, `todo` |
| `url` | string | read-only |  |
| `urlExpirationDatetime` | string (date-time) | read-only |  |

```json
{
  "filename": "string",
  "status": "doing",
  "url": "string",
  "urlExpirationDatetime": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/historyConsumption/{date}/file" \
  -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("/telephony/{billingAccount}/historyConsumption/{date}/file")

# 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("/telephony/{billingAccount}/historyConsumption/{date}/file");

print_r($result);
?>
```

## List repayment bills

`GET /1.0/telephony/{billingAccount}/historyRepaymentConsumption`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historyrepaymentconsumption

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyRepaymentConsumption/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (date)[] | successful operation |

```json
[
  "2024-01-01"
]
```

### Example

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

# 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("/telephony/{billingAccount}/historyRepaymentConsumption");

print_r($result);
?>
```

## Get a repayment bill

`GET /1.0/telephony/{billingAccount}/historyRepaymentConsumption/{date}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historyrepaymentconsumption-date

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyRepaymentConsumption/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `date` | path | string (date) | yes | date of the bill |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.HistoryRepaymentConsumption | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingNumber` | string | read-only | the number of the bill |
| `date` | string (date) | read-only | date of the bill |
| `price` | order.Price | read-only | the amout which is repayed |
| `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 |  |  |
| `status` | telephony.BillStatusEnum | read-only | status of the bill — one of `doing`, `done`, `error`, `todo` |

```json
{
  "billingNumber": "string",
  "date": "2024-01-01",
  "price": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "status": "doing"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/historyRepaymentConsumption/{date}" \
  -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("/telephony/{billingAccount}/historyRepaymentConsumption/{date}")

# 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("/telephony/{billingAccount}/historyRepaymentConsumption/{date}");

print_r($result);
?>
```

## Request a repayment

`POST /1.0/telephony/{billingAccount}/historyRepaymentConsumption`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#post-telephony-billingaccount-historyrepaymentconsumption

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyRepaymentConsumption/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingNumber` | string |  | The number of the bill |

```json
{
  "billingNumber": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.HistoryRepaymentConsumption | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingNumber` | string | read-only | the number of the bill |
| `date` | string (date) | read-only | date of the bill |
| `price` | order.Price | read-only | the amout which is repayed |
| `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 |  |  |
| `status` | telephony.BillStatusEnum | read-only | status of the bill — one of `doing`, `done`, `error`, `todo` |

```json
{
  "billingNumber": "string",
  "date": "2024-01-01",
  "price": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "status": "doing"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/historyRepaymentConsumption" \
  -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: string
result = client.post("/telephony/{billingAccount}/historyRepaymentConsumption",
	billingNumber = None, # The number of the bill (type: string, nullable)
)

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

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

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

// Request body type: string
$result = $ovh->post("/telephony/{billingAccount}/historyRepaymentConsumption", array(
	billingNumber => null, // The number of the bill (type: string, nullable)
));

print_r($result);
?>
```

## Get the bill as CSV

`GET /1.0/telephony/{billingAccount}/historyRepaymentConsumption/{date}/document`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historyrepaymentconsumption-date-document

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyRepaymentConsumption/document/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `date` | path | string (date) | yes | date of the bill |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.PcsFile | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filename` | string | read-only |  |
| `status` | telephony.PcsFileStatusEnum | read-only | File providing task status — one of `doing`, `done`, `error`, `todo` |
| `url` | string | read-only |  |
| `urlExpirationDatetime` | string (date-time) | read-only |  |

```json
{
  "filename": "string",
  "status": "doing",
  "url": "string",
  "urlExpirationDatetime": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/historyRepaymentConsumption/{date}/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("/telephony/{billingAccount}/historyRepaymentConsumption/{date}/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("/telephony/{billingAccount}/historyRepaymentConsumption/{date}/document");

print_r($result);
?>
```

## List toll-free bills

`GET /1.0/telephony/{billingAccount}/historyTollfreeConsumption`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historytollfreeconsumption

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyTollfreeConsumption/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (date)[] | successful operation |

```json
[
  "2024-01-01"
]
```

### Example

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

# 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("/telephony/{billingAccount}/historyTollfreeConsumption");

print_r($result);
?>
```

## Get a toll-free bill

`GET /1.0/telephony/{billingAccount}/historyTollfreeConsumption/{date}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historytollfreeconsumption-date

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyTollfreeConsumption/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `date` | path | string (date) | yes | date of the bill |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.HistoryTollfreeConsumption | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date) | read-only | date of the bill |
| `price` | order.Price | read-only | the amount which is paid by the called number |
| `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 |  |  |
| `status` | telephony.BillStatusEnum | read-only | status of the bill — one of `doing`, `done`, `error`, `todo` |

```json
{
  "date": "2024-01-01",
  "price": {
    "currencyCode": "AUD",
    "text": "string",
    "value": 0
  },
  "status": "doing"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/historyTollfreeConsumption/{date}" \
  -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("/telephony/{billingAccount}/historyTollfreeConsumption/{date}")

# 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("/telephony/{billingAccount}/historyTollfreeConsumption/{date}");

print_r($result);
?>
```

## Get the bill as CSV

`GET /1.0/telephony/{billingAccount}/historyTollfreeConsumption/{date}/document`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-historytollfreeconsumption-date-document

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:historyTollfreeConsumption/document/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `date` | path | string (date) | yes | date of the bill |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.PcsFile | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filename` | string | read-only |  |
| `status` | telephony.PcsFileStatusEnum | read-only | File providing task status — one of `doing`, `done`, `error`, `todo` |
| `url` | string | read-only |  |
| `urlExpirationDatetime` | string (date-time) | read-only |  |

```json
{
  "filename": "string",
  "status": "doing",
  "url": "string",
  "urlExpirationDatetime": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/historyTollfreeConsumption/{date}/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("/telephony/{billingAccount}/historyTollfreeConsumption/{date}/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("/telephony/{billingAccount}/historyTollfreeConsumption/{date}/document");

print_r($result);
?>
```

## List out-of-plan alerts

`GET /1.0/telephony/{billingAccount}/outplanNotification`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-outplannotification

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:outplanNotification/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/telephony/{billingAccount}/outplanNotification");

print_r($result);
?>
```

## Get an out-of-plan alert

`GET /1.0/telephony/{billingAccount}/outplanNotification/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#get-telephony-billingaccount-outplannotification-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:outplanNotification/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.ConsumptionThreshold | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `block` | telephony.OutplanNotificationBlockEnum | read-only | The blocking type of the associate lines — one of `blockAllCalls`, `blockIncomingCalls`, `blockOutgoingCalls`, `none` |
| `id` | integer | read-only | The id of the notification |
| `notifyEmail` | string | read-only | Override the nichandle email for this notification |
| `percentage` | number | read-only | The notification percentage of maximum outplan |

```json
{
  "block": "blockAllCalls",
  "id": 0,
  "notifyEmail": "string",
  "percentage": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/outplanNotification/{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("/telephony/{billingAccount}/outplanNotification/{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("/telephony/{billingAccount}/outplanNotification/{id}");

print_r($result);
?>
```

## Create an out-of-plan alert

`POST /1.0/telephony/{billingAccount}/outplanNotification`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#post-telephony-billingaccount-outplannotification

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:outplanNotification/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `block` | telephony.OutplanNotificationBlockEnum | yes | The blocking type of the associate lines — one of `blockAllCalls`, `blockIncomingCalls`, `blockOutgoingCalls`, `none` |
| `notifyEmail` | string |  | Override the nichandle email for this notification |
| `percentage` | number | yes | The notification percentage of maximum outplan |

```json
{
  "block": "blockAllCalls",
  "notifyEmail": "string",
  "percentage": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | telephony.ConsumptionThreshold | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `block` | telephony.OutplanNotificationBlockEnum | read-only | The blocking type of the associate lines — one of `blockAllCalls`, `blockIncomingCalls`, `blockOutgoingCalls`, `none` |
| `id` | integer | read-only | The id of the notification |
| `notifyEmail` | string | read-only | Override the nichandle email for this notification |
| `percentage` | number | read-only | The notification percentage of maximum outplan |

```json
{
  "block": "blockAllCalls",
  "id": 0,
  "notifyEmail": "string",
  "percentage": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/outplanNotification" \
  -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: double
result = client.post("/telephony/{billingAccount}/outplanNotification",
	block = None, # The blocking type of the associate lines (type: telephony.OutplanNotificationBlockEnum)
	notifyEmail = None, # Override the nichandle email for this notification (type: string, nullable)
	percentage = None, # The notification percentage of maximum outplan (type: double)
)

# 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: double
$result = $ovh->post("/telephony/{billingAccount}/outplanNotification", array(
	block => null, // The blocking type of the associate lines (type: telephony.OutplanNotificationBlockEnum)
	notifyEmail => null, // Override the nichandle email for this notification (type: string, nullable)
	percentage => null, // The notification percentage of maximum outplan (type: double)
));

print_r($result);
?>
```

## Delete an out-of-plan alert

`DELETE /1.0/telephony/{billingAccount}/outplanNotification/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#delete-telephony-billingaccount-outplannotification-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:outplanNotification/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `id` | path | integer | yes | Id of the object |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/outplanNotification/{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("/telephony/{billingAccount}/outplanNotification/{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("/telephony/{billingAccount}/outplanNotification/{id}");

print_r($result);
?>
```

## Transfer the security deposit

`POST /1.0/telephony/{billingAccount}/transferSecurityDeposit`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/billing-usage-history/#post-telephony-billingaccount-transfersecuritydeposit

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:transferSecurityDeposit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | integer | yes | The amount, in euros, you want to transfer |
| `billingAccountDestination` | string | yes | The destination billing account |

```json
{
  "amount": 0,
  "billingAccountDestination": "string"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/transferSecurityDeposit" \
  -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("/telephony/{billingAccount}/transferSecurityDeposit",
	amount = None, # The amount, in euros, you want to transfer (type: long)
	billingAccountDestination = None, # The destination billing account (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("/telephony/{billingAccount}/transferSecurityDeposit", array(
	amount => null, // The amount, in euros, you want to transfer (type: long)
	billingAccountDestination => null, // The destination billing account (type: string)
));

print_r($result);
?>
```
