Skip to content
Start here

Order Advanced Certificate Manager Certificate Pack

ssl.certificate_packs.create(CertificatePackCreateParams**kwargs) -> CertificatePackCreateResponse
POST/zones/{zone_id}/ssl/certificate_packs/order

For a given zone, order an advanced certificate pack.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
SSL and Certificates Write
ParametersExpand Collapse
zone_id: str

Identifier.

maxLength32
certificate_authority: Literal["google", "lets_encrypt", "ssl_com"]

Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions see this page for more details.

One of the following:
"google"
"lets_encrypt"
"ssl_com"
hosts: Sequence[Host]

Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty.

type: Literal["advanced"]

Type of certificate pack.

validation_method: Literal["txt", "http", "email"]

Validation Method selected for the order.

One of the following:
"txt"
"http"
"email"
validity_days: Literal[14, 30, 90, 365]

Validity Days selected for the order.

One of the following:
14
30
90
365
cloudflare_branding: Optional[bool]

Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.

ReturnsExpand Collapse
class CertificatePackCreateResponse: …

A newly ordered certificate pack. Certificates are not included until they are issued; get the certificate pack to retrieve them.

id: str

The unique identifier for a certificate_pack.

hosts: List[Host]

Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty.

status: Status

Status of certificate pack.

One of the following:
"initializing"
"pending_validation"
"deleted"
"pending_issuance"
"pending_deployment"
"pending_deletion"
"pending_expiration"
"expired"
"active"
"initializing_timed_out"
"validation_timed_out"
"issuance_timed_out"
"deployment_timed_out"
"deletion_timed_out"
"pending_cleanup"
"staging_deployment"
"staging_active"
"deactivating"
"inactive"
"backup_issued"
"holding_deployment"
type: Literal["mh_custom", "managed_hostname", "sni_custom", 5 more]

Type of certificate pack.

One of the following:
"mh_custom"
"managed_hostname"
"sni_custom"
"universal"
"advanced"
"total_tls"
"keyless"
"legacy_custom"
certificate_authority: Optional[Literal["google", "lets_encrypt", "ssl_com"]]

Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions see this page for more details.

One of the following:
"google"
"lets_encrypt"
"ssl_com"
validation_method: Optional[Literal["txt", "http", "email"]]

Validation Method selected for the order.

One of the following:
"txt"
"http"
"email"
validity_days: Optional[Literal[14, 30, 90, 365]]

Validity Days selected for the order.

One of the following:
14
30
90
365

Order Advanced Certificate Manager Certificate Pack

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
certificate_pack = client.ssl.certificate_packs.create(
    zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    certificate_authority="lets_encrypt",
    hosts=["example.com", "*.example.com", "www.example.com"],
    type="advanced",
    validation_method="txt",
    validity_days=14,
)
print(certificate_pack.id)
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "3822ff90-ea29-44df-9e55-21300bb9419b",
    "hosts": [
      "example.com",
      "*.example.com",
      "www.example.com"
    ],
    "status": "initializing",
    "type": "universal",
    "certificate_authority": "lets_encrypt",
    "validation_method": "txt",
    "validity_days": 14
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "3822ff90-ea29-44df-9e55-21300bb9419b",
    "hosts": [
      "example.com",
      "*.example.com",
      "www.example.com"
    ],
    "status": "initializing",
    "type": "universal",
    "certificate_authority": "lets_encrypt",
    "validation_method": "txt",
    "validity_days": 14
  }
}