Retrieve a Webhook
Lets you retrieve one or more webhooks based on the following parameters –
- “WebhookEvent”
- “StatusCode”
- “WebhookId”
- “SearchText”
Note: You can pass any one of these parameters. To minimize errors, we recommend you pass “WebhookEvent”.
API URL
Request
Content-Type: application/json{ "Parameter": { "Type": "Webhook", "WebhookEvent": "Lead_Post_Create", "StatusCode": 0, "WebhookId": "", "SearchText": " " }, "Sorting": { "ColumnName": "ModifiedOn", "Direction": "1" }, "Paging": { "PageIndex": 1, "PageSize": 25 } }
Request Parameters
Parameter | Description |
---|---|
Type | Pass –
|
WebhookEvent | You can pass the following webhook events –
|
StatusCode | Lets you retrieve webhooks by status –
|
WebhookId | The unique identifier of the webhook. For example, 7463290b-9dee-11e7-b0ab-02e89b2fb8f4 |
SearchText | Retrieves webhooks based on any sting you pass. The string can be the webhook name or description. For example, “Lead Create” or “Posts data on lead create”. |
ColumnName | The column on which results will be sorted. For example, if you want results to be shown based on creation date, pass “CreatedOn”. |
Direction | Direction “1” means descending order and “0” means ascending order. |
PageIndex | The results matching your criteria may be large. You can fetch the result in blocks of “PageSize” and make multiple calls to the API with increasing values of “PageIndex”. For example, you can specify “PageIndex”: 1, “PageSize”: 100 for the first call and specify “PageIndex”: 2, “PageSize”: 100 for second call. |
PageSize | For example, you can specify “PageIndex”: 1, “PageSize”: 100 for the first call and specify “PageIndex”: 2, “PageSize”: 100 for second call. |
Response
{ "RecordCount": 3, "Response": [ { "WebhookId": "1417021a-6fb9-11e8-8455-020714094d7e", "EventName": "Lead Creation", "EventCode": "Lead_Post_Create", "Description": "", "URL": "http://requestbin.fullcontact.com/tz136rtz", "Method": "POST", "ContentType": "application/json", "LandingPageIds": null, "LandingPageUrls": null, "IsSpecificLandingPage": false, "NotifyOnFailure": true, "StatusCode": 0, "StatusReason": 0, "CreatedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "CreatedOn": "2018-06-14 09:55:33", "ModifiedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "ModifiedOn": "2018-06-14 09:55:33", "CreatedByName": "Vir Singh", "CreatedByEmail": "virkdsingh@gmail.com", "ModifiedByName": "Vir Singh", "WebhookProperties": null, "IsInternal": 0, "ExecutionDelay": 0, "CustomHeaders": "", "IsLappEnabled": false, "LappConfiguration": null }, { "WebhookId": "ec94e3f4-6003-11e8-8455-020714094d7e", "EventName": "Lead Creation", "EventCode": "Lead_Post_Create", "Description": "Example", "URL": "http://www.example.com", "Method": "POST", "ContentType": "application/json", "LandingPageIds": null, "LandingPageUrls": null, "IsSpecificLandingPage": false, "NotifyOnFailure": true, "StatusCode": 0, "StatusReason": 0, "CreatedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "CreatedOn": "2018-05-25 10:11:00", "ModifiedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "ModifiedOn": "2018-05-25 10:11:00", "CreatedByName": "Vir Singh", "CreatedByEmail": "virkdsingh@gmail.com", "ModifiedByName": "Vir Singh", "WebhookProperties": null, "IsInternal": 0, "ExecutionDelay": 0, "CustomHeaders": "", "IsLappEnabled": false, "LappConfiguration": null }, { "WebhookId": "7463290b-9dee-11e7-b0ab-02e89b2fb8f4", "EventName": "Lead Creation", "EventCode": "Lead_Post_Create", "Description": "", "URL": "https://zip-dist-app.leadsquared.com/webhooks/api/distribution?key=72b6fd66-507f-47cf-90e7-0043160aa213&orgId=22824", "Method": "POST", "ContentType": "application/json", "LandingPageIds": null, "LandingPageUrls": null, "IsSpecificLandingPage": false, "NotifyOnFailure": true, "StatusCode": 0, "StatusReason": 0, "CreatedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "CreatedOn": "2017-09-20 10:28:33", "ModifiedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "ModifiedOn": "2017-09-20 10:28:33", "CreatedByName": "Vir Singh", "CreatedByEmail": "virkdsingh@gmail.com", "ModifiedByName": "Vir Singh", "WebhookProperties": null, "IsInternal": 0, "ExecutionDelay": 0, "CustomHeaders": "", "IsLappEnabled": false, "LappConfiguration": null } ] }
HTTP Response Codes
Code | Description |
---|---|
200 OK | This is the status code for successful API call. |
401 Unauthorized | The API call was made with invalid access credentials. Check your AccessKey and SecretKey. |
400 Bad Request | The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure. |
404 Not Found | The API could not be found. Please check the API signature. |
429 Too Many Requests | API calls exceeded the limit of 25 in 5 second(s) |
500 Internal Server Error | The API called failed. There could be many reasons for it. Check the exception message to get more details. |