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

# Create

> Create a new Agent Ingress. The ngrok agent can be configured to connect to ngrok via the new set of addresses on the returned Agent Ingress.




## OpenAPI

````yaml https://raw.githubusercontent.com/ngrok/ngrok-openapi/refs/heads/main/ngrok.yaml post /agent_ingresses
openapi: 3.0.0
info:
  title: ngrok OpenAPI
  version: 1.0.0
servers:
  - url: https://api.ngrok.com
security:
  - authentication: []
paths:
  /agent_ingresses:
    post:
      tags:
        - AgentIngresses
      summary: Create
      description: >
        Create a new Agent Ingress. The ngrok agent can be configured to connect
        to ngrok via the new set of addresses on the returned Agent Ingress.
      operationId: AgentIngressesCreate
      parameters:
        - $ref: '#/components/parameters/ngrokVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentIngressCreate'
      responses:
        '201':
          description: >
            Create a new Agent Ingress. The ngrok agent can be configured to
            connect to ngrok via the new set of addresses on the returned Agent
            Ingress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentIngress'
components:
  parameters:
    ngrokVersion:
      name: ngrok-version
      in: header
      required: true
      schema:
        type: integer
        default: 2
  schemas:
    AgentIngressCreate:
      type: object
      required:
        - domain
      properties:
        description:
          description: >
            human-readable description of the use of this Agent Ingress.
            optional, max 255 bytes.
          type: string
        metadata:
          description: >
            arbitrary user-defined machine-readable data of this Agent Ingress.
            optional, max 4096 bytes
          type: string
        domain:
          description: >
            the domain that you own to be used as the base domain name to
            generate regional agent ingress domains.
          type: string
        certificate_management_policy:
          $ref: '#/components/schemas/AgentIngressCertPolicy'
          description: >
            configuration for automatic management of TLS certificates for this
            domain, or null if automatic management is disabled. Optional.
    AgentIngress:
      type: object
      properties:
        id:
          description: |
            unique Agent Ingress resource identifier
          type: string
        uri:
          description: |
            URI to the API resource of this Agent ingress
          type: string
        description:
          description: >
            human-readable description of the use of this Agent Ingress.
            optional, max 255 bytes.
          type: string
        metadata:
          description: >
            arbitrary user-defined machine-readable data of this Agent Ingress.
            optional, max 4096 bytes
          type: string
        domain:
          description: >
            the domain that you own to be used as the base domain name to
            generate regional agent ingress domains.
          type: string
        ns_targets:
          description: >
            a list of target values to use as the values of NS records for the
            domain property these values will delegate control over the domain
            to ngrok
          type: array
          items:
            type: string
        region_domains:
          description: >
            a list of regional agent ingress domains that are subdomains of the
            value of domain this value may increase over time as ngrok adds more
            regions
          type: array
          items:
            type: string
        created_at:
          description: |
            timestamp when the Agent Ingress was created, RFC 3339 format
          type: string
        certificate_management_policy:
          $ref: '#/components/schemas/AgentIngressCertPolicy'
          description: >
            configuration for automatic management of TLS certificates for this
            domain, or null if automatic management is disabled
        certificate_management_status:
          $ref: '#/components/schemas/AgentIngressCertStatus'
          description: >
            status of the automatic certificate management for this domain, or
            null if automatic management is disabled
    AgentIngressCertPolicy:
      type: object
      properties:
        authority:
          description: >
            certificate authority to request certificates from. The only
            supported value is letsencrypt.
          type: string
        private_key_type:
          description: >
            type of private key to use when requesting certificates. Defaults to
            rsa, can be either rsa or ecdsa.
          type: string
    AgentIngressCertStatus:
      type: object
      properties:
        renews_at:
          description: |
            timestamp when the next renewal will be requested, RFC 3339 format
          type: string
        provisioning_job:
          $ref: '#/components/schemas/AgentIngressCertJob'
          description: >
            status of the certificate provisioning job, or null if the
            certificiate isn't being provisioned or renewed
    AgentIngressCertJob:
      type: object
      properties:
        error_code:
          description: >
            if present, an error code indicating why provisioning is failing. It
            may be either a temporary condition (INTERNAL_ERROR), or a permanent
            one the user must correct (DNS_ERROR).
          type: string
        msg:
          description: |
            a message describing the current status or error
          type: string
        started_at:
          description: |
            timestamp when the provisioning job started, RFC 3339 format
          type: string
        retries_at:
          description: |
            timestamp when the provisioning job will be retried
          type: string
  securitySchemes:
    authentication:
      type: http
      scheme: bearer

````