# Create Certificate - CreatePathXSSL

## Overview

Create an SSL certificate, you can pass the entire Pem certificate content to SSLContent, or pass the certificate, private key, and CA certificate separately.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CreatePathXSSL`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.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 in the format of org-xxx. Please refer to the [GetProjectList interface](api/summary/get_project_list). |**Yes**|
| **SSLName** | string | Name of the SSL Certificate |**Yes**|
| **SSLType** | string | The type of SSL certificate added currently only supports the Pem format. |No|
| **SSLContent** | string | The complete content of the SSL certificate, the private key cannot use a password, including the private key of the encrypted certificate, user certificate or CA certificate, etc. |No|
| **UserCert** | string | User Self-Signed Certificate Content |No|
| **PrivateKey** | string | The private key of the encryption certificate cannot be protected by a password. After enabling password protection, you need to enter the password when restarting the service. |No|
| **CACert** | string | CA Issued Certificate Content |No|

### 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|
| **SSLId** | string | Id of SSL Certificate |**Yes**|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=CreatePathXSSL
&ProjectId=org-xxx
&SSLName=ssss
&SSLType=Pem
&SSLContent=
&UserCert=---BEGIN----
&PrivateKey=---BEGIN----
&CaCert=
```

### Response Example
    
```json
{
  "Action": "CreatePathXSSLResponse",
  "RetCode": 0,
  "SSLId": "gssl-xxx"
}
```





