Skip to main content
POST
/
v1
/
api
/
add_clocked_schedule
/
curl -X POST "https://api.hookpulse.io/v1/api/add_clocked_schedule/" \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "clocked_run_at": "{{clocked_run_at}}",
    "clocked_timezone": "Asia/Kolkata",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "{{model_to_schedule_uuid}}",
    "initial_context_template": {
      "key": "value"
    }
  }'
const response = await fetch('https://api.hookpulse.io/v1/api/add_clocked_schedule/', {
  method: 'POST',
  headers: {
    'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
    'x-brand-uuid': '{{x-brand-uuid}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    clocked_run_at: '{{clocked_run_at}}',
    clocked_timezone: 'Asia/Kolkata',
    schedule_to: 'webhook',
    model_to_schedule_uuid: '{{model_to_schedule_uuid}}',
    initial_context_template: {
      key: 'value'
    }
  })
});

const data = await response.json();
console.log(data);
import requests

url = 'https://api.hookpulse.io/v1/api/add_clocked_schedule/'
headers = {
    'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
    'x-brand-uuid': '{{x-brand-uuid}}',
    'Content-Type': 'application/json'
}
payload = {
    'clocked_run_at': '{{clocked_run_at}}',
    'clocked_timezone': 'Asia/Kolkata',
    'schedule_to': 'webhook',
    'model_to_schedule_uuid': '{{model_to_schedule_uuid}}',
    'initial_context_template': {
        'key': 'value'
    }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
require 'net/http'
require 'json'
require 'uri'

uri = URI('https://api.hookpulse.io/v1/api/add_clocked_schedule/')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['x-hookpulse-api-key'] = '{{x-hookpulse-api-key}}'
request['x-brand-uuid'] = '{{x-brand-uuid}}'
request['Content-Type'] = 'application/json'
request.body = {
  clocked_run_at: '{{clocked_run_at}}',
  clocked_timezone: 'Asia/Kolkata',
  schedule_to: 'webhook',
  model_to_schedule_uuid: '{{model_to_schedule_uuid}}',
  initial_context_template: {
    key: 'value'
  }
}.to_json

response = http.request(request)
puts JSON.parse(response.body)
<?php

$url = "https://api.hookpulse.io/v1/api/add_clocked_schedule/";
$data = [
    'clocked_run_at' => '{{clocked_run_at}}',
    'clocked_timezone' => 'Asia/Kolkata',
    'schedule_to' => 'webhook',
    'model_to_schedule_uuid' => '{{model_to_schedule_uuid}}',
    'initial_context_template' => [
        'key' => 'value'
    ]
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-hookpulse-api-key: {{x-hookpulse-api-key}}',
    'x-brand-uuid: {{x-brand-uuid}}',
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
{
  "success": true,
  "details": "Schedule added successfully"
}
Create a one-time scheduled task that executes a webhook or workflow at a specific date and time. Clocked schedules are automatically one-off tasks (they execute once and then complete).

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_clocked_schedule/" \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "clocked_run_at": "{{clocked_run_at}}",
    "clocked_timezone": "Asia/Kolkata",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "{{model_to_schedule_uuid}}",
    "initial_context_template": {
      "key": "value"
    }
  }'
const response = await fetch('https://api.hookpulse.io/v1/api/add_clocked_schedule/', {
  method: 'POST',
  headers: {
    'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
    'x-brand-uuid': '{{x-brand-uuid}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    clocked_run_at: '{{clocked_run_at}}',
    clocked_timezone: 'Asia/Kolkata',
    schedule_to: 'webhook',
    model_to_schedule_uuid: '{{model_to_schedule_uuid}}',
    initial_context_template: {
      key: 'value'
    }
  })
});

const data = await response.json();
console.log(data);
import requests

url = 'https://api.hookpulse.io/v1/api/add_clocked_schedule/'
headers = {
    'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
    'x-brand-uuid': '{{x-brand-uuid}}',
    'Content-Type': 'application/json'
}
payload = {
    'clocked_run_at': '{{clocked_run_at}}',
    'clocked_timezone': 'Asia/Kolkata',
    'schedule_to': 'webhook',
    'model_to_schedule_uuid': '{{model_to_schedule_uuid}}',
    'initial_context_template': {
        'key': 'value'
    }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
require 'net/http'
require 'json'
require 'uri'

uri = URI('https://api.hookpulse.io/v1/api/add_clocked_schedule/')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['x-hookpulse-api-key'] = '{{x-hookpulse-api-key}}'
request['x-brand-uuid'] = '{{x-brand-uuid}}'
request['Content-Type'] = 'application/json'
request.body = {
  clocked_run_at: '{{clocked_run_at}}',
  clocked_timezone: 'Asia/Kolkata',
  schedule_to: 'webhook',
  model_to_schedule_uuid: '{{model_to_schedule_uuid}}',
  initial_context_template: {
    key: 'value'
  }
}.to_json

response = http.request(request)
puts JSON.parse(response.body)
<?php

$url = "https://api.hookpulse.io/v1/api/add_clocked_schedule/";
$data = [
    'clocked_run_at' => '{{clocked_run_at}}',
    'clocked_timezone' => 'Asia/Kolkata',
    'schedule_to' => 'webhook',
    'model_to_schedule_uuid' => '{{model_to_schedule_uuid}}',
    'initial_context_template' => [
        'key' => 'value'
    ]
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-hookpulse-api-key: {{x-hookpulse-api-key}}',
    'x-brand-uuid: {{x-brand-uuid}}',
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>

Request body

FieldTypeRequiredDescription
clocked_run_atstringYesISO 8601 datetime string for when to execute (e.g., "2024-12-25T00:00:00Z")
clocked_timezonestringYesIANA timezone identifier (use Get Timezone Options to get valid values)
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

DateTime Format

The clocked_run_at field accepts ISO 8601 datetime strings:
  • Format: YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss+HH:mm
  • Examples:
    • "2024-12-25T00:00:00Z" - UTC timezone
    • "2024-12-25T00:00:00+05:30" - With timezone offset
    • "2024-12-25T09:30:00Z" - Specific time
The timezone specified in clocked_timezone is used to interpret the datetime if no timezone is specified in the string.

Timezone Support

HookPulse supports all 500+ IANA timezones. Use the Get Timezone Options endpoint to get the complete list.

One-Off Tasks

Clocked schedules are automatically one-off tasks that execute once at the specified time. After execution, the schedule status becomes "completed". The is_one_off_task field is not required for clocked schedules as they are always one-time executions.

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

  • Scheduled Maintenance: Run maintenance tasks at specific times
  • Future Operations: Schedule operations for future dates
  • One-Time Events: Execute tasks for specific events
  • Time-Sensitive Operations: Operations that must run at exact times
  • Event-Based Triggers: Trigger workflows at specific event times

Examples

Christmas Day Task

{
  "clocked_run_at": "{{clocked_run_at}}",
  "clocked_timezone": "UTC",
  "schedule_to": "webhook",
  "model_to_schedule_uuid": "{{model_to_schedule_uuid}}"
}

New Year’s Eve at Midnight

{
  "clocked_run_at": "{{clocked_run_at}}",
  "clocked_timezone": "America/New_York",
  "schedule_to": "workflow",
  "model_to_schedule_uuid": "{{model_to_schedule_uuid}}",
  "initial_context_template": {
    "event": "new_year",
    "year": "2025"
  }
}

Specific Business Time

{
  "clocked_run_at": "{{clocked_run_at}}",
  "clocked_timezone": "Asia/Kolkata",
  "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

Clocked schedule configuration

clocked_run_at
string<date-time>
required

ISO 8601 datetime string for when to execute

clocked_timezone
string
required

IANA timezone identifier

is_one_off_task
boolean
required

Whether this is a one-time task

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