---
title: "create listener"
method: POST
path: "/listener"
tags: ["Listener"]
---

# create listener

`POST /listener`

Create a new listener

## Request body

- ListenerCreate
  - `name` string, required
  - `ip` string — the interface this listener should bind to.
  - `port` integer, required — the port this listener should bind to.
  - `protocol` 'http' | 'http2' | 'http_auto' | 'tcp', required — the protocol this listener will handle. http and http2 configure the listener to only process requests of that type. http_auto will adapt to HTTP/1.1 and HTTP/2 as needed. tcp configures the listener to be a tcp proxy
  - `domain_keys` string[]
  - `tracing_config` TracingConfig — Configures tracing operations to be performed on the given listener
    - `ingress` boolean — Determines whether spans sent from this listener should be treated as ingress or egress operations.
    - `request_headers_for_tags` string[] — the headers specified here will be added to the generated spans as annotations
  - `zone_key` string

## Response `200`

the newly created listener

- ListenerResult
  - `result` Listener
    - `name` string, required
    - `ip` string — the interface this listener should bind to.
    - `port` integer, required — the port this listener should bind to.
    - `protocol` 'http' | 'http2' | 'http_auto' | 'tcp', required — the protocol this listener will handle. http and http2 configure the listener to only process requests of that type. http_auto will adapt to HTTP/1.1 and HTTP/2 as needed. tcp configures the listener to be a tcp proxy
    - `domain_keys` string[]
    - `tracing_config` TracingConfig — Configures tracing operations to be performed on the given listener
      - `ingress` boolean — Determines whether spans sent from this listener should be treated as ingress or egress operations.
      - `request_headers_for_tags` string[] — the headers specified here will be added to the generated spans as annotations
    - `zone_key` string, required
    - `listener_key` string, required
    - `checksum` string, required

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.net/turbinelabs/apis/turbine-labs-api.md) · [All operations](https://skmtc.net/turbinelabs/apis/turbine-labs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/turbinelabs/turbine-labs-api/versions/47fce18aa12f/schema)
