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

# Search

> Search and filter certificates within a project.



## OpenAPI

````yaml POST /api/v1/projects/{projectId}/certificates/search
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/projects/{projectId}/certificates/search:
    post:
      tags:
        - PKI Certificates
      description: Search and filter certificates within a project.
      operationId: searchProjectCertificates
      parameters:
        - schema:
            type: string
          in: path
          name: projectId
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                friendlyName:
                  type: string
                  description: The friendly name of the certificate to filter by.
                commonName:
                  type: string
                  description: The common name of the certificate to filter by.
                offset:
                  type: number
                  minimum: 0
                  default: 0
                  description: >-
                    The offset to start from. If you enter 10, it will start
                    from the 10th certificate.
                limit:
                  type: number
                  minimum: 1
                  maximum: 100
                  default: 25
                  description: The number of certificates to return.
                forPkiSync:
                  type: boolean
                  default: false
                  description: Retrieve only certificates available for PKI sync.
                search:
                  type: string
                  description: Search by SAN, CN, certificate ID, or serial number.
                status:
                  type: string
                  description: Filter by certificate status.
                profileIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: Filter by certificate profile IDs.
                fromDate:
                  type: string
                  format: date-time
                  description: Filter certificates created from this date.
                toDate:
                  type: string
                  format: date-time
                  description: Filter certificates created until this date.
                metadata:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        minLength: 1
                        maxLength: 255
                      value:
                        type: string
                        maxLength: 1020
                    required:
                      - key
                    additionalProperties: false
                  description: >-
                    Filter by metadata key-value pairs. Each entry should have a
                    key (required) and optionally a value to match against.
                extendedKeyUsage:
                  type: string
                  description: >-
                    Filter by extended key usage. Only certificates containing
                    this EKU will be returned (e.g. 'codeSigning',
                    'serverAuth').
                keyAlgorithm:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: Filter by key algorithm (e.g. 'RSA_2048', 'EC_prime256v1').
                signatureAlgorithm:
                  type: string
                  description: >-
                    Filter by signature algorithm (e.g. 'RSA-SHA256',
                    'ECDSA-SHA256').
                keySizes:
                  type: array
                  items:
                    type: number
                  description: Filter by key sizes in bits (e.g. [2048, 4096]).
                caIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: Filter by certificate authority IDs.
                enrollmentTypes:
                  type: array
                  items:
                    type: string
                  description: >-
                    Filter by enrollment types (e.g. 'api', 'est', 'acme',
                    'scep').
                source:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: >-
                    Filter by certificate source ('issued', 'discovered',
                    'imported').
                notAfterFrom:
                  type: string
                  format: date-time
                  description: Filter certificates expiring on or after this date.
                notAfterTo:
                  type: string
                  format: date-time
                  description: Filter certificates expiring on or before this date.
                notBeforeFrom:
                  type: string
                  format: date-time
                  description: Filter certificates issued on or after this date.
                notBeforeTo:
                  type: string
                  format: date-time
                  description: Filter certificates issued on or before this date.
                applicationId:
                  type: string
                  format: uuid
                  description: >-
                    Filter to certificates issued through a specific
                    Application.
                applicationIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: >-
                    Filter to certificates issued through any of the supplied
                    Applications.
                sortBy:
                  type: string
                  enum:
                    - notAfter
                    - notBefore
                    - createdAt
                    - commonName
                    - keyAlgorithm
                    - status
                  description: >-
                    Column to sort by (e.g. 'notAfter', 'notBefore',
                    'commonName').
                sortOrder:
                  type: string
                  enum:
                    - asc
                    - desc
                  description: 'Sort direction: ''asc'' or ''desc''.'
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  certificates:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        caId:
                          type: string
                          format: uuid
                          nullable: true
                        status:
                          type: string
                        serialNumber:
                          type: string
                        friendlyName:
                          type: string
                        commonName:
                          type: string
                        notBefore:
                          type: string
                          format: date-time
                        notAfter:
                          type: string
                          format: date-time
                        revokedAt:
                          type: string
                          format: date-time
                          nullable: true
                        revocationReason:
                          type: number
                          nullable: true
                        altNames:
                          type: string
                          nullable: true
                        caCertId:
                          type: string
                          format: uuid
                          nullable: true
                        certificateTemplateId:
                          type: string
                          format: uuid
                          nullable: true
                        keyUsages:
                          type: array
                          items:
                            type: string
                          nullable: true
                        extendedKeyUsages:
                          type: array
                          items:
                            type: string
                          nullable: true
                        projectId:
                          type: string
                        pkiSubscriberId:
                          type: string
                          format: uuid
                          nullable: true
                        profileId:
                          type: string
                          format: uuid
                          nullable: true
                        renewBeforeDays:
                          type: number
                          nullable: true
                        renewedFromCertificateId:
                          type: string
                          format: uuid
                          nullable: true
                        renewedByCertificateId:
                          type: string
                          format: uuid
                          nullable: true
                        renewalError:
                          type: string
                          nullable: true
                        keyAlgorithm:
                          type: string
                          nullable: true
                        signatureAlgorithm:
                          type: string
                          nullable: true
                        subjectOrganization:
                          type: string
                          nullable: true
                        subjectOrganizationalUnit:
                          type: string
                          nullable: true
                        subjectCountry:
                          type: string
                          nullable: true
                        subjectState:
                          type: string
                          nullable: true
                        subjectLocality:
                          type: string
                          nullable: true
                        fingerprintSha256:
                          type: string
                          nullable: true
                        fingerprintSha1:
                          type: string
                          nullable: true
                        isCA:
                          type: boolean
                          nullable: true
                        pathLength:
                          type: number
                          nullable: true
                        source:
                          type: string
                          nullable: true
                        discoveryMetadata:
                          nullable: true
                        externalMetadata:
                          nullable: true
                        applicationId:
                          type: string
                          format: uuid
                          nullable: true
                        hasPrivateKey:
                          type: boolean
                        caName:
                          type: string
                          nullable: true
                        profileName:
                          type: string
                          nullable: true
                        enrollmentType:
                          type: string
                          nullable: true
                        applicationName:
                          type: string
                          nullable: true
                      required:
                        - id
                        - createdAt
                        - updatedAt
                        - status
                        - serialNumber
                        - friendlyName
                        - commonName
                        - notBefore
                        - notAfter
                        - projectId
                        - hasPrivateKey
                      additionalProperties: false
                  totalCount:
                    type: number
                required:
                  - certificates
                  - totalCount
                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

````