Skip to main content
POST
/
v1
/
api
/
add_webhook_template
curl -X POST https://api.hookpulse.io/v1/api/add_webhook_template/ \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_name": "{{webhook_name}}",
    "webhook_description": "{{webhook_description}}",
    "method": "{{method}}",
    "path": "{{path}}",
    "domain_uuid": "{{domain_uuid}}",
    "retry_delay": {{retry_delay}},
    "retry_backoff_mode": "{{retry_backoff_mode}}",
    "max_retries": {{max_retries}},
    "request_timeout_in_milliseconds": {{request_timeout_in_milliseconds}},
    "request_body_json": {},
    "headers_json": {},
    "query_params_json": {}
  }'
{
  "success": true,
  "webhook_template_id": "{{webhook_template_id}}",
  "message": "Webhook template created successfully"
}
Create a new webhook template with configurable retry logic, timeout settings, and template variable support.

Base URL

All API requests should be made to:
https://api.hookpulse.io

Example request

curl -X POST https://api.hookpulse.io/v1/api/add_webhook_template/ \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_name": "{{webhook_name}}",
    "webhook_description": "{{webhook_description}}",
    "method": "{{method}}",
    "path": "{{path}}",
    "domain_uuid": "{{domain_uuid}}",
    "retry_delay": {{retry_delay}},
    "retry_backoff_mode": "{{retry_backoff_mode}}",
    "max_retries": {{max_retries}},
    "request_timeout_in_milliseconds": {{request_timeout_in_milliseconds}},
    "request_body_json": {},
    "headers_json": {},
    "query_params_json": {}
  }'

Request body

FieldTypeRequiredDescription
webhook_namestringYesName of the webhook template
webhook_descriptionstringYesDescription of the webhook template
methodstringYesHTTP method. Allowed values: "GET", "POST", "PUT", "DELETE", "PATCH"
pathstringYesURL path for the webhook (e.g., “/hr/”)
domain_uuidstringYesUUID of the domain associated with this webhook template
retry_delayintegerYesDelay in seconds between retry attempts
retry_backoff_modestringYesRetry backoff strategy: “linear” or “exponential”
max_retriesintegerYesMaximum number of retry attempts
request_timeout_in_millisecondsintegerYesRequest timeout in milliseconds
request_body_jsonobjectYesRequest body as JSON object (supports template variables)
headers_jsonobjectYesHTTP headers as JSON object (supports template variables)
query_params_jsonobjectYesQuery parameters as JSON object (supports template variables)

Template Variables

Webhook templates support dynamic variable substitution using the following syntax:

Secret Vault Keys

Access keys from the secret vault:
{{ #key }}
Example:
{
  "Authorization": "Bearer {{ #api_key }}"
}

Workflow Step Variables

Access variables from previous workflow steps:
{{ step.response.variable }}
Example:
{
  "user_id": "{{ step.response.user_id }}",
  "email": "{{ step.response.email }}"
}

Initial Variables

Access variables from the initial workflow input:
{{ initial.variable }}
Example:
{
  "order_id": "{{ initial.order_id }}",
  "customer_name": "{{ initial.customer_name }}"
}

Usage in Different Fields

Template variables can be used in:
  • Request Body (request_body_json): Any field value can contain template variables
  • Headers (headers_json): Header values can contain template variables
  • Query Parameters (query_params_json): Query parameter values can contain template variables
  • Path (path): The path itself can contain template variables

Example with Template Variables

{
  "webhook_name": "Send User Notification",
  "webhook_description": "Sends notification to user after order creation",
  "method": "POST",
  "path": "/notifications/{{ initial.user_id }}",
  "domain_uuid": "aa3a5347-d334-4280-9361-f273d298468c",
  "retry_delay": 4,
  "retry_backoff_mode": "linear",
  "max_retries": 4,
  "request_timeout_in_milliseconds": 3000,
  "request_body_json": {
    "user_id": "{{ initial.user_id }}",
    "order_id": "{{ step.response.order_id }}",
    "message": "Your order has been created"
  },
  "headers_json": {
    "Authorization": "Bearer {{ #api_key }}",
    "X-User-ID": "{{ initial.user_id }}"
  },
  "query_params_json": {
    "timestamp": "{{ step.response.created_at }}"
  }
}

Example response

{
  "success": true,
  "webhook_template_id": "{{webhook_template_id}}",
  "message": "Webhook template created successfully"
}

Response fields

FieldTypeDescription
successbooleanIndicates if the request was successful
webhook_template_idstringUnique identifier for the created webhook template
messagestringSuccess message or error details

Authorizations

x-hookpulse-api-key
string
header
required

API key for authentication. Get this from your dashboard by selecting a brand and going to API Keys section.

x-brand-uuid
string
header
required

Brand UUID for authentication. Get this from your dashboard after adding a brand - it will be displayed in the UI.

Body

application/json

Webhook template configuration

webhook_name
string
required

Name of the webhook template

webhook_description
string
required

Description of the webhook template

method
enum<string>
required

HTTP method (e.g., 'GET', 'POST', 'PUT', 'DELETE')

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
path
string
required

URL path for the webhook (supports template variables)

domain_uuid
string
required

UUID of the domain associated with this webhook template

retry_delay
integer
required

Delay in seconds between retry attempts

retry_backoff_mode
enum<string>
required

Retry backoff strategy

Available options:
linear,
exponential
max_retries
integer
required

Maximum number of retry attempts

request_timeout_in_milliseconds
integer
required

Request timeout in milliseconds

request_body_json
object
required

Request body as JSON object (supports template variables)

headers_json
object
required

HTTP headers as JSON object (supports template variables)

query_params_json
object
required

Query parameters as JSON object (supports template variables)

Response

Webhook template created successfully

success
boolean

Indicates if the request was successful

webhook_template_id
string

Unique identifier for the created webhook template

message
string

Success message or error details