Menu

Create/Edit/Delete Enquiry Label Event Subscription

PATCH https://examplebaseURL.com/v1/api/apps/{appID}/inquiry-label-event-sub

Response Format

Parameter Type Description
code Number Refer to Success and Error Code
enabled Boolean true if subscription is active, false if disabled
url String The webhook URL
updatedAt String The label updated day and time

🚧 Webhook URL Requirement:

The webhook URL needs to be verified. You will get a POST request with an Action, and are required to set the response in JSON format as below:

Note that the JsonResponse.Result is JSON encoding of the ActionEndpointResponse

ActionEndpointRequest {
+ Challenge string json:"challenge"
+ }

ActionEndpointResponse {
+ Challenge string json:"challenge"
+ }

JsonResponse {
+ Code int json:"code"
+ Result json.RawMessage json:"result"
+ }

Path Params

appID string required
App ID

Body Params

enabled boolean (required)
Set to true to create or update the subscription.
Set to false to disable or delete the subscription.

url string (required)
The webhook callback URL. CINNOX sends a verification request to this URL when registering.

Headers

Content-Type string
application/json

Authorization string
Bearer AppToken

Responses

200 - Success
Response body: application/json

400 - Bad Request
Response body
object
code integer Defaults to 0
message string

Language

LANGUAGE: Shell

Shell: cURL Request Copy
curl --request PATCH \
     --url https://examplebaseurl.com/v1/api/apps/appID/inquiry-label-event-sub \
     --header 'Authorization: Bearer AppToken' \
     --header 'Content-Type: application/json' \
     --header 'accept: application/json' \
     --data '{
       "enabled": true,
       "url": "https://your-webhook.example.com/"
     }'

LANGUAGE: Node.js (Axios or fetch)

Request Copy
// --- Axios Example ---
import axios from 'axios';

axios.patch('https://examplebaseurl.com/v1/api/apps/appID/inquiry-label-event-sub', {
  enabled: true,
  url: "https://your-webhook.example.com/"
}, {
  headers: {
    'accept': 'application/json',
    'Content-Type': 'application/json',
    'Authorization': 'Bearer AppToken'
  }
})
.then(res => console.log(res.data))
.catch(err => console.error(err));


// --- fetch Example ---
const url = 'https://examplebaseurl.com/v1/api/apps/appID/inquiry-label-event-sub';

fetch(url, {
  method: 'PATCH',
  headers: {
    accept: 'application/json',
    'Content-Type': 'application/json',
    Authorization: 'Bearer AppToken'
  },
  body: JSON.stringify({ enabled: true, url: "https://your-webhook.example.com/" })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));

LANGUAGE: JavaScript fetch (Browser)

Request Copy
fetch('https://examplebaseurl.com/v1/api/apps/appID/inquiry-label-event-sub', {
  method: 'PATCH',
  headers: {
    accept: 'application/json',
    'Content-Type': 'application/json',
    Authorization: 'Bearer AppToken'
  },
  body: JSON.stringify({ enabled: true, url: "https://your-webhook.example.com/" })
})
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));

Tips

  • Other languages like PHP, Go, or C++ are supported similarly; adjust headers and request body accordingly.
  • The request body is required. If omitted, the subscription configuration will fail.
  • Set enabled: true to create or update the subscription.
  • Set enabled: false to disable the subscription.
  • Webhook requests are sent via HTTP POST with Content-Type: application/json. Your endpoint must return a 2xx response to acknowledge successful delivery.

Response Example

SUCCESS RESPONSE: 200-Result

200-Result Copy
{
  "code": 0,
  "result": {
    "enabled": true,
    "url": "<YOUR_WEBHOOK_URL>",
    "updatedAt": "2026-02-24T03:12:45.123Z"
  }
}

ERROR RESPONSE: 400-Result

400-Result Copy
{
  "code": 400,
  "message": "The error message from the server. Please refer to the error table." 
}
Previous
Create/Edit/Delete Label Event Subscription
Next
Get External Contact Note List
Last modified: 2026-03-04