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--'