Skip to main content
POST
/
v1
/
api
/
add_interval_schedule
curl -X POST "https://api.hookpulse.io/v1/api/add_interval_schedule/" \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "interval_value": 5,
    "is_one_off_task": false,
    "interval_period": "second",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "{{model_to_schedule_uuid}}",
    "initial_context_template": {
      "key": "value"
    }
  }'
{
  "success": true,
  "details": "Schedule added successfully"
}
Create a new interval-based schedule that executes a webhook or workflow at regular intervals (every N seconds, minutes, or hours).

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_interval_schedule/" \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "interval_value": 5,
    "is_one_off_task": false,
    "interval_period": "second",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "{{model_to_schedule_uuid}}",
    "initial_context_template": {
      "key": "value"
    }
  }'

Request body

FieldTypeRequiredDescription
interval_valueintegerYesNumber of time units between executions (must be > 0)
is_one_off_taskbooleanYesSet to true if the schedule should run only once, false for recurring execution
interval_periodstringYesUnit of time: "second", "minute", or "hour"
schedule_tostringYesTarget type: "webhook" or "workflow"
model_to_schedule_uuidstringYesUUID of the webhook or workflow template to schedule (as per schedule_to)
initial_context_templateobjectNoKey-value pairs passed as {{ initial.key }} variables to the webhook/workflow

Example response

{
  "success": true,
  "details": "Schedule added successfully"
}

Response fields

FieldTypeDescription
successbooleanIndicates if the schedule was created successfully
detailsstringSuccess message

Interval Period Options

  • "second": Execute every N seconds (e.g., every 5 seconds)
  • "minute": Execute every N minutes (e.g., every 15 minutes)
  • "hour": Execute every N hours (e.g., every 2 hours)

Initial Context Template

The initial_context_template object allows you to pass variables to your webhook or workflow that can be accessed using {{ initial.key }} syntax:
  • In request body: {{ initial.key }} will be replaced with the value
  • In headers: {{ initial.key }} can be used in header values
  • In query params: {{ initial.key }} can be used in query parameters
  • In path: {{ initial.key }} can be used in URL paths
You can also combine with:
  • System secrets: {{ #secret_key }} for vault secrets
  • Workflow step responses: {{ step.response.variable }} in workflows

Use Cases

  • Health Checks: Execute every 30 seconds to monitor system health
  • Data Sync: Sync data every 5 minutes
  • Cache Refresh: Refresh cache every hour
  • Periodic Reports: Generate reports every 6 hours
  • Status Updates: Update status every 2 minutes

Examples

Every 30 seconds (recurring)

{
  "interval_value": 30,
  "is_one_off_task": false,
  "interval_period": "second",
  "schedule_to": "webhook",
  "model_to_schedule_uuid": "{{model_to_schedule_uuid}}"
}

Every 15 minutes (recurring)

{
  "interval_value": 15,
  "is_one_off_task": false,
  "interval_period": "minute",
  "schedule_to": "webhook",
  "model_to_schedule_uuid": "{{model_to_schedule_uuid}}"
}

Every 2 hours with initial context (recurring)

{
  "interval_value": 2,
  "is_one_off_task": false,
  "interval_period": "hour",
  "schedule_to": "workflow",
  "model_to_schedule_uuid": "{{model_to_schedule_uuid}}",
  "initial_context_template": {
    "report_type": "hourly",
    "timezone": "UTC"
  }
}

One-time execution after 5 minutes

{
  "interval_value": 5,
  "is_one_off_task": true,
  "interval_period": "minute",
  "schedule_to": "webhook",
  "model_to_schedule_uuid": "{{model_to_schedule_uuid}}"
}

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

Interval schedule configuration

interval_value
integer
required

Number of time units between executions (must be > 0)

Required range: x >= 1
interval_period
enum<string>
required

Unit of time: 'second', 'minute', or 'hour'

Available options:
second,
minute,
hour
schedule_to
enum<string>
required

Target type: 'webhook' or 'workflow'

Available options:
webhook,
workflow
model_to_schedule_uuid
string
required

UUID of the webhook or workflow template to schedule

initial_context_template
object

Key-value pairs passed as {{ initial.key }} variables to the webhook/workflow

Response

Schedule created successfully

success
boolean

Indicates if the schedule was created successfully

details
string

Success message