All Products
Search
Document Center

Certificate Management Service:CreateCsr

Last Updated:Jun 25, 2024

Creates a certificate signing request (CSR).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
KeySizeintegerYes

The key length that is used by the algorithm. The key length for RSA algorithms can be 2,048, 3,072, and 4,096 bits. The key length for ECC and SM2 algorithms can be 256 bits.

2048
AlgorithmstringYes

The algorithm. Valid values: RSA, SM2, and ECC.

RSA
CommonNamestringYes

The primary domain name, which is a common name.

123.com
SansstringNo

The secondary domain names. Separate multiple domain names with commas (,).

www.example.com,www.aliyundoc.com
CountryCodestringYes

The two-letter country codes that are published by the International Organization for Standardization (ISO). For example, the two-letter country code for China is CN.

CN
ProvincestringYes

The province or location where the company is located.

Beijing
LocalitystringYes

The city where the company is located.

Beijing
CorpNamestringNo

The name of the company.

NamestringNo

The name of the CSR.

csr-123
DepartmentstringNo

The department that uses the certificate.

IT

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Csrstring

The content of the CSR.

-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST-----
RequestIdstring

The request ID.

12345678-1234-1234-1234-123456789ABC
CsrIdlong

The ID of the CSR.

3365

Examples

Sample success responses

JSONformat

{
  "Csr": "-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST-----",
  "RequestId": "12345678-1234-1234-1234-123456789ABC",
  "CsrId": 3365
}

Error codes

For a list of error codes, visit the Service error codes.