# Web Cloud › Telephony › Billing Accounts › Address Book 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

> 12 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/address-book/

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

## Operations

- `GET /telephony/{billingAccount}/phonebook` — List phonebooks
- `GET /telephony/{billingAccount}/phonebook/{bookKey}` — Get a phonebook
- `POST /telephony/{billingAccount}/phonebook` — Create a phonebook
- `DELETE /telephony/{billingAccount}/phonebook/{bookKey}` — Delete a phonebook
- `PUT /telephony/{billingAccount}/phonebook/{bookKey}` — Update a phonebook
- `GET /telephony/{billingAccount}/phonebook/{bookKey}/export` — Export contacts
- `POST /telephony/{billingAccount}/phonebook/{bookKey}/import` — Import contacts
- `GET /telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact` — List contacts
- `GET /telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}` — Get a contact
- `POST /telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact` — Create a contact
- `DELETE /telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}` — Delete a contact
- `PUT /telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}` — Update a contact

## List phonebooks

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#get-telephony-billingaccount-phonebook

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

### Parameters

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

### Responses

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

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

### Example

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

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

print_r($result);
?>
```

## Get a phonebook

`GET /1.0/telephony/{billingAccount}/phonebook/{bookKey}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#get-telephony-billingaccount-phonebook-bookkey

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

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bookKey` | string | read-only | Identifier of the phonebook |
| `name` | string |  | Phone book name |

```json
{
  "bookKey": "string",
  "name": "string"
}
```

### Example

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

# 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}/phonebook/{bookKey}");

print_r($result);
?>
```

## Create a phonebook

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#post-telephony-billingaccount-phonebook

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:phonebook/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 |
| --- | --- | --- | --- |
| `name` | string | yes | Name of the wanted phonebook |

```json
{
  "name": "string"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/phonebook" \
  -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}/phonebook",
	name = None, # Name of the wanted phonebook (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}/phonebook", array(
	name => null, // Name of the wanted phonebook (type: string)
));

print_r($result);
?>
```

## Delete a phonebook

`DELETE /1.0/telephony/{billingAccount}/phonebook/{bookKey}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#delete-telephony-billingaccount-phonebook-bookkey

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

### Parameters

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

### Responses

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

### Example

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

# 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}/phonebook/{bookKey}");

print_r($result);
?>
```

## Update a phonebook

`PUT /1.0/telephony/{billingAccount}/phonebook/{bookKey}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#put-telephony-billingaccount-phonebook-bookkey

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:phonebook/edit`

### Parameters

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

### Request body (required)

Type: `telephony.PhonebookMaster`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bookKey` | string | read-only | Identifier of the phonebook |
| `name` | string |  | Phone book name |

```json
{
  "name": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/phonebook/{bookKey}" \
  -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: telephony.PhonebookMaster
result = client.put("/telephony/{billingAccount}/phonebook/{bookKey}",
	name = None, # Phone book name (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: telephony.PhonebookMaster
$result = $ovh->put("/telephony/{billingAccount}/phonebook/{bookKey}", array(
	name => null, // Phone book name (type: string)
));

print_r($result);
?>
```

## Export contacts

`GET /1.0/telephony/{billingAccount}/phonebook/{bookKey}/export`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#get-telephony-billingaccount-phonebook-bookkey-export

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `bookKey` | path | string | yes | Identifier of the phonebook |
| `format` | query | telephony.ContactsExportFormatsEnum | yes | Format of the file — one of `csv` |

### 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}/phonebook/{bookKey}/export" \
  -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}/phonebook/{bookKey}/export")

# 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}/phonebook/{bookKey}/export");

print_r($result);
?>
```

## Import contacts

`POST /1.0/telephony/{billingAccount}/phonebook/{bookKey}/import`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#post-telephony-billingaccount-phonebook-bookkey-import

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:phonebook/import`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `documentId` | string | yes | ID of the /me/document file you want to import |

```json
{
  "documentId": "string"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | read-only | Action associated with the task |
| `message` | string | read-only | Potential failure reason of the task |
| `objectCreated` | string | read-only | Object potentially created at the end of the task |
| `serviceType` | string | read-only |  |
| `status` | telephony.TaskStatusEnum | read-only | Status of the task — one of `doing`, `done`, `error`, `pause`, `todo` |
| `taskId` | integer | read-only |  |

```json
{
  "action": "string",
  "message": "string",
  "objectCreated": "string",
  "serviceType": "string",
  "status": "doing",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/phonebook/{bookKey}/import" \
  -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}/phonebook/{bookKey}/import",
	documentId = None, # ID of the /me/document file you want to import (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}/phonebook/{bookKey}/import", array(
	documentId => null, // ID of the /me/document file you want to import (type: string)
));

print_r($result);
?>
```

## List contacts

`GET /1.0/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#get-telephony-billingaccount-phonebook-bookkey-phonebookcontact

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

### Parameters

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

### Responses

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

```json
[
  0
]
```

### Example

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

# 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}/phonebook/{bookKey}/phonebookContact");

print_r($result);
?>
```

## Get a contact

`GET /1.0/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#get-telephony-billingaccount-phonebook-bookkey-phonebookcontact-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `bookKey` | path | string | yes | Identifier of the phonebook |
| `id` | path | integer | yes | Contact identifier |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `group` | string |  | Group name of the phonebook |
| `homeMobile` | phoneNumber |  | Home mobile phone number of the contact |
| `homePhone` | phoneNumber |  | Home landline phone number of the contact |
| `id` | integer | read-only | Contact identifier |
| `name` | string |  | Contact name |
| `surname` | string |  | Contact surname |
| `workMobile` | phoneNumber |  | Mobile phone office number of the contact |
| `workPhone` | phoneNumber |  | Landline phone office number of the contact |

```json
{
  "group": "string",
  "homeMobile": "string",
  "homePhone": "string",
  "id": 0,
  "name": "string",
  "surname": "string",
  "workMobile": "string",
  "workPhone": "string"
}
```

### Example

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

print_r($result);
?>
```

## Create a contact

`POST /1.0/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#post-telephony-billingaccount-phonebook-bookkey-phonebookcontact

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

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `group` | string | yes | Group name of the phonebook |
| `homeMobile` | phoneNumber |  | Home mobile phone number of the contact |
| `homePhone` | phoneNumber |  | Home landline phone number of the contact |
| `name` | string | yes | Name of the contact |
| `surname` | string | yes | Contact surname |
| `workMobile` | phoneNumber |  | Mobile phone office number of the contact |
| `workPhone` | phoneNumber |  | Landline phone office number of the contact |

```json
{
  "group": "string",
  "homeMobile": "string",
  "homePhone": "string",
  "name": "string",
  "surname": "string",
  "workMobile": "string",
  "workPhone": "string"
}
```

### Responses

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

```json
0
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact" \
  -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: phoneNumber
result = client.post("/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact",
	group = None, # Group name of the phonebook (type: string)
	homeMobile = None, # Home mobile phone number of the contact (type: phoneNumber, nullable)
	homePhone = None, # Home landline phone number of the contact (type: phoneNumber, nullable)
	name = None, # Name of the contact (type: string)
	surname = None, # Contact surname (type: string)
	workMobile = None, # Mobile phone office number of the contact (type: phoneNumber, nullable)
	workPhone = None, # Landline phone office number of the contact (type: phoneNumber, 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: phoneNumber
$result = $ovh->post("/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact", array(
	group => null, // Group name of the phonebook (type: string)
	homeMobile => null, // Home mobile phone number of the contact (type: phoneNumber, nullable)
	homePhone => null, // Home landline phone number of the contact (type: phoneNumber, nullable)
	name => null, // Name of the contact (type: string)
	surname => null, // Contact surname (type: string)
	workMobile => null, // Mobile phone office number of the contact (type: phoneNumber, nullable)
	workPhone => null, // Landline phone office number of the contact (type: phoneNumber, nullable)
));

print_r($result);
?>
```

## Delete a contact

`DELETE /1.0/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#delete-telephony-billingaccount-phonebook-bookkey-phonebookcontact-id

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `bookKey` | path | string | yes | Identifier of the phonebook |
| `id` | path | integer | yes | Contact identifier |

### Responses

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

### Example

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

print_r($result);
?>
```

## Update a contact

`PUT /1.0/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/telephony/billing-accounts/address-book/#put-telephony-billingaccount-phonebook-bookkey-phonebookcontact-id

**Status:** Stable production version  
**IAM actions:** `voip:apiovh:phonebook/phonebookContact/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `billingAccount` | path | string | yes | The name of your billingAccount |
| `bookKey` | path | string | yes | Identifier of the phonebook |
| `id` | path | integer | yes | Contact identifier |

### Request body (required)

Type: `telephony.PhonebookContact`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `group` | string |  | Group name of the phonebook |
| `homeMobile` | phoneNumber |  | Home mobile phone number of the contact |
| `homePhone` | phoneNumber |  | Home landline phone number of the contact |
| `id` | integer | read-only | Contact identifier |
| `name` | string |  | Contact name |
| `surname` | string |  | Contact surname |
| `workMobile` | phoneNumber |  | Mobile phone office number of the contact |
| `workPhone` | phoneNumber |  | Landline phone office number of the contact |

```json
{
  "group": "string",
  "homeMobile": "string",
  "homePhone": "string",
  "name": "string",
  "surname": "string",
  "workMobile": "string",
  "workPhone": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}" \
  -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: telephony.PhonebookContact
result = client.put("/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}",
	group = None, # Group name of the phonebook (type: string)
	homeMobile = None, # Home mobile phone number of the contact (type: phoneNumber, nullable)
	homePhone = None, # Home landline phone number of the contact (type: phoneNumber, nullable)
	name = None, # Contact name (type: string)
	surname = None, # Contact surname (type: string)
	workMobile = None, # Mobile phone office number of the contact (type: phoneNumber, nullable)
	workPhone = None, # Landline phone office number of the contact (type: phoneNumber, 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: telephony.PhonebookContact
$result = $ovh->put("/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}", array(
	group => null, // Group name of the phonebook (type: string)
	homeMobile => null, // Home mobile phone number of the contact (type: phoneNumber, nullable)
	homePhone => null, // Home landline phone number of the contact (type: phoneNumber, nullable)
	name => null, // Contact name (type: string)
	surname => null, // Contact surname (type: string)
	workMobile => null, // Mobile phone office number of the contact (type: phoneNumber, nullable)
	workPhone => null, // Landline phone office number of the contact (type: phoneNumber, nullable)
));

print_r($result);
?>
```
