< All Topics

REST Hooks

List Hooks

GET /integrations/rest-hooks

Lists events and URLs 

Response

Array of subscriptions

id – unique ID of subscription

userId – ID of currently subscribed user

event – the event name

targetUrl – event URL

Sample Response

JSON
				[
  {
    "id": "string",
    "userId": "string",
    "event": "string",
    "targetUrl": "string"
  }
]
			

Create Hook

POST /integrations/rest-hooks

Subscribes current user to the event handler

Request

  • event – the event name
  • targetUrl – event URL

Sample Request

JSON
				{
  "event": "string",
  "targetUrl": "string"
}

			

Response

  • id – unique ID of the subscription
  • userId – ID of currently subscribed user
  • event – the event name
  • targetUrl – event URL

Sample Response

JSON
				{
  "id": "string",
  "userId": "string",
  "event": "string",
  "targetUrl": "string"
}
			

Update Hook

POST /integrations/rest-hooks/{id}

Update a previously subscribed hook

Request

  • id – ID of the subscription to be updated. Can be provided as a query string parameter.
  • event – the event name
  • targetUrl – event URL

Sample Request

JSON
				{
  "id": "string",
  "event": "string",
  "targetUrl": "string"
}
			

Response

  • id – unique ID of subscription
  • userId – ID of currently subscribed user
  • event – the event name
  • targetUrl – event URL

Sample Response

JSON
				{
  "id": "string",
  "firstName": "string",
  "lastName": "string",
  "emailAddresses": [
    "string"
  ],
  "phoneNumbers": [
    "string"
  ],
  "whatsAppNumbers": [
    "string"
  ],
  "properties": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "errors": [
    {
      "type": "string",
      "value": "string"
    }
  ]
}
			

Get Hook

GET /integrations/rest-hooks/{id}

Retrieves a specific hook by ID.

Request

N/A

Response

  • id – unique ID of subscription
  • userId – ID of currently subscribed user
  • event – the event name
  • targetUrl – event URL

Sample Response

JSON
				{
  "id": "string",
  "userId": "string",
  "event": "string",
  "targetUrl": "string"
}
			

Delete Hook

DELETE /integrations/rest-hooks/{id}

Deletes a specific hook by ID.

Request

  • id – unique ID of subscription to be deleted

Response

  • N/A
Tags:
Table of Contents