---
title: "Register a listener"
method: POST
path: "/hub"
tags: ["events subscription"]
---

# Register a listener

`POST /hub`

## Request

- Base URL: `https://serverRoot/tmf-api/troubleTicket/v4`
- URL: `https://serverRoot/tmf-api/troubleTicket/v4/hub`
- Auth: none declared
- TypeScript: <https://skmtc.dev/bell/apis/trouble-ticket/docs/hub/post.ts> (a function with typed inputs; its response is checked against the schema)

Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.

## Request body

- EventSubscriptionInput: Sets the communication endpoint address the service instance must use to deliver notification information
  - `callback` string, required: The callback being registered.
  - `query` string: additional data to be passed

## Response `201`

Subscribed

- EventSubscription: Sets the communication endpoint address the service instance must use to deliver notification information
  - `id` string, required: Id of the listener
  - `callback` string, required: The callback being registered.
  - `query` string: additional data to be passed

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not allowed
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/bell/apis/trouble-ticket.md) - [All operations](https://skmtc.dev/bell/apis/trouble-ticket/llms.txt) - [OpenAPI document](https://skmtc.dev/bell/apis/trouble-ticket/revisions/ceffca30465c?raw)
