Register a QoS Callback
# Register a Callback for the ThingSpace Quality of Service API ### `POST /api/m2m/v1/callbacks/{accountName}` Use this endpoint to register QoS service and establish a callback server. There are also [Callback Best Practices](). For more detail and information, you can visit [Register a Callback Listener](). This API endpoint can [be found here](). ## Header Parameters The request header must set the content-type to JSON, contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit [Getting Started](https://thingspace.verizon.com/documentation/api-documentation.html#/http/connectivity-management/guides/getting-started/introduction-to-the-connectivity-management-api). |Parameter Name|Data Type|Description| |-----|-----|-----| | **Authorization** *(required)* | string | HTTP Authorization request header containing a valid Bearer token: `Authorization: Bearer {token}` | | **VZ-M2M-Token** *(required)* | string | A valid session token returned by a Connectivity Management `POST /session/login` request. | | **Content-Type** *(required)* | string | Must be `application/json`. | ## HTTP Request [POST https://thingspace.verizon.com/api/m2m/v1/callbacks/{accountName}]() ## Request Parameters | Parameter Name | Data Type | Description | |-----|-----|-----| | **accountName** *(required)* | string | The name of a billing account. This value is numeric and must include any leading zeroes. | | **name** *(required)* | string | The name of the callback service to subscribe to: **QoS** *(required)* | | **url** *(required)* | string | The address on Enterprise server which has enabled a listening service for the QoS callback messages/events. Specify a URL that is reachable from the Verizon data centers. **Note:** If the Enterprise service is running on HTTPS, Enterprise should use a one-way authentication certificate with a white-listed IP address. | ## Request Body Example Request ```json { "name": "QoS", "url": "http://10.0.0.183:1234/CallbackListener/QosServiceMessages.asmx" } ``` ## Success Responses **Status 200** ```json { "accountName": "0000123456-00001", "serviceName": "QoS" } ``` ## Success Parameters | Parameter Name | Data Type | Description | |-----|-----|-----| | **accountName** | string | The name of a billing account. This value is numeric and must include any leading zeroes. | | **serviceName** | string | The name of the callback service, which will also identify the type and format of messages that will be sent to the registered URL. | ## Failure Responses All error messages are returned in this format: ```json { "errorCode": "error code string", "errorMessage": "error message string" } ```