Register a callback listener
# Register a Callback Listener URL ### `POST /callbacks/{accountName}` Registers a secure URL (HTTPS) for an account to receive messages from the Software Management Service FOTA callback service when new software versions are available and when upgrades start and finish. The messages are REST messages POSTed to the URL. You are responsible for creating and running a listening process on your server at that URL to receive and parse the messages. This request replaces the previously registered FOTA callback listener if there is one. ## Usage and Requirements The callback messages will conform to the JSON callback schema shown on the About Callback Services page. You can follow these instructions to create a simple callback listener that will report the callback type and display any received callbacks on the console. ## HTTP Request POST [https://thingspace.verizon.com/api/fota/v2/callbacks/{accountName}](/docs/standard-apis/connectivity-management/api-endpoints/connectivity-callbacks/register-callback/registercallback) ## Resource Path Parameters The account name must be included in the path. | Parameter Name | Data Type | Description | |:----------------|:-----------|:-------------| | **accountName** <br> *required* | string | The name of the billing account for which you want to receive callback messages. An account name is usually numeric, and must include any leading zeros. | ### Header Parameters The request header must 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/session-management/guides/getting-started). | Parameter Name | Data Type | Description | |:-----------------------|:-----------|:-----------------------------------------------------------------------------| | **Authorization** <br> _required_ | string | HTTP Authorization bearer token: <br> `Authorization: Bearer {token}` | | **VZ-M2M-Token** <br> _required_ | string | A valid session token: <br> `VZ-M2M-Token: {M2Mtoken}` | ## Request Body The body specifies the URL where the listening FOTA callback service is running. | Parameter Name | Data Type | Description | |:----------------|:-----------|:-------------| | **url** <br> _required_ | required string | The address on your server where you have enabled a listening service for Software Management Services callback messages. Specify a secure URL (HTTPS) that is reachable from the Verizon data centers. | ## Example Request Body ```json { "url": "https://10.120.102.183:50559/CallbackListener/FirmwareServiceMessages.asmx" } ``` ## Success Responses **Status 200** | Parameter Name | Data Type | Description | |:----------------|:-----------|:-------------| | **url** <br> _required_ | required string | The secure address on your server where you have enabled a listening service for Software Management Services callback messages. | ## Example Success Response ```json { "url": "https://10.120.102.183:50559/CallbackListener/FirmwareServiceMessages.asmx" } ``` ## Failure Responses **Status 400** All error messages are returned in this format: ```json { "errorCode": "error code string", "errorMessage": "error message string" } ```