# Network › Load Balancer › SSL API

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

> 6 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/network/load-balancer/ssl/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/network/load-balancer/ssl.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/load-balancer/ssl.json?format=openapi3

## Operations

- `GET /ipLoadbalancing/{serviceName}/ssl` — List SSL certificates
- `POST /ipLoadbalancing/{serviceName}/ssl` — Create a custom SSL certificate
- `GET /ipLoadbalancing/{serviceName}/ssl/{id}` — Get an SSL certificate
- `DELETE /ipLoadbalancing/{serviceName}/ssl/{id}` — Delete an SSL certificate
- `PUT /ipLoadbalancing/{serviceName}/ssl/{id}` — Update an SSL certificate
- `POST /ipLoadbalancing/{serviceName}/freeCertificate` — Order a free certificate

## List SSL certificates

`GET /1.0/ipLoadbalancing/{serviceName}/ssl`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/ssl/#get-iploadbalancing-servicename-ssl

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:ssl/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `expireDate` | query | string (date-time) |  | Filter the value of expireDate property (<) |
| `fingerprint` | query | string |  | Filter the value of fingerprint property (like) |
| `serial` | query | string |  | Filter the value of serial property (like) |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |
| `type` | query | ipLoadbalancing.SslTypeEnum |  | Filter the value of type property (=) — one of `built`, `built_not_routed`, `custom` |

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Create a custom SSL certificate

`POST /1.0/ipLoadbalancing/{serviceName}/ssl`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/ssl/#post-iploadbalancing-servicename-ssl

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:ssl/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `certificate` | string | yes | Certificate |
| `chain` | string |  | Certificate chain |
| `displayName` | string |  | Human readable name for your ssl certificate, this field is for you |
| `key` | string | yes | Certificate key |

```json
{
  "certificate": "string",
  "chain": "string",
  "displayName": "string",
  "key": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.Ssl.Ssl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your ssl certificate, this field is for you |
| `expireDate` | string (date-time) | read-only | Expire date of your SSL certificate |
| `fingerprint` | string | read-only | Fingerprint of your SSL certificate |
| `id` | integer | read-only | Id of your SSL certificate |
| `san` | string[] | read-only | Subject Alternative Name of your SSL certificate |
| `serial` | string | read-only | Serial of your SSL certificate (Deprecated, use fingerprint instead !) |
| `subject` | string | read-only | Subject of your SSL certificate |
| `type` | ipLoadbalancing.SslTypeEnum | read-only | Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates. — one of `built`, `built_not_routed`, `custom` |

```json
{
  "displayName": "string",
  "expireDate": "2024-01-01T12:00:00Z",
  "fingerprint": "string",
  "id": 0,
  "san": [
    "string"
  ],
  "serial": "string",
  "subject": "string",
  "type": "built"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/ssl" \
  -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("/ipLoadbalancing/{serviceName}/ssl",
	certificate = None, # Certificate (type: text)
	chain = None, # Certificate chain (type: text, nullable)
	displayName = None, # Human readable name for your ssl certificate, this field is for you (type: string, nullable)
	key = None, # Certificate key (type: text)
)

# 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("/ipLoadbalancing/{serviceName}/ssl", array(
	certificate => null, // Certificate (type: text)
	chain => null, // Certificate chain (type: text, nullable)
	displayName => null, // Human readable name for your ssl certificate, this field is for you (type: string, nullable)
	key => null, // Certificate key (type: text)
));

print_r($result);
?>
```

## Get an SSL certificate

`GET /1.0/ipLoadbalancing/{serviceName}/ssl/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/ssl/#get-iploadbalancing-servicename-ssl-id

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:ssl/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of your SSL certificate |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.Ssl.Ssl | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your ssl certificate, this field is for you |
| `expireDate` | string (date-time) | read-only | Expire date of your SSL certificate |
| `fingerprint` | string | read-only | Fingerprint of your SSL certificate |
| `id` | integer | read-only | Id of your SSL certificate |
| `san` | string[] | read-only | Subject Alternative Name of your SSL certificate |
| `serial` | string | read-only | Serial of your SSL certificate (Deprecated, use fingerprint instead !) |
| `subject` | string | read-only | Subject of your SSL certificate |
| `type` | ipLoadbalancing.SslTypeEnum | read-only | Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates. — one of `built`, `built_not_routed`, `custom` |

```json
{
  "displayName": "string",
  "expireDate": "2024-01-01T12:00:00Z",
  "fingerprint": "string",
  "id": 0,
  "san": [
    "string"
  ],
  "serial": "string",
  "subject": "string",
  "type": "built"
}
```

### Example

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

print_r($result);
?>
```

## Delete an SSL certificate

`DELETE /1.0/ipLoadbalancing/{serviceName}/ssl/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/ssl/#delete-iploadbalancing-servicename-ssl-id

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:ssl/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of your SSL certificate |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

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

### Example

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

print_r($result);
?>
```

## Update an SSL certificate

`PUT /1.0/ipLoadbalancing/{serviceName}/ssl/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/ssl/#put-iploadbalancing-servicename-ssl-id

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:ssl/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of your SSL certificate |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `ipLoadbalancing.Ssl.Ssl`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your ssl certificate, this field is for you |
| `expireDate` | string (date-time) | read-only | Expire date of your SSL certificate |
| `fingerprint` | string | read-only | Fingerprint of your SSL certificate |
| `id` | integer | read-only | Id of your SSL certificate |
| `san` | string[] | read-only | Subject Alternative Name of your SSL certificate |
| `serial` | string | read-only | Serial of your SSL certificate (Deprecated, use fingerprint instead !) |
| `subject` | string | read-only | Subject of your SSL certificate |
| `type` | ipLoadbalancing.SslTypeEnum | read-only | Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates. — one of `built`, `built_not_routed`, `custom` |

```json
{
  "displayName": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/ssl/{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: ipLoadbalancing.Ssl.Ssl
result = client.put("/ipLoadbalancing/{serviceName}/ssl/{id}",
	displayName = None, # Human readable name for your ssl certificate, this field is for you (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: ipLoadbalancing.Ssl.Ssl
$result = $ovh->put("/ipLoadbalancing/{serviceName}/ssl/{id}", array(
	displayName => null, // Human readable name for your ssl certificate, this field is for you (type: string, nullable)
));

print_r($result);
?>
```

## Order a free certificate

`POST /1.0/ipLoadbalancing/{serviceName}/freeCertificate`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/ssl/#post-iploadbalancing-servicename-freecertificate

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:freeCertificate/order`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fqdn` | string[] | yes | The FQDN for which you want a free certificate. A DCV (Domain Control Validation) http request will be made to http://your_domain.abc, make sure this domain exists and resolves to your iplb ip before ordering |

```json
{
  "fqdn": [
    "string"
  ]
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | ipLoadbalancing.TaskActionEnum | read-only | Operation type — one of `deleteIplb`, `deployIplb`, `install`, `installIplb`, `installZone`, `orderFreeCertificate`, `orderPaidCertificate`, `orderSsl`, `refreshIplb`, `releaseIplb`, `releaseIplbZone`, `reopenIplb`, … |
| `creationDate` | string (date-time) | read-only | Creation date of your operation |
| `doneDate` | string (date-time) | read-only | Done date of your operation |
| `id` | integer | read-only | Id of the operation |
| `progress` | integer | read-only | Operation progress percentage |
| `status` | ipLoadbalancing.TaskStatusEnum | read-only | Current status of your operation — one of `blocked`, `cancelled`, `doing`, `done`, `error`, `todo` |
| `zones` | string[] | read-only | Zone of your Load Balancer which are updated by current Task |

```json
{
  "action": "deleteIplb",
  "creationDate": "2024-01-01T12:00:00Z",
  "doneDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "progress": 0,
  "status": "blocked",
  "zones": [
    "string"
  ]
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/freeCertificate" \
  -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("/ipLoadbalancing/{serviceName}/freeCertificate",
	fqdn = None, # The FQDN for which you want a free certificate. A DCV (Domain Control Validation) http request will be made to http://your_domain.abc, make sure this domain exists and resolves to your iplb ip before ordering (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("/ipLoadbalancing/{serviceName}/freeCertificate", array(
	fqdn => null, // The FQDN for which you want a free certificate. A DCV (Domain Control Validation) http request will be made to http://your_domain.abc, make sure this domain exists and resolves to your iplb ip before ordering (type: string[])
));

print_r($result);
?>
```
