> ## 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.

# Import certificate

> Import certificate



## OpenAPI

````yaml POST /api/v1/cert-manager/certificates/import-certificate
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/import-certificate:
    post:
      tags:
        - PKI Certificates
      description: Import certificate
      operationId: importCertificate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                certificatePem:
                  type: string
                  minLength: 1
                  description: The PEM-encoded leaf certificate.
                privateKeyPem:
                  type: string
                  minLength: 1
                  description: >-
                    Optional PEM-encoded private key associated with the
                    certificate.
                chainPem:
                  type: string
                  minLength: 1
                  description: Optional PEM-encoded chain of intermediate certificates.
                friendlyName:
                  type: string
                  maxLength: 255
                  description: A friendly name for the certificate.
                pkiCollectionId:
                  type: string
                  description: The ID of the PKI collection to add the certificate to.
                applicationId:
                  type: string
                  format: uuid
                profileId:
                  type: string
                  format: uuid
                  description: >-
                    The certificate profile that will manage this certificate's
                    lifecycle. The certificate must satisfy the profile's
                    certificate policy, or the request is rejected with a 400
                    naming the attributes that failed. Omit to track the
                    certificate without renewal, reissue or revocation.
                externalMetadata:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - digicert
                        orderId:
                          type: integer
                          exclusiveMinimum: true
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - type
                        - orderId
                      additionalProperties: false
                  description: >-
                    Identifies this certificate at the provider that issued it.
                    Required when the chosen profile issues from an external
                    certificate authority. For DigiCert, pass the CertCentral
                    order ID as { type: "digicert", orderId: 2081714 }.
              required:
                - certificatePem
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  certificateId:
                    type: string
                    format: uuid
                    description: The ID of the imported certificate.
                  certificate:
                    type: string
                    description: The imported certificate.
                  certificateChain:
                    type: string
                    description: >-
                      The certificate chain associated with the imported
                      certificate. Returned only when a chain was supplied at
                      import.
                  privateKey:
                    type: string
                    description: >-
                      The PEM-encoded private key associated with the imported
                      certificate. Returned only when a private key was supplied
                      at import.
                  serialNumber:
                    type: string
                    description: The serial number of the imported certificate.
                required:
                  - certificateId
                  - certificate
                  - serialNumber
                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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.