> ## 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 TCP Edge




## OpenAPI

````yaml https://raw.githubusercontent.com/ngrok/ngrok-openapi/refs/heads/main/ngrok.yaml post /edges/tcp
openapi: 3.0.0
info:
  title: ngrok OpenAPI
  version: 1.0.0
servers:
  - url: https://api.ngrok.com
security:
  - authentication: []
paths:
  /edges/tcp:
    post:
      tags:
        - EdgesTCP
      summary: Create
      description: |
        Create a TCP Edge
      operationId: EdgesTcpCreate
      parameters:
        - $ref: '#/components/parameters/ngrokVersion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TCPEdgeCreate'
      responses:
        '201':
          description: |
            Create a TCP Edge
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TCPEdge'
components:
  parameters:
    ngrokVersion:
      name: ngrok-version
      in: header
      required: true
      schema:
        type: integer
        default: 2
  schemas:
    TCPEdgeCreate:
      type: object
      properties:
        description:
          description: >
            human-readable description of what this edge will be used for;
            optional, max 255 bytes.
          type: string
        metadata:
          description: >
            arbitrary user-defined machine-readable data of this edge. Optional,
            max 4096 bytes.
          type: string
        hostports:
          description: |
            hostports served by this edge
          type: array
          items:
            type: string
        backend:
          $ref: '#/components/schemas/EndpointBackendMutate'
          description: |
            edge modules
        ip_restriction:
          $ref: '#/components/schemas/EndpointIPPolicyMutate'
          description: n/a
        traffic_policy:
          $ref: '#/components/schemas/EndpointTrafficPolicy'
          description: |
            the traffic policy associated with this edge or null
    TCPEdge:
      type: object
      properties:
        id:
          description: |
            unique identifier of this edge
          type: string
        description:
          description: >
            human-readable description of what this edge will be used for;
            optional, max 255 bytes.
          type: string
        metadata:
          description: >
            arbitrary user-defined machine-readable data of this edge. Optional,
            max 4096 bytes.
          type: string
        created_at:
          description: |
            timestamp when the edge was created, RFC 3339 format
          type: string
        uri:
          description: |
            URI of the edge API resource
          type: string
        hostports:
          description: |
            hostports served by this edge
          type: array
          items:
            type: string
        backend:
          $ref: '#/components/schemas/EndpointBackend'
          description: |
            edge modules
        ip_restriction:
          $ref: '#/components/schemas/EndpointIPPolicy'
          description: n/a
        traffic_policy:
          $ref: '#/components/schemas/EndpointTrafficPolicy'
          description: |
            the traffic policy associated with this edge or null
    EndpointBackendMutate:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        backend_id:
          description: |
            backend to be used to back this endpoint
          type: string
    EndpointIPPolicyMutate:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        ip_policy_ids:
          description: >
            list of all IP policies that will be used to check if a source IP is
            allowed access to the endpoint
          type: array
          items:
            type: string
    EndpointTrafficPolicy:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        value:
          description: >
            the traffic policy that should be applied to the traffic on your
            endpoint.
          type: string
    EndpointBackend:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        backend:
          $ref: '#/components/schemas/Ref'
          description: |
            backend to be used to back this endpoint
    EndpointIPPolicy:
      type: object
      properties:
        enabled:
          description: >
            `true` if the module will be applied to traffic, `false` to disable.
            default `true` if unspecified
          type: boolean
        ip_policies:
          description: >
            list of all IP policies that will be used to check if a source IP is
            allowed access to the endpoint
          type: array
          items:
            $ref: '#/components/schemas/Ref'
    Ref:
      type: object
      properties:
        id:
          description: |
            a resource identifier
          type: string
        uri:
          description: |
            a uri for locating a resource
          type: string
  securitySchemes:
    authentication:
      type: http
      scheme: bearer

````