Description
The Update Webhook Subscription API allows carriers to modify the HTTP POST address and Authorization fields of an existing webhook subscription without needing to unsubscribe and create a new one.
This enables carriers to easily maintain their active webhook subscriptions without the need for downtime, specifically when rotating authentication secrets.
| Service Name | Update Webhook Subscription |
| Service Type | REST |
| Method | PATCH |
| UAT (Sandbox) URL | https://integration.uat.marley.ai/webhooks/update/{subscription_id} |
| Production URL | https://integration.himarley.io/webhooks/update/{subscription_id} |
| Technical Documentation | View technical documentation with sample request and response payloads hosted on Postman. |
For more information on webhook subscriptions, see our Webhooks Overview documentation.
Table of Contents:
API Request
This PATCH request has the ability to update the following fields:
- The
HTTP_POST_ADDRESSof your webhook subscription. - All fields within the
HEADERS.Authorizationobject.
Request Example:
The following is an example request to rotate the client_id and client_secret of an active webhook subscription:
https://integration.uat.marley.ai/webhooks/update/154024a9-08ae-4d08-880f-dfd4c6a6df1b{
"HEADERS": {
"Authorization": {
"client_id": "newClientId",
"client_secret": "newclientSecret"
}
}
}Request Field Breakdown
Property |
Element |
Type |
Description |
Example |
|
HEADERS |
Authorization | client_id |
string |
Public identifier issued by your auth server |
"mobile": "+14012744005" |
client_secret |
string |
Private secret paired with client_id |
"languagePreference": "en" |
||
Response Example:
{
"EVENT_ID": 10,
"HTTP_POST_ADDRESS": "https://carrier_server.io/services/himarley",
"HEADERS": {
"Authorization": {
"type": "OaUth2",
"grant_type": "client_credentials",
"client_id": "newClientId",
"client_secret": "newclientSecret",
"scope": "example.scope",
"token_url": "https://authentication_server.io/services/oauth2/token/clientcredentialswithexpiry",
"audience": "https://audienceUrl"
}
}
}Response Field Breakdown
Property |
Element |
Type |
Description |
Required |
Example |
|
EVENT_ID |
|
enum |
ID of Hi Marley webhook subscription |
true |
"EVENT_ID": 10 |
|
HTTP_POST_ADDRESSS |
|
string |
Address where Hi Marley event will be posted to |
true |
"HTTP_POST_ADDRESS": "https://carrier_server.io/services/himarley" |
|
HEADERS |
Authorization | type |
enum |
Constant - always OaUth2 |
true |
"type": "OaUth2" |
grant_type |
enum |
OAuth 2.0 grant used to obtain the access token |
true |
"grant_type": "client_credentials" |
||
client_id |
string |
Public identifier issued by your auth server |
true |
"mobile": "+14012744005" |
||
client_secret |
string |
Private secret paired with client_id |
true |
"languagePreference": "en" |
||
scope |
string |
List of permissions requested for the token |
true |
"email": "test-email@himarley.com" |
||
token_url |
string |
Token endpoint to exchange credentials for an access token |
true |
"token_url": "https://testUrl.com" |
||
audience |
string |
Identifier of the intended recipient/resource server |
false |
"audience": "https://audienceUrl" |
||
Comments
0 comments
Please sign in to leave a comment.