# Web Cloud › Web Hosting › SSL 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

> 7 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/web-hosting/ssl/

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

## Operations

- `GET /hosting/web/{serviceName}/ssl` — Get the SSL certificate
- `GET /hosting/web/{serviceName}/ssl/domains` — List SSL certificate domains
- `GET /hosting/web/{serviceName}/ssl/report` — Get the SSL certificate report
- `GET /webhosting/resource/{name}/certificate` — List SSL certificates
- `POST /hosting/web/{serviceName}/ssl` — Create or import an SSL certificate
- `POST /hosting/web/{serviceName}/ssl/regenerate` — Regenerate the SSL certificate
- `DELETE /hosting/web/{serviceName}/ssl` — Delete the SSL certificate

## Get the SSL certificate

`GET /1.0/hosting/web/{serviceName}/ssl`

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

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

Returns the provider, type and status of the SSL certificate of the hosting.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.SSL | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `isReportable` | boolean | read-only | If the hostedssl is currently bound to a report |
| `provider` | hosting.web.hostedssl.ProviderEnum | read-only | Provider of the Hosted SSL — one of `COMODO`, `CUSTOM`, `LETSENCRYPT`, `SECTIGO` |
| `regenerable` | boolean | read-only | Regenerable flag |
| `status` | hosting.web.hostedssl.StatusEnum | read-only | Status of the Hosted SSL — one of `created`, `creating`, `deleting`, `importing`, `regenerating` |
| `taskId` | integer | read-only | The task ID working on this Hosted SSL |
| `type` | hosting.web.hostedssl.TypeEnum | read-only | Type of the Hosted SSL — one of `CUSTOM`, `DV`, `EV` |

```json
{
  "isReportable": true,
  "provider": "COMODO",
  "regenerable": true,
  "status": "created",
  "taskId": 0,
  "type": "CUSTOM"
}
```

### Example

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

print_r($result);
?>
```

## List SSL certificate domains

`GET /1.0/hosting/web/{serviceName}/ssl/domains`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ssl/#get-hosting-web-servicename-ssl-domains

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

Returns the domains covered by the SSL certificate of the hosting.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

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

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

### Example

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

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

print_r($result);
?>
```

## Get the SSL certificate report

`GET /1.0/hosting/web/{serviceName}/ssl/report`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ssl/#get-hosting-web-servicename-ssl-report

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

Returns the status of each validation check run by the certification authority for the certificate of the hosting.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.ssl.Report | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `certificateSigningRequestStatus` | hosting.web.hostedssl.ReportStatusEnum | read-only | "Certificate signing request" test status done by certification authority — one of `completed`, `in-progress`, `non-completed`, `non-required`, `not-applicable`, `not-provided` |
| `domainControlValidationStatus` | hosting.web.hostedssl.ReportStatusEnum | read-only | "Domain control validation" test status done by certification authority — one of `completed`, `in-progress`, `non-completed`, `non-required`, `not-applicable`, `not-provided` |
| `organizationValidationStatus` | hosting.web.hostedssl.ReportStatusEnum | read-only | Applicant's legal status obtained or verified directly with registration agency — one of `completed`, `in-progress`, `non-completed`, `non-required`, `not-applicable`, `not-provided` |
| `phoneCallApprovalStatus` | hosting.web.hostedssl.ReportStatusEnum | read-only | Approval verified through a phone call to the contract signer — one of `completed`, `in-progress`, `non-completed`, `non-required`, `not-applicable`, `not-provided` |
| `providerOrderId` | string | read-only | The order ID from given hostedssl provider |
| `termsAndConditionsAcceptanceStatus` | hosting.web.hostedssl.ReportStatusEnum | read-only | Terms and conditions agreements acceptance — one of `completed`, `in-progress`, `non-completed`, `non-required`, `not-applicable`, `not-provided` |
| `tradeNameVerificationStatus` | hosting.web.hostedssl.ReportStatusEnum | read-only | Trade name verified directly with registration agency or through a verified third party — one of `completed`, `in-progress`, `non-completed`, `non-required`, `not-applicable`, `not-provided` |

```json
{
  "certificateSigningRequestStatus": "completed",
  "domainControlValidationStatus": "completed",
  "organizationValidationStatus": "completed",
  "phoneCallApprovalStatus": "completed",
  "providerOrderId": "string",
  "termsAndConditionsAcceptanceStatus": "completed",
  "tradeNameVerificationStatus": "completed"
}
```

### Example

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

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

print_r($result);
?>
```

## List SSL certificates

`GET /v2/webhosting/resource/{name}/certificate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ssl/#get-webhosting-resource-name-certificate

**Status:** Beta version  
**IAM actions:** `webHosting:apiovh:ssl/get`

Returns the SSL certificates of the hosting, with their type, domains and expiration date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `name` | path | string | yes | Name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | webhosting.SSL[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
| `currentState` | webhosting.SSLCurrentState | read-only | Current state of the SSL |
| `currentState.additionalDomains` | string[] | read-only | Additional domains of the SSL |
| `currentState.certificateType` | webhosting.SSLCertificateTypeEnum | read-only | Certificate type of the SSL — one of `COMODO`, `CUSTOM`, `LETSENCRYPT`, `SECTIGO` |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation of the SSL |
| `currentState.expiredAt` | string (date-time) | read-only | Date of expiration of the SSL |
| `currentState.mainDomain` | string | read-only | Main domain of the SSL |
| `currentState.state` | webhosting.SSLStateEnum | read-only | State of the SSL — one of `ACTIVE`, `CREATING`, `DELETING`, `EXPIRED`, `IMPORTING`, `REGENERATING` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the SSL |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the SSL |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Webhosting SSL readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |

```json
[
  {
    "checksum": "string",
    "currentState": {
      "additionalDomains": [
        "string"
      ],
      "certificateType": "COMODO",
      "createdAt": "2024-01-01T12:00:00Z",
      "expiredAt": "2024-01-01T12:00:00Z",
      "mainDomain": "string",
      "state": "ACTIVE"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/webhosting/resource/{name}/certificate" \
  -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("/v2/webhosting/resource/{name}/certificate")

# 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("/v2/webhosting/resource/{name}/certificate");

print_r($result);
?>
```

## Create or import an SSL certificate

`POST /1.0/hosting/web/{serviceName}/ssl`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ssl/#post-hosting-web-servicename-ssl

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

Creates the free Let's Encrypt SSL certificate of the hosting. To import a custom certificate instead, send the certificate, its private key and its chain.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `hosting.web.SSLInput`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `certificate` | string |  | certificate |
| `chain` | string |  | certificate chain |
| `key` | string (password) |  | private key |

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.SSL | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `isReportable` | boolean | read-only | If the hostedssl is currently bound to a report |
| `provider` | hosting.web.hostedssl.ProviderEnum | read-only | Provider of the Hosted SSL — one of `COMODO`, `CUSTOM`, `LETSENCRYPT`, `SECTIGO` |
| `regenerable` | boolean | read-only | Regenerable flag |
| `status` | hosting.web.hostedssl.StatusEnum | read-only | Status of the Hosted SSL — one of `created`, `creating`, `deleting`, `importing`, `regenerating` |
| `taskId` | integer | read-only | The task ID working on this Hosted SSL |
| `type` | hosting.web.hostedssl.TypeEnum | read-only | Type of the Hosted SSL — one of `CUSTOM`, `DV`, `EV` |

```json
{
  "isReportable": true,
  "provider": "COMODO",
  "regenerable": true,
  "status": "created",
  "taskId": 0,
  "type": "CUSTOM"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{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
)

# Request body type: hosting.web.SSLInput
result = client.post("/hosting/web/{serviceName}/ssl",
	certificate = None, # certificate (type: string)
	chain = None, # certificate chain (type: string)
	key = None, # private key (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: hosting.web.SSLInput
$result = $ovh->post("/hosting/web/{serviceName}/ssl", array(
	certificate => null, // certificate (type: string)
	chain => null, // certificate chain (type: string)
	key => null, // private key (type: string)
));

print_r($result);
?>
```

## Regenerate the SSL certificate

`POST /1.0/hosting/web/{serviceName}/ssl/regenerate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ssl/#post-hosting-web-servicename-ssl-regenerate

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ssl/regenerate`

Regenerates the SSL certificate of the hosting.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.SSL | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `isReportable` | boolean | read-only | If the hostedssl is currently bound to a report |
| `provider` | hosting.web.hostedssl.ProviderEnum | read-only | Provider of the Hosted SSL — one of `COMODO`, `CUSTOM`, `LETSENCRYPT`, `SECTIGO` |
| `regenerable` | boolean | read-only | Regenerable flag |
| `status` | hosting.web.hostedssl.StatusEnum | read-only | Status of the Hosted SSL — one of `created`, `creating`, `deleting`, `importing`, `regenerating` |
| `taskId` | integer | read-only | The task ID working on this Hosted SSL |
| `type` | hosting.web.hostedssl.TypeEnum | read-only | Type of the Hosted SSL — one of `CUSTOM`, `DV`, `EV` |

```json
{
  "isReportable": true,
  "provider": "COMODO",
  "regenerable": true,
  "status": "created",
  "taskId": 0,
  "type": "CUSTOM"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ssl/regenerate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

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

result = client.post("/hosting/web/{serviceName}/ssl/regenerate")

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

print_r($result);
?>
```

## Delete the SSL certificate

`DELETE /1.0/hosting/web/{serviceName}/ssl`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ssl/#delete-hosting-web-servicename-ssl

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

Deletes the SSL certificate of the hosting.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.SSL | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `isReportable` | boolean | read-only | If the hostedssl is currently bound to a report |
| `provider` | hosting.web.hostedssl.ProviderEnum | read-only | Provider of the Hosted SSL — one of `COMODO`, `CUSTOM`, `LETSENCRYPT`, `SECTIGO` |
| `regenerable` | boolean | read-only | Regenerable flag |
| `status` | hosting.web.hostedssl.StatusEnum | read-only | Status of the Hosted SSL — one of `created`, `creating`, `deleting`, `importing`, `regenerating` |
| `taskId` | integer | read-only | The task ID working on this Hosted SSL |
| `type` | hosting.web.hostedssl.TypeEnum | read-only | Type of the Hosted SSL — one of `CUSTOM`, `DV`, `EV` |

```json
{
  "isReportable": true,
  "provider": "COMODO",
  "regenerable": true,
  "status": "created",
  "taskId": 0,
  "type": "CUSTOM"
}
```

### Example

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

print_r($result);
?>
```
