# Add SSL Certificate - AddWafDomainCertificateInfo

## Overview

Add SSL certificate, supports keyless






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `AddWafDomainCertificateInfo`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.dezai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |No|
| **Domain** | string | Domain Name |**Yes**|
| **CertificateName** | string | Certificate Name |**Yes**|
| **SslPublicKey** | string | SSL Public Key |**Yes**|
| **SslMD** | string | Certificate MD5 check value, to enable keyless, only need to calculate the md5 of the public key. |**Yes**|
| **SslKeyless** | string | Keyless switch, default is off; optional values: on, off. |**Yes**|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Id** | int | Returned SSL Certificate ID after successful addition |No|




## Example

### Request Example
    
```
https://api.dezai.com/?Action=AddWafDomainCertificateInfo
&ProjectId=org-xxx
&Domain=www.test.com
&CertificateName=test
&SslPublicKey=LS0tLS1CRUdJTiBDFURS0tLS0tCk1JSUZyRENDQkpTZ0F3SUJBZ0lRQW
&SslPrivateKey=LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS
&SslMD=617d723ec99fa0a4132a9a54052d4cd6
&SslKeyLess=off

```

### Response Example
    
```json
{
  "Action": "AddWafDomainCertificateInfoResponse",
  "Id": 6,
  "RetCode": 0
}
```





