Skip to main content
POST
/
v1
/
create-webhook
curl --location --request POST 'https://api.hirempire.com/v1/create-webhook' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "request_url": "https://example.com/webhook",
    "events": [
        "job_added",
        "applicant_applied",
        "meeting_booked"
    ]
}'
{
  "success": true,
  "data": {
    "id": "8fc4ea3c-ecc4-4a92-96fd-a14436a79a1b",
    "events": [
      "job_added",
      "applicant_applied",
      "meeting_booked"
    ]
  }
}

Authentication

Authorization
string
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Request Body

request_url
string
required
The URL where webhook events will be sent via POST requests. Must be a valid, publicly accessible URL.
events
string[]
required
Array of event types to subscribe to. Available events: job_added job_activated job_deactivated job_deleted applicant_applied cv_upload_completed meeting_booked
curl --location --request POST 'https://api.hirempire.com/v1/create-webhook' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "request_url": "https://example.com/webhook",
    "events": [
        "job_added",
        "applicant_applied",
        "meeting_booked"
    ]
}'

Response

success
boolean
Indicates if the webhook was created successfully
data
object
Webhook details
{
  "success": true,
  "data": {
    "id": "8fc4ea3c-ecc4-4a92-96fd-a14436a79a1b",
    "events": [
      "job_added",
      "applicant_applied",
      "meeting_booked"
    ]
  }
}

Error Responses

Validation Errors

400 - Bad Request
{
  "success": false,
  "error": "Field 'request_url' is required and must be a string."
}
400 - Bad Request
{
  "success": false,
  "error": "Field 'events' is required and must be an array."
}
400 - Bad Request
{
  "success": false,
  "error": "Invalid event: invalid_event_name."
}
400 - Bad Request
{
  "success": false,
  "error": "Invalid token"
}
400 - Bad Request
{
  "success": false,
  "error": "Input is incorrect."
}

Authorization Errors

401 - Unauthorized
{
  "success": false,
  "error": "Token is expired"
}
401 - Unauthorized
{
  "success": false,
  "error": "Token is missing required scope"
}
401 - Unauthorized
{
  "success": false,
  "error": "You already have an active webhook."
}
401 - Unauthorized
{
  "success": false,
  "error": "Invalid request url"
}

Forbidden

403 - Forbidden
{
  "success": false,
  "error": "Token has been deleted"
}