ngrok TLS Certificates API

TLS Certificates are x509 certificate/key pairs used to terminate TLS traffic.

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

OpenAPI Specification

ngrok-tls-certificates-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Ngrok Abuse Reports TLS Certificates API
  description: The ngrok API provides programmatic access to all of ngrok's resources. The API is REST-ish. It follows most of the conventions of a REST API but diverges slightly when the REST model does not fit well. The API listens only on port 443 to help avoid any accidental unencrypted requests. All API access requires an API key.
  version: 2.0.0
  contact:
    name: Ngrok
    url: https://ngrok.com
  license:
    name: Proprietary
    url: https://ngrok.com/tos
servers:
- url: https://api.ngrok.com
  description: Ngrok API Production Server
security:
- bearerAuth: []
- apiKeyAuth: []
tags:
- name: TLS Certificates
  description: TLS Certificates are x509 certificate/key pairs used to terminate TLS traffic.
paths:
  /tls_certificates:
    post:
      operationId: createTlsCertificate
      summary: Ngrok Create TLS Certificate
      description: Upload a new TLS certificate.
      tags:
      - TLS Certificates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - certificate_pem
              - private_key_pem
              properties:
                description:
                  type: string
                metadata:
                  type: string
                certificate_pem:
                  type: string
                  description: PEM-encoded certificate chain.
                private_key_pem:
                  type: string
                  description: PEM-encoded private key.
      responses:
        '201':
          description: TLS certificate created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlsCertificate'
    get:
      operationId: listTlsCertificates
      summary: Ngrok List TLS Certificates
      description: List all TLS certificates on this account.
      tags:
      - TLS Certificates
      parameters:
      - $ref: '#/components/parameters/BeforeId'
      - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: List of TLS certificates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlsCertificateList'
  /tls_certificates/{id}:
    get:
      operationId: getTlsCertificate
      summary: Ngrok Get TLS Certificate
      description: Get the details of a TLS certificate by ID.
      tags:
      - TLS Certificates
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: TLS certificate details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlsCertificate'
    patch:
      operationId: updateTlsCertificate
      summary: Ngrok Update TLS Certificate
      description: Update attributes of a TLS certificate by ID.
      tags:
      - TLS Certificates
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                metadata:
                  type: string
      responses:
        '200':
          description: TLS certificate updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlsCertificate'
    delete:
      operationId: deleteTlsCertificate
      summary: Ngrok Delete TLS Certificate
      description: Delete a TLS certificate by ID.
      tags:
      - TLS Certificates
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '204':
          description: TLS certificate deleted.
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: A unique identifier for the resource.
    BeforeId:
      name: before_id
      in: query
      required: false
      schema:
        type: string
      description: An ID to use for pagination. Results returned will be before this ID.
    Limit:
      name: limit
      in: query
      required: false
      schema:
        type: string
      description: The maximum number of results to return. Maximum is 100.
  schemas:
    TlsCertificateList:
      type: object
      properties:
        tls_certificates:
          type: array
          items:
            $ref: '#/components/schemas/TlsCertificate'
        uri:
          type: string
        next_page_uri:
          type: string
    TlsCertificate:
      type: object
      properties:
        id:
          type: string
        uri:
          type: string
        created_at:
          type: string
          format: date-time
        description:
          type: string
        metadata:
          type: string
        certificate_pem:
          type: string
        subject_common_name:
          type: string
        subject_alternative_names:
          type: object
          properties:
            dns_names:
              type: array
              items:
                type: string
            ips:
              type: array
              items:
                type: string
        not_before:
          type: string
          format: date-time
        not_after:
          type: string
          format: date-time
        key_usages:
          type: array
          items:
            type: string
        extended_key_usages:
          type: array
          items:
            type: string
        private_key_type:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use an ngrok API key as a Bearer token. Create API keys from the ngrok dashboard or via the API Keys endpoints.
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Pass the API key in the Authorization header prefixed with 'Bearer '.