> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Renew certificate

> Renew a certificate. The renewed certificate copies the one being renewed, then applies only the changes supplied here. Profile defaults are not applied.



## OpenAPI

````yaml POST /api/v1/cert-manager/certificates/{id}/renew
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/cert-manager/certificates/{id}/renew:
    post:
      tags:
        - PKI Certificates
      description: >-
        Renew a certificate. The renewed certificate copies the one being
        renewed, then applies only the changes supplied here. Profile defaults
        are not applied.
      operationId: renewCertificate
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
          description: The ID of the certificate to renew.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - not: {}
                - type: object
                  properties:
                    removeRootsFromChain:
                      anyOf:
                        - type: boolean
                        - type: string
                      default: false
                      description: >-
                        Whether to remove the root certificate from the returned
                        certificate chain.
                    renewalKeySource:
                      type: string
                      enum:
                        - new
                        - reuse
                        - csr
                      description: >-
                        How the renewed certificate's key pair is handled. 'new'
                        generates a fresh pair, 'reuse' keeps the current one so
                        the renewed certificate carries the same public key, and
                        'csr' takes the key from a supplied signing request.
                        Defaults to 'new'.
                    csr:
                      type: string
                      minLength: 1
                      maxLength: 4096
                      description: >-
                        A PEM-encoded certificate signing request to renew from.
                        Its subject, key and extensions take precedence, so only
                        TTL and basic constraints may be set alongside it.
                    attributes:
                      type: object
                      properties:
                        commonName:
                          type: string
                          maxLength: 255
                          nullable: true
                        organization:
                          type: string
                          maxLength: 255
                          nullable: true
                        organizationalUnit:
                          type: string
                          maxLength: 255
                          nullable: true
                        country:
                          type: string
                          maxLength: 255
                          nullable: true
                        state:
                          type: string
                          maxLength: 255
                          nullable: true
                        locality:
                          type: string
                          maxLength: 255
                          nullable: true
                        domainComponents:
                          type: array
                          items:
                            type: string
                            minLength: 1
                            maxLength: 255
                          maxItems: 50
                          nullable: true
                        keyUsages:
                          type: array
                          items:
                            type: string
                            enum:
                              - digital_signature
                              - key_encipherment
                              - non_repudiation
                              - data_encipherment
                              - key_agreement
                              - key_cert_sign
                              - crl_sign
                              - encipher_only
                              - decipher_only
                          maxItems: 20
                        extendedKeyUsages:
                          type: array
                          items:
                            type: string
                            enum:
                              - client_auth
                              - server_auth
                              - code_signing
                              - email_protection
                              - ocsp_signing
                              - time_stamping
                              - any_purpose
                          maxItems: 20
                        altNames:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - dns_name
                                  - ip_address
                                  - email
                                  - uri
                                  - upn
                              value:
                                type: string
                                minLength: 1
                                maxLength: 255
                            required:
                              - type
                              - value
                            additionalProperties: false
                          maxItems: 100
                        signatureAlgorithm:
                          type: string
                          enum:
                            - RSA-SHA256
                            - RSA-SHA384
                            - RSA-SHA512
                            - ECDSA-SHA256
                            - ECDSA-SHA384
                            - ECDSA-SHA512
                            - ML-DSA-44
                            - ML-DSA-65
                            - ML-DSA-87
                            - SLH-DSA-SHA2-128f
                            - SLH-DSA-SHA2-128s
                            - SLH-DSA-SHA2-192f
                            - SLH-DSA-SHA2-192s
                            - SLH-DSA-SHA2-256f
                            - SLH-DSA-SHA2-256s
                            - SLH-DSA-SHAKE-128f
                            - SLH-DSA-SHAKE-128s
                            - SLH-DSA-SHAKE-192f
                            - SLH-DSA-SHAKE-192s
                            - SLH-DSA-SHAKE-256f
                            - SLH-DSA-SHAKE-256s
                        keyAlgorithm:
                          type: string
                          enum:
                            - RSA_2048
                            - RSA_3072
                            - RSA_4096
                            - EC_prime256v1
                            - EC_secp384r1
                            - EC_secp521r1
                            - ML-DSA-44
                            - ML-DSA-65
                            - ML-DSA-87
                            - SLH-DSA-SHA2-128f
                            - SLH-DSA-SHA2-128s
                            - SLH-DSA-SHA2-192f
                            - SLH-DSA-SHA2-192s
                            - SLH-DSA-SHA2-256f
                            - SLH-DSA-SHA2-256s
                            - SLH-DSA-SHAKE-128f
                            - SLH-DSA-SHAKE-128s
                            - SLH-DSA-SHAKE-192f
                            - SLH-DSA-SHAKE-192s
                            - SLH-DSA-SHAKE-256f
                            - SLH-DSA-SHAKE-256s
                        ttl:
                          type: string
                          maxLength: 32
                        basicConstraints:
                          type: object
                          properties:
                            isCA:
                              type: boolean
                            pathLength:
                              type: integer
                              minimum: 0
                              maximum: 255
                          required:
                            - isCA
                          additionalProperties: false
                      additionalProperties: false
                      description: >-
                        Certificate fields to change on renewal. Anything
                        omitted is copied from the certificate being renewed.
                        Profile defaults are not applied.
                  additionalProperties: false
                  nullable: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  certificate:
                    type: string
                  issuingCaCertificate:
                    type: string
                  certificateChain:
                    type: string
                  privateKey:
                    type: string
                  serialNumber:
                    type: string
                  certificateId:
                    type: string
                  certificateRequestId:
                    type: string
                required:
                  - certificate
                  - issuingCaCertificate
                  - certificateChain
                  - serialNumber
                  - certificateId
                  - certificateRequestId
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````