API
Certificates
Create certificate

Create a Certificate

  • Name
    post
    Type
    /v1/certificates
    Description

    To upload or create a new SSL certificate send POST request to the endpoint.

In case of uploading a certificate generated by the user, the following attributes should be used: private_key, certificate, and the chain_certificate.

Request

Additional attributes are required to be provided as follow:

Required Attributes

  • Name
    name
    Type
    string
    Description

    The certificate name given by the user.

  • Name
    private_key
    Type
    integer
    Description

    The Certificate PEM-formatted private-key.

  • Name
    certificate
    Type
    string
    Description

    The PEM-formatted public SSL certificate identifier.

  • Name
    chain_certificate
    Type
    string
    Description

    Certificate chain is the list of certificates used to authenticate the certificate authority and the user SSL domain certificate.

Example

curl -X POST "https://api.simplystack.com/v1/certificates" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
  -d '{"name": "cert01", "private_key": "'"$(</path/to/privat.pem)"'","certificate": "'"$(</path/to/cert.pem)"'","chain_certificate": "'"$(</path/to/ca.pem)"'"}'

Response

JSON object with key named certificate with the following identifiers:

Attributes

See certificate model.

Example

json
{
  "certificate": {
    "id": "04edfb72-cad0-4b8f-b6ab-146548aa34f5",
    "name": "cert01",
    "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBIZMz8pnK6V52\nSVf+CYssOfCQHAx5f0Ou5rYbq3xNh8VHAIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1\nDwGb8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86X\nwrE4oFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3w\nZ2mzZ03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1F\nZRnak/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFX\nfqqbQwuRAgMBAAECggEBAILLmkW0JzOk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