Get Registered API Webhook
This endpoint retrieves details of your registered API webhooks.
Endpoint
GET /api.ezyhire.com/test/getRegisteredAPIWebhook/{eventType}Headers
| Header | Type | Required | Description |
|---|---|---|---|
USER-Key | string | Yes | Your API authentication key |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
eventType | enum | Yes | Type of event to filter webhooks by - TEST_COMPLETED, ID_VERIFICATION_COMPLETED, BGV_COMPLETED, BGV_NEEDINFO |
Responses
Success Response
Status Code: 200 OK
{
"statusCode": 200,
"error": null,
"message": "Registered API Webhook has been fetched successfully.",
"data": [
{
"id": "webhook-123456",
"employerId": "emp-789012",
"eventType": "ID_VERIFICATION_COMPLETED",
"webhookUrl": "https://your-domain.com/webhook-endpoint",
"createdOn": [2024, 1, 15, 10, 30, 0, 0],
"updatedOn": [2024, 1, 15, 10, 30, 0, 0]
},
{
"id": "webhook-789012",
"employerId": "emp-789012",
"eventType": "TEST_COMPLETED",
"webhookUrl": "https://your-domain.com/test-webhook",
"createdOn": [2024, 1, 16, 14, 45, 0, 0],
"updatedOn": [2024, 1, 16, 14, 45, 0, 0]
}
]
}Error Responses
Unauthorized
Status Code: 401 Unauthorized
{
"statusCode": 401,
"error": null,
"message": "Invalid User/API key",
"data": "Please provide a valid User/API key"
}Internal Server Error
Status Code: 500 Internal Server Error
{
"statusCode": 500,
"error": "string",
"message": "string",
"data": "string"
}Enum Values
| Field Name | Possible Values |
|---|---|
eventType | TEST_COMPLETED, ID_VERIFICATION_COMPLETED, BGV_COMPLETED, BGV_NEEDINFO, ALL |
Example Usage
const eventType = "TEST_COMPLETED";
const response = await fetch(`https://api.ezyhire.com/test/getRegisteredAPIWebhook/${eventType}`, {
method: 'GET',
headers: {
'USER-Key': 'your-api-key-here'
}
});
const data = await response.json();