ngrok Reserved Domains API

Reserved Domains are custom hostnames for HTTP/HTTPS/TLS tunnels.

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

OpenAPI Specification

ngrok-reserved-domains-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Ngrok Abuse Reports Reserved Domains 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: Reserved Domains
  description: Reserved Domains are custom hostnames for HTTP/HTTPS/TLS tunnels.
paths:
  /reserved_domains:
    post:
      operationId: createReservedDomain
      summary: Ngrok Create Reserved Domain
      description: Create a new reserved domain.
      tags:
      - Reserved Domains
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - domain
              properties:
                domain:
                  type: string
                  description: Hostname of the reserved domain.
                region:
                  type: string
                  description: Reserve the domain in a specific geographic region.
                description:
                  type: string
                metadata:
                  type: string
                certificate_id:
                  type: string
                  description: ID of a TLS certificate to use for connections.
                certificate_management_policy:
                  type: object
                  properties:
                    authority:
                      type: string
                    private_key_type:
                      type: string
      responses:
        '201':
          description: Reserved domain created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservedDomain'
    get:
      operationId: listReservedDomains
      summary: Ngrok List Reserved Domains
      description: List all reserved domains on this account.
      tags:
      - Reserved Domains
      parameters:
      - $ref: '#/components/parameters/BeforeId'
      - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: List of reserved domains.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservedDomainList'
  /reserved_domains/{id}:
    get:
      operationId: getReservedDomain
      summary: Ngrok Get Reserved Domain
      description: Get the details of a reserved domain by ID.
      tags:
      - Reserved Domains
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: Reserved domain details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservedDomain'
    patch:
      operationId: updateReservedDomain
      summary: Ngrok Update Reserved Domain
      description: Update attributes of a reserved domain by ID.
      tags:
      - Reserved Domains
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                metadata:
                  type: string
                certificate_id:
                  type: string
                certificate_management_policy:
                  type: object
                  properties:
                    authority:
                      type: string
                    private_key_type:
                      type: string
      responses:
        '200':
          description: Reserved domain updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservedDomain'
    delete:
      operationId: deleteReservedDomain
      summary: Ngrok Delete Reserved Domain
      description: Delete a reserved domain by ID.
      tags:
      - Reserved Domains
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '204':
          description: Reserved domain 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:
    Ref:
      type: object
      properties:
        id:
          type: string
          description: A resource identifier.
        uri:
          type: string
          description: A URI for locating a resource.
    ReservedDomain:
      type: object
      properties:
        id:
          type: string
        uri:
          type: string
        created_at:
          type: string
          format: date-time
        description:
          type: string
        metadata:
          type: string
        domain:
          type: string
        region:
          type: string
        cname_target:
          type: string
        certificate:
          $ref: '#/components/schemas/Ref'
        certificate_management_policy:
          type: object
        certificate_management_status:
          type: object
        acme_challenge_cname_target:
          type: string
    ReservedDomainList:
      type: object
      properties:
        reserved_domains:
          type: array
          items:
            $ref: '#/components/schemas/ReservedDomain'
        uri:
          type: string
        next_page_uri:
          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 '.