---
title: "Create"
method: POST
path: "/endpoints"
tags: ["Endpoints"]
---

# Create

`POST /endpoints`

Create an endpoint, currently available only for cloud endpoints

## Headers

- `ngrok-version` integer, required

## Request body

- EndpointCreate
  - `url` string, required — the url of the endpoint
  - `type` string, required — Type of endpoint. Only 'cloud' is currently supported (represents a cloud endpoint). Defaults to 'cloud' if not specified.
  - `traffic_policy` string, required — The traffic policy attached to this endpoint
  - `description` string — user-supplied description of the associated tunnel
  - `metadata` string — user-supplied metadata of the associated tunnel or edge object
  - `bindings` string[] — the bindings associated with this endpoint
  - `pooling_enabled` boolean — n/a

## Response `201`

Create an endpoint, currently available only for cloud endpoints

- Endpoint
  - `id` string — unique endpoint resource identifier
  - `region` string — identifier of the region this endpoint belongs to
  - `created_at` string — timestamp when the endpoint was created in RFC 3339 format
  - `updated_at` string — timestamp when the endpoint was updated in RFC 3339 format
  - `public_url` string — deprecated [replaced by URL]: URL of the hostport served by this endpoint
  - `proto` string — protocol served by this endpoint. one of `http`, `https`, `tcp`, or `tls`
  - `scheme` string — n/a
  - `hostport` string — hostport served by this endpoint (hostname:port) -> soon to be deprecated
  - `host` string — n/a
  - `port` integer — n/a
  - `type` string — whether the endpoint is `ephemeral` (served directly by an agent-initiated tunnel) or `edge` (served by an edge) or `cloud (represents a cloud endpoint)`
  - `metadata` string — user-supplied metadata of the associated tunnel or edge object
  - `description` string — user-supplied description of the associated tunnel
  - `domain` Ref
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource
  - `tcp_addr` Ref
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource
  - `tunnel` Ref
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource
  - `edge` Ref
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource
  - `upstream_url` string — the local address the tunnel forwards to
  - `upstream_protocol` string — the protocol the agent uses to forward with
  - `url` string — the url of the endpoint
  - `principal` Ref
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource
  - `traffic_policy` string — The traffic policy attached to this endpoint
  - `bindings` string[] — the bindings associated with this endpoint
  - `tunnel_session` Ref
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource
  - `uri` string — URI of the Cloud Endpoint API resource
  - `name` string — user supplied name for the endpoint
  - `pooling_enabled` boolean — whether the endpoint allows pooling

## Other responses

- `4XX` — An error. The body carries a machine-readable error_code and a human-readable msg; every code is documented at https://ngrok.com/docs/errors. A 429 with error code ERR_NGROK_226 means the account exceeded the documented request-rate limit.
- `5XX` — An error. The body carries a machine-readable error_code and a human-readable msg; every code is documented at https://ngrok.com/docs/errors. A 429 with error code ERR_NGROK_226 means the account exceeded the documented request-rate limit.

## Changes

- **2025-05-27** `e4e00fe7c606` — 3 breaking, 2 warning, 3 info
  - the request property `traffic_policy` became required
  - the request property `type` became required
  - the request property `url` became required
  - removed the optional property `principal_id` from the response with the `201` status
  - …4 more
- **2024-10-24** `1039536f4bfd` — 1 info
  - added the optional property `principal_id` to the response with the `201` status

[Change history](https://skmtc.dev/ngrok/apis/ngrok-openapi/changes/endpoints/post.md)

---

[API](https://skmtc.dev/ngrok/apis/ngrok-openapi.md) · [All operations](https://skmtc.dev/ngrok/apis/ngrok-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ngrok/ngrok-openapi/revisions/c697539ac350/schema)
