Cloudflare Certificates API

The Certificates API from Cloudflare — 2 operation(s) for certificates.

Documentation

📖
Documentation
https://developers.cloudflare.com/api/
📖
GettingStarted
https://developers.cloudflare.com/fundamentals/api/get-started/
📖
Authentication
https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
📖
RateLimits
https://developers.cloudflare.com/fundamentals/api/reference/limits/
📖
Documentation
https://developers.cloudflare.com/api/operations/accounts-list-accounts
📖
APIReference
https://developers.cloudflare.com/api/resources/accounts/
📖
APIReference
https://developers.cloudflare.com/ssl/
📖
Documentation
https://developers.cloudflare.com/api/operations/ip-access-rules-for-a-user-list-ip-access-rules
📖
Documentation
https://developers.cloudflare.com/api/operations/user'-s-account-memberships-list-memberships
📖
Documentation
https://developers.cloudflare.com/api/operations/radar-get-search-global
📖
APIReference
https://developers.cloudflare.com/radar/
📖
GettingStarted
https://developers.cloudflare.com/radar/get-started/
📖
Documentation
https://developers.cloudflare.com/api/operations/user-user-details
📖
APIReference
https://developers.cloudflare.com/api/resources/user/
📖
Documentation
https://developers.cloudflare.com/api/operations/zones-get
📖
APIReference
https://developers.cloudflare.com/api/resources/zones/
📖
Documentation
https://developers.cloudflare.com/dns/
📖
APIReference
https://developers.cloudflare.com/api/resources/dns/
📖
Documentation
https://developers.cloudflare.com/workers/
📖
APIReference
https://developers.cloudflare.com/api/resources/workers/
📖
GettingStarted
https://developers.cloudflare.com/workers/get-started/
📖
Documentation
https://developers.cloudflare.com/workers-ai/
📖
GettingStarted
https://developers.cloudflare.com/workers-ai/get-started/rest-api/
📖
APIReference
https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/
📖
APIReference
https://developers.cloudflare.com/workers-ai/models/
📖
Documentation
https://developers.cloudflare.com/ai-gateway/
📖
APIReference
https://developers.cloudflare.com/ai-gateway/usage/providers/
📖
GettingStarted
https://developers.cloudflare.com/ai-gateway/get-started/
📖
Documentation
https://developers.cloudflare.com/r2/
📖
APIReference
https://developers.cloudflare.com/r2/api/s3/api/
📖
GettingStarted
https://developers.cloudflare.com/r2/get-started/
📖
Documentation
https://developers.cloudflare.com/d1/
📖
APIReference
https://developers.cloudflare.com/api/resources/d1/
📖
GettingStarted
https://developers.cloudflare.com/d1/get-started/
📖
Documentation
https://developers.cloudflare.com/kv/
📖
APIReference
https://developers.cloudflare.com/api/resources/kv/
📖
GettingStarted
https://developers.cloudflare.com/kv/get-started/
📖
Documentation
https://developers.cloudflare.com/queues/
📖
APIReference
https://developers.cloudflare.com/api/resources/queues/
📖
GettingStarted
https://developers.cloudflare.com/queues/get-started/
📖
Documentation
https://developers.cloudflare.com/durable-objects/
📖
GettingStarted
https://developers.cloudflare.com/durable-objects/get-started/
📖
APIReference
https://developers.cloudflare.com/durable-objects/api/
📖
Documentation
https://developers.cloudflare.com/vectorize/
📖
GettingStarted
https://developers.cloudflare.com/vectorize/get-started/intro/
📖
APIReference
https://developers.cloudflare.com/vectorize/reference/client-api/
📖
Documentation
https://developers.cloudflare.com/pages/
📖
APIReference
https://developers.cloudflare.com/pages/configuration/api/
📖
GettingStarted
https://developers.cloudflare.com/pages/get-started/
📖
Documentation
https://developers.cloudflare.com/stream/
📖
GettingStarted
https://developers.cloudflare.com/stream/get-started/
📖
APIReference
https://developers.cloudflare.com/api/resources/stream/
📖
Documentation
https://developers.cloudflare.com/images/
📖
GettingStarted
https://developers.cloudflare.com/images/get-started/
📖
APIReference
https://developers.cloudflare.com/api/resources/images/
📖
Documentation
https://developers.cloudflare.com/turnstile/
📖
GettingStarted
https://developers.cloudflare.com/turnstile/get-started/
📖
APIReference
https://developers.cloudflare.com/api/resources/turnstile/
📖
Documentation
https://developers.cloudflare.com/logs/
📖
APIReference
https://developers.cloudflare.com/api/resources/logpush/
📖
GettingStarted
https://developers.cloudflare.com/logs/get-started/
📖
Documentation
https://developers.cloudflare.com/hyperdrive/
📖
APIReference
https://developers.cloudflare.com/api/resources/hyperdrive/
📖
GettingStarted
https://developers.cloudflare.com/hyperdrive/get-started/

Specifications

Other Resources

OpenAPI Specification

cloudflare-certificates-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Cloudflare / Accounts Certificates API
  description: Needs description.
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
  version: 4.0.0
servers:
- url: https://api.cloudflare.com/client/v4
  description: Client API
security:
- api_email: []
  api_key: []
- api_token: []
- user_service_key: []
tags:
- name: Certificates
paths:
  /certificates/{certificate_id}:
    delete:
      tags:
      - Certificates
      summary: Cloudflare Revoke Certificate
      description: Revoke an existing Origin CA certificate by its serial number. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).
      operationId: origin-ca-revoke-certificate
      parameters:
      - name: certificate_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_identifier'
      requestBody:
        required: true
        content:
          application/json: {}
      responses:
        '200':
          description: Revoke Certificate response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tls-certificates-and-hostnames_certificate_response_single_id'
        4XX:
          description: Revoke Certificate response failure
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_certificate_response_single_id'
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-common-failure'
      security:
      - user_service_key: []
    get:
      tags:
      - Certificates
      summary: Cloudflare Get Certificate
      description: Get an existing Origin CA certificate by its serial number. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).
      operationId: origin-ca-get-certificate
      parameters:
      - name: certificate_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_identifier'
      responses:
        '200':
          description: Get Certificate response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-certificate_response_single'
        4XX:
          description: Get Certificate response failure
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-certificate_response_single'
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-common-failure'
      security:
      - user_service_key: []
  /certificates:
    get:
      tags:
      - Certificates
      summary: Cloudflare List Certificates
      description: List all existing Origin CA certificates for a given zone. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).
      operationId: origin-ca-list-certificates
      parameters:
      - name: identifier
        in: query
        schema:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_identifier'
      responses:
        '200':
          description: List Certificates response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-certificate_response_collection'
        4XX:
          description: List Certificates response failure
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-certificate_response_collection'
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-common-failure'
      security:
      - user_service_key: []
    post:
      tags:
      - Certificates
      summary: Cloudflare Create Certificate
      description: Create an Origin CA certificate. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).
      operationId: origin-ca-create-certificate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                csr:
                  $ref: '#/components/schemas/tls-certificates-and-hostnames_csr'
                hostnames:
                  $ref: '#/components/schemas/tls-certificates-and-hostnames_hostnames'
                request_type:
                  $ref: '#/components/schemas/tls-certificates-and-hostnames_request_type'
                requested_validity:
                  $ref: '#/components/schemas/tls-certificates-and-hostnames_requested_validity'
      responses:
        '200':
          description: Create Certificate response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-certificate_response_single'
        4XX:
          description: Create Certificate response failure
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-certificate_response_single'
                - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-common-failure'
      security:
      - user_service_key: []
components:
  schemas:
    tls-certificates-and-hostnames_schemas-certificate_response_single:
      allOf:
      - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-single'
      - type: object
        properties:
          result:
            type: object
    tls-certificates-and-hostnames_certificates:
      type: object
      required:
      - hostnames
      - csr
      - requested_validity
      - request_type
      properties:
        certificate:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_components-schemas-certificate'
        csr:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_csr'
        expires_on:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-expires_on'
        hostnames:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_hostnames'
        id:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_identifier'
        request_type:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_request_type'
        requested_validity:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_requested_validity'
    tls-certificates-and-hostnames_api-response-single:
      allOf:
      - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-common'
      - properties:
          result:
            anyOf:
            - type: object
            - type: string
      type: object
    tls-certificates-and-hostnames_hostnames:
      type: array
      description: Array of hostnames or wildcard names (e.g., *.example.com) bound to the certificate.
      example:
      - example.com
      - '*.example.com'
      items: {}
    tls-certificates-and-hostnames_api-response-collection:
      allOf:
      - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-common'
      - properties:
          result:
            type: array
            nullable: true
            items: {}
          result_info:
            $ref: '#/components/schemas/tls-certificates-and-hostnames_result_info'
      type: object
    tls-certificates-and-hostnames_request_type:
      type: string
      description: Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
      enum:
      - origin-rsa
      - origin-ecc
      - keyless-certificate
      example: origin-rsa
    tls-certificates-and-hostnames_api-response-common-failure:
      type: object
      required:
      - success
      - errors
      - messages
      - result
      properties:
        errors:
          allOf:
          - $ref: '#/components/schemas/tls-certificates-and-hostnames_messages'
          example:
          - code: 7003
            message: No route for the URI
          minLength: 1
        messages:
          allOf:
          - $ref: '#/components/schemas/tls-certificates-and-hostnames_messages'
          example: []
        result:
          type: object
          enum:
          - null
          nullable: true
        success:
          type: boolean
          description: Whether the API call was successful
          enum:
          - false
          example: false
    tls-certificates-and-hostnames_schemas-certificate_response_collection:
      allOf:
      - $ref: '#/components/schemas/tls-certificates-and-hostnames_api-response-collection'
      - type: object
        properties:
          result:
            type: array
            items:
              $ref: '#/components/schemas/tls-certificates-and-hostnames_certificates'
    tls-certificates-and-hostnames_api-response-common:
      type: object
      required:
      - success
      - errors
      - messages
      - result
      properties:
        errors:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_messages'
        messages:
          $ref: '#/components/schemas/tls-certificates-and-hostnames_messages'
        result:
          anyOf:
          - type: object
          - type: array
            items: {}
          - type: string
        success:
          type: boolean
          description: Whether the API call was successful
          enum:
          - true
          example: true
    tls-certificates-and-hostnames_certificate_response_single_id:
      allOf:
      - $ref: '#/components/schemas/tls-certificates-and-hostnames_schemas-certificate_response_single'
      - properties:
          result:
            properties:
              id:
                $ref: '#/components/schemas/tls-certificates-and-hostnames_identifier'
    tls-certificates-and-hostnames_identifier:
      type: string
      description: Identifier
      example: 023e105f4ecef8ad9ca31a8372d0c353
      readOnly: true
      maxLength: 32
    tls-certificates-and-hostnames_result_info:
      type: object
      properties:
        count:
          type: number
          description: Total number of results for the requested service
          example: 1
        page:
          type: number
          description: Current page within paginated list of results
          example: 1
        per_page:
          type: number
          description: Number of results per page of results
          example: 20
        total_count:
          type: number
          description: Total results available without any search parameters
          example: 2000
    tls-certificates-and-hostnames_schemas-expires_on:
      type: string
      format: date-time
      description: When the certificate will expire.
      example: '2014-01-01T05:20:00.12345Z'
      readOnly: true
    tls-certificates-and-hostnames_messages:
      type: array
      example: []
      items:
        type: object
        uniqueItems: true
        required:
        - code
        - message
        properties:
          code:
            type: integer
            minimum: 1000
          message:
            type: string
    tls-certificates-and-hostnames_requested_validity:
      type: number
      description: The number of days for which the certificate should be valid.
      enum:
      - 7
      - 30
      - 90
      - 365
      - 730
      - 1095
      - 5475
      default: 5475
      example: 5475
    tls-certificates-and-hostnames_components-schemas-certificate:
      type: string
      description: The Origin CA certificate. Will be newline-encoded.
      example: '--BEGIN CERTIFICATE--

        MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxDTALBgNVBAgMBFV0YWgxDzANBgNV

        BAcMBkxpbmRvbjEWMBQGA1UECgwNRGlnaUNlcnQgSW5jLjERMA8GA1UECwwIRGln

        aUNlcnQxHTAbBgNVBAMMFGV4YW1wbGUuZGlnaWNlcnQuY29tMIIBIjANBgkqhkiG

        9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8+To7d+2kPWeBv/orU3LVbJwDrSQbeKamCmo

        wp5bqDxIwV20zqRb7APUOKYoVEFFOEQs6T6gImnIolhbiH6m4zgZ/CPvWBOkZc+c

        1Po2EmvBz+AD5sBdT5kzGQA6NbWyZGldxRthNLOs1efOhdnWFuhI162qmcflgpiI

        WDuwq4C9f+YkeJhNn9dF5+owm8cOQmDrV8NNdiTqin8q3qYAHHJRW28glJUCZkTZ

        wIaSR6crBQ8TbYNE0dc+Caa3DOIkz1EOsHWzTx+n0zKfqcbgXi4DJx+C1bjptYPR

        BPZL8DAeWuA8ebudVT44yEp82G96/Ggcf7F33xMxe0yc+Xa6owIDAQABoAAwDQYJ

        KoZIhvcNAQEFBQADggEBAB0kcrFccSmFDmxox0Ne01UIqSsDqHgL+XmHTXJwre6D

        hJSZwbvEtOK0G3+dr4Fs11WuUNt5qcLsx5a8uk4G6AKHMzuhLsJ7XZjgmQXGECpY

        Q4mC3yT3ZoCGpIXbw+iP3lmEEXgaQL0Tx5LFl/okKbKYwIqNiyKWOMj7ZR/wxWg/

        ZDGRs55xuoeLDJ/ZRFf9bI+IaCUd1YrfYcHIl3G87Av+r49YVwqRDT0VDV7uLgqn

        29XI1PpVUNCPQGn9p/eX6Qo7vpDaPybRtA2R7XLKjQaF9oXWeCUqy1hvJac9QFO2

        97Ob1alpHPoZ7mWiEuJwjBPii6a9M9G30nUo39lBi1w=

        --END CERTIFICATE--'
      readOnly: true
    tls-certificates-and-hostnames_csr:
      type: string
      description: The Certificate Signing Request (CSR). Must be newline-encoded.
      example: '--BEGIN CERTIFICATE REQUEST--

        MIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz

        Y28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI

        hvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL

        Hu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8

        4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc

        N8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi

        g7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I

        uOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG

        CSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt

        cGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx

        pTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/

        auRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH

        yc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J

        hXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs

        dcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==

        --END CERTIFICATE REQUEST--'