Skip to main content
POST
/
edges
/
tcp
Create
curl --request POST \
  --url https://api.ngrok.com/edges/tcp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'ngrok-version: <ngrok-version>' \
  --data '{
  "description": "<string>",
  "metadata": "<string>",
  "hostports": [
    "<string>"
  ],
  "backend": {
    "enabled": true,
    "backend_id": "<string>"
  },
  "ip_restriction": {
    "enabled": true,
    "ip_policy_ids": [
      "<string>"
    ]
  },
  "traffic_policy": {
    "enabled": true,
    "value": "<string>"
  }
}'
{
  "id": "<string>",
  "description": "<string>",
  "metadata": "<string>",
  "created_at": "<string>",
  "uri": "<string>",
  "hostports": [
    "<string>"
  ],
  "backend": {
    "enabled": true,
    "backend": {
      "id": "<string>",
      "uri": "<string>"
    }
  },
  "ip_restriction": {
    "enabled": true,
    "ip_policies": [
      {
        "id": "<string>",
        "uri": "<string>"
      }
    ]
  },
  "traffic_policy": {
    "enabled": true,
    "value": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

ngrok-version
integer
default:2
required

Body

application/json
description
string

human-readable description of what this edge will be used for; optional, max 255 bytes.

metadata
string

arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes.

hostports
string[]

hostports served by this edge

backend
object

edge modules

ip_restriction
object

n/a

traffic_policy
object

the traffic policy associated with this edge or null

Response

201 - application/json

Create a TCP Edge

id
string

unique identifier of this edge

description
string

human-readable description of what this edge will be used for; optional, max 255 bytes.

metadata
string

arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes.

created_at
string

timestamp when the edge was created, RFC 3339 format

uri
string

URI of the edge API resource

hostports
string[]

hostports served by this edge

backend
object

edge modules

ip_restriction
object

n/a

traffic_policy
object

the traffic policy associated with this edge or null