patch https://examplebaseURL.com/v1/api/apps//staff-contact-event-sub
Response Format
Parameter | Type | Description |
---|---|---|
enabled | Boolean | The value must be true or false. It is "true" when the subscription is successful, while it is "false" when it fails. |
url | String | The webhook URL. In access to this URL, you can receive a Staff Contact Event Notification in CINNOX. |
Notification of Staff Contact Event
After subscribing to this event, you can receive a notification once the staff contact is created, edited, or deleted.
Notification Details | Type | Description |
---|---|---|
type | String | The value must be "message". |
challenge | String | (Internal Use) |
message.type | String | The value must be "contact". |
message.status | String | The value can be - "staffCreate" when the staff contact was created. - "staffEdit" when the staff contact was edited. - "staffDelete" when the staff contact was deleted. |
message.serviceId | String | The Service ID. |
message.fullName | String | The full name of the staff member. |
message.id | String | The ID of the staff member. |
Webhook URL Requirement
The webhook URL needs to be verified. After that, you will get a POST request with an Action and are required to set the response in JSON Response format as shown below:
Note that the JsonResponse result is JSON encoding of the Action Endpoint Response.
Action Endpoint Request {
+ Challenge string json:"challenge"
+ }
Action Endpoint Response {
+ Challenge string json:"challenge"
+ }
Json Response {
+ Code int json:"code"
+ Result json.RawMessage json:"result"
+ }