Skip to content

Prepare: CSR and approvers

Generates a CSR and matching private key on our side. Optional — you may bring your own CSR to configure instead.

Request

{
"domainName": "apiname.com",
"country": "TR",
"state": "Istanbul",
"locality": "Istanbul",
"organization": "Apiname Ltd",
"organizationUnit": "IT",
"alternativeNames": ["www.apiname.com"]
}
Field Required Max Notes
domainName required 72 The certificate’s main name. For a wildcard certificate send *.apiname.com.
country required 2 ISO 3166-1 alpha-2, uppercase.
state required 50 State, province or region. Spell it out — no abbreviations.
locality required 50 City.
organization required 150 Legal entity name. For OV and EV certificates this must match official records exactly or vetting fails.
organizationUnit required 150 Department, e.g. IT.
alternativeNames optional — Extra names to embed in the CSR.

Response — 200

{
"csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICvDCCAaQCAQAwdzEL...\n-----END CERTIFICATE REQUEST-----",
"privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhki...\n-----END PRIVATE KEY-----"
}

Errors

Code Meaning and fix
Ssl:10001 Invalid domain name.
Ssl:10005 The domain name does not meet the required format. Wildcards must have the * as the leftmost label only.

Decodes a CSR so you can confirm its contents before buying. Useful when the customer supplies their own.

Request

{
"csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICvDCCAaQCAQAwdzEL...\n-----END CERTIFICATE REQUEST-----"
}

Response — 200

{
"domainName": "apiname.com",
"country": "TR",
"state": "Istanbul",
"locality": "Istanbul",
"organization": "Apiname Ltd",
"organizationUnit": "IT",
"alternativeNames": "www.apiname.com",
"isWildcard": false,
"isSan": true
}

Errors

Code Meaning and fix
Ssl:10004 The CSR could not be decoded. Check it includes the BEGIN/END lines and has not been line-wrapped incorrectly.

Lists the e-mail addresses the CA will accept as the domain’s approver, for e-mail-based validation.

Request — before buying

GET /api/v1/ssls/approvers?domainName=apiname.com&packageCode=POSITIVESSL

Request — for a certificate you already bought

GET /api/v1/ssls/approvers?certificateId=5e8c2a71-4b93-4f06-ae25-1d7f9c3b8042
Parameter Required Notes
certificateId conditional For a certificate you already bought. Its domain and package are used; domainName and packageCode are ignored.
domainName conditional Before a purchase: the domain you are about to buy for.
packageCode conditional Before a purchase: the package you are about to buy. Required with domainName.

Send either certificateId, or domainName together with packageCode.

Response — 200

{
"mails": [
"admin@apiname.com",
"administrator@apiname.com",
"hostmaster@apiname.com",
"postmaster@apiname.com",
"webmaster@apiname.com"
]
}

Errors

Code Meaning and fix
Ssl:10038 The approver list could not be retrieved from the CA. Retry, or use DNS/HTTP validation.
Ssl:10083 You sent neither certificateId nor domainName.
Ssl:10026 domainName sent without packageCode — or the certificateId is unknown or not yours.
Ssl:10003 packageCode unknown.