Skip to main content
POST
/
ip_policies
Create
curl --request POST \
  --url https://api.ngrok.com/ip_policies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'ngrok-version: <ngrok-version>' \
  --data '{
  "description": "<string>",
  "metadata": "<string>"
}'
{
  "id": "<string>",
  "uri": "<string>",
  "created_at": "<string>",
  "description": "<string>",
  "metadata": "<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 the source IPs of this IP policy. optional, max 255 bytes.

metadata
string

arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.

Response

201 - application/json

Create a new IP policy. It will not apply to any traffic until you associate to a traffic source via an endpoint configuration or IP restriction.

id
string

unique identifier for this IP policy

uri
string

URI of the IP Policy API resource

created_at
string

timestamp when the IP policy was created, RFC 3339 format

description
string

human-readable description of the source IPs of this IP policy. optional, max 255 bytes.

metadata
string

arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.