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

# Get certificate details



## OpenAPI

````yaml /api/machines/openapi.json get /v1/apps/{app_name}/certificates/{hostname}
openapi: 3.1.0
info:
  title: Machines API
  description: >-
    This site hosts documentation generated from the Fly.io Machines API OpenAPI
    specification. Visit our complete [Machines API
    docs](https://fly.io/docs/machines/api/) for how to get started, more
    information about each endpoint, parameter descriptions, and examples.
  contact: {}
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://api.machines.dev
security:
  - FlyBearerAuth: []
tags:
  - name: Apps
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/apps-resource/) for details about
      using the Apps resource.
  - name: Machines
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/machines-resource/) for details
      about using the Machines resource.
  - name: TLS Certificates
    description: >
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/certificates-resource/) for details
      about using the TLS Certificates resource.
  - name: Volumes
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/volumes-resource/) for details
      about using the Volumes resource.
  - name: Postgres Clusters
    description: >-
      Create and manage Postgres clusters, including databases, users,
      extensions, backups, and app attachments.
externalDocs:
  url: https://fly.io/docs/machines/working-with-machines/
paths:
  /v1/apps/{app_name}/certificates/{hostname}:
    get:
      tags:
        - TLS Certificates
      summary: Get certificate details
      operationId: App_Certificates_show
      parameters:
        - name: app_name
          in: path
          description: Fly App Name
          required: true
          schema:
            type: string
        - name: hostname
          in: path
          description: Certificate Hostname
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CertificateDetail'
components:
  schemas:
    CertificateDetail:
      type: object
      properties:
        acme_requested:
          type: boolean
          description: >-
            Whether Fly.io-issued (ACME) certificates were requested for the
            hostname.
        certificates:
          type: array
          description: >-
            The hostname's certificates: at most one custom entry and one Fly.io
            entry.
          items:
            $ref: '#/components/schemas/CertificateEntry'
        configured:
          type: boolean
          description: Whether ownership of the hostname has been verified.
        dns_provider:
          type: string
          description: DNS provider detected for the hostname, if known.
        dns_requirements:
          type: object
          description: >-
            DNS records to create to point the hostname at the app and validate
            it.
          allOf:
            - $ref: '#/components/schemas/DNSRequirements'
        hostname:
          type: string
          description: >-
            The hostname the certificate is for. May start with `*.` for a
            wildcard certificate.
        rate_limited_until:
          type: string
          description: >-
            If Let's Encrypt is rate-limiting certificate requests for the
            hostname, when that ends.
        status:
          type: string
          description: >-
            Human-readable status: `Ready`, `Awaiting certificates`, `Awaiting
            configuration`, or a

            hint about what is misconfigured.
        validation:
          type: object
          description: Which validation methods are currently possible.
          allOf:
            - $ref: '#/components/schemas/CertificateValidation'
        validation_errors:
          type: array
          description: Problems found by the most recent validation.
          items:
            $ref: '#/components/schemas/CertificateValidationError'
    CertificateEntry:
      type: object
      properties:
        created_at:
          type: string
          description: >-
            When the certificate was added; for Fly.io-issued certificates, the
            earliest one.
        expires_at:
          type: string
          description: >-
            When the certificate expires; for Fly.io-issued certificates, the
            latest one.
        issued:
          type: array
          description: >-
            The individual Fly.io-issued certificates, newest first. Empty for
            custom certificates.
          items:
            $ref: '#/components/schemas/IssuedCertificate'
        issuer:
          type: string
          description: >-
            Issuer of a custom certificate. Omitted for Fly.io-issued
            certificates.
        source:
          type: string
          description: >-
            `custom` for an uploaded certificate, `fly` for certificates issued
            by Fly.io.
          enum:
            - custom
            - fly
        status:
          type: string
          description: >-
            `active` once ownership of the hostname is verified. Until then,
            `pending_ownership` for

            custom certificates and `pending_validation` for Fly.io-issued
            certificates.
          enum:
            - active
            - pending_ownership
            - pending_validation
    DNSRequirements:
      type: object
      properties:
        a:
          type: array
          description: >-
            IPv4 addresses the hostname's A records can point to: the app's
            global IPv4 addresses

            and its shared IPv4 address.
          items:
            type: string
        aaaa:
          type: array
          description: >-
            IPv6 addresses the hostname's AAAA records can point to: the app's
            global IPv6

            addresses.
          items:
            type: string
        acme_challenge:
          type: object
          description: Record for DNS-01 validation.
          allOf:
            - $ref: '#/components/schemas/AcmeChallenge'
        cname:
          type: string
          description: >-
            Target the hostname can CNAME to instead of using A and AAAA
            records.
        ownership:
          type: object
          description: Record for proving ownership of the hostname.
          allOf:
            - $ref: '#/components/schemas/OwnershipVerification'
    CertificateValidation:
      type: object
      properties:
        alpn_configured:
          type: boolean
          description: >-
            Whether the hostname points at the app, allowing TLS-ALPN-01
            validation.
        dns_configured:
          type: boolean
          description: >-
            Whether the `_acme-challenge` CNAME record is set up, allowing
            DNS-01 validation.
        http_configured:
          type: boolean
          description: Whether the hostname points at the app, allowing HTTP-01 validation.
        ownership_txt_configured:
          type: boolean
          description: Whether the `_fly-ownership` TXT record is set up.
    CertificateValidationError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable description of the problem.
        remediation:
          type: string
          description: How to fix the problem, if known.
        timestamp:
          type: string
          description: When the problem was detected.
    IssuedCertificate:
      type: object
      properties:
        certificate_authority:
          type: string
          description: The certificate authority that issued the certificate.
        expires_at:
          type: string
          description: When the certificate expires.
        type:
          type: string
          description: Key type of the certificate.
          enum:
            - rsa
            - ecdsa
    AcmeChallenge:
      type: object
      properties:
        name:
          type: string
          description: >-
            Name of the CNAME record to create, such as
            `_acme-challenge.example.com`.
        target:
          type: string
          description: Value the CNAME record must point to.
    OwnershipVerification:
      type: object
      properties:
        app_value:
          type: string
          description: TXT record value that proves ownership for this app.
        name:
          type: string
          description: >-
            Name of the TXT record to create, such as
            `_fly-ownership.example.com`.
        org_value:
          type: string
          description: >-
            TXT record value that proves ownership for every app in the
            organization.
  securitySchemes:
    FlyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Fly API token with access to the requested organization or resource.
        Send it as `Authorization: Bearer <Fly API token>`.

````