Back to Blog
TutorialsFeatured

Schedule One-Off API Call with Curl | HookPulse

Quick tutorial: Schedule a one-off API call in 30 seconds using curl. Perfect for developers who need a quick fix without complex setup. Also available: Official SDKs for Python (pip install hookpulse), Node.js/TypeScript (npm install hookpulse), and Go (go get hookpulse-go).

By HookPulse Team1/26/20263 min read
TutorialCurlQuick StartAPIWebhookGetting Started

How to Schedule a One-Off API Call with Curl: 30-Second Tutorial

Need to schedule a one-off API call? Don't want to set up Celery, Redis, or workers? HookPulse makes it simple. Here's how to schedule your first API call in 30 seconds.

Prefer SDKs? HookPulse provides official SDKs for faster integration:

  • Python: pip install hookpulse - PyPI Package: https://pypi.org/project/hookpulse/
  • Node.js/TypeScript: npm install hookpulse - npm Package: https://www.npmjs.com/package/hookpulse
  • Go: go get github.com/HookPulse/hookpulse-packages/hookpulse-go - Go Package: https://pkg.go.dev/github.com/HookPulse/hookpulse-packages/hookpulse-go

The 30-Second First API Call

Step 1: Get Your API Key (10 seconds)

Sign up at hookpulse.io and get your API key from the dashboard.

Step 2: Add Domain (10 seconds)

bash
curl -X POST https://api.hookpulse.io/v1/api/add_domain/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol_type": "https",
    "domain": "api.example.com",
    "rate_limit_enabled": true,
    "concurrency_control_enabled": true,
    "max_concurrent_jobs": 5,
    "max_requests_per_second": 10
  }'

Response:

json
{
  "success": true,
  "details": "Domain added successfully"
}

Step 3: Create a Webhook Template (10 seconds)

bash
curl -X POST https://api.hookpulse.io/v1/api/add_webhook_template/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_name": "My API Call",
    "webhook_description": "Scheduled API call example",
    "method": "POST",
    "path": "/endpoint",
    "domain_uuid": "domain-uuid-from-step-2",
    "retry_delay": 4,
    "retry_backoff_mode": "linear",
    "max_retries": 4,
    "request_timeout_in_milliseconds": 3000,
    "request_body_json": {
      "event": "scheduled_task",
      "data": "your-data"
    },
    "headers_json": {
      "Content-Type": "application/json"
    },
    "query_params_json": {}
  }'

Response:

json
{
  "success": true,
  "webhook_template_id": "abc-123-def-456",
  "message": "Webhook template created successfully"
}

Step 4: Schedule the Webhook (10 seconds)

bash
curl -X POST https://api.hookpulse.io/v1/api/add_clocked_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "clocked_run_at": "2026-01-23T14:30:00Z",
    "clocked_timezone": "America/New_York",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "abc-123-def-456",
    "initial_context_template": {}
  }'

That's it! Your API call is scheduled. It will execute at the specified time.

Complete Example: Payment Reminder

Let's schedule a payment reminder webhook:

bash
# 1. Add domain
DOMAIN_UUID=$(curl -X POST https://api.hookpulse.io/v1/api/add_domain/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol_type": "https",
    "domain": "api.yourservice.com",
    "rate_limit_enabled": true,
    "concurrency_control_enabled": true,
    "max_concurrent_jobs": 5,
    "max_requests_per_second": 10
  }' | jq -r '.data.domain_uuid')

# 2. Create webhook template
WEBHOOK_UUID=$(curl -X POST https://api.hookpulse.io/v1/api/add_webhook_template/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d "{
    "webhook_name": "Payment Reminder",
    "webhook_description": "Payment reminder webhook",
    "method": "POST",
    "path": "/payment-reminder",
    "domain_uuid": "$DOMAIN_UUID",
    "retry_delay": 4,
    "retry_backoff_mode": "linear",
    "max_retries": 4,
    "request_timeout_in_milliseconds": 3000,
    "request_body_json": {
      "subscription_id": "sub_123",
      "days_until_renewal": 3
    },
    "headers_json": {
      "Authorization": "Bearer YOUR_SERVICE_TOKEN"
    },
    "query_params_json": {}
  }" | jq -r '.webhook_template_id')

# 3. Schedule for 3 days from now
SCHEDULED_TIME=$(date -u -v+3d +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -d "+3 days" +"%Y-%m-%dT%H:%M:%SZ")

curl -X POST https://api.hookpulse.io/v1/api/add_clocked_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d "{
    "clocked_run_at": "$SCHEDULED_TIME",
    "clocked_timezone": "America/New_York",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "$WEBHOOK_UUID",
    "initial_context_template": {}
  }"

Scheduling Options

One-Time (Clocked)

bash
# Schedule for specific date/time
curl -X POST https://api.hookpulse.io/v1/api/add_clocked_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "clocked_run_at": "2026-01-23T14:30:00Z",
    "clocked_timezone": "America/New_York",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "your-webhook-template-uuid",
    "initial_context_template": {}
  }'

Recurring (Cron)

bash
# Schedule for every day at 9 AM
curl -X POST https://api.hookpulse.io/v1/api/add_cron_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "cron_expression": "0 9 * * *",
    "cron_timezone": "America/New_York",
    "is_one_off_task": false,
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "your-webhook-template-uuid",
    "initial_context_template": {}
  }'

Interval (Every X seconds/minutes/hours)

bash
# Schedule for every 30 seconds
curl -X POST https://api.hookpulse.io/v1/api/add_interval_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "interval_value": 30,
    "interval_period": "second",
    "is_one_off_task": false,
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "your-webhook-template-uuid",
    "initial_context_template": {}
  }'

Common Use Cases

1. Send Email Reminder

bash
# Schedule email reminder for tomorrow
curl -X POST https://api.hookpulse.io/v1/api/add_clocked_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "clocked_run_at": "2026-01-24T09:00:00Z",
    "clocked_timezone": "America/New_York",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "email-reminder-webhook-template-uuid",
    "initial_context_template": {}
  }'

2. Process Payment

bash
# Schedule payment processing for next week
curl -X POST https://api.hookpulse.io/v1/api/add_clocked_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "clocked_run_at": "2026-01-30T00:00:00Z",
    "clocked_timezone": "America/New_York",
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "payment-processor-webhook-template-uuid",
    "initial_context_template": {}
  }'

3. Generate Report

bash
# Schedule daily report generation
curl -X POST https://api.hookpulse.io/v1/api/add_cron_schedule/ \
  -H "x-hookpulse-api-key: YOUR_API_KEY" \
  -H "x-brand-uuid: YOUR_BRAND_UUID" \
  -H "Content-Type: application/json" \
  -d '{
    "cron_expression": "0 2 * * *",
    "cron_timezone": "America/New_York",
    "is_one_off_task": false,
    "schedule_to": "webhook",
    "model_to_schedule_uuid": "report-generator-webhook-template-uuid",
    "initial_context_template": {}
  }'

Why This is Better Than Alternatives

vs. Celery/Redis

Celery/Redis:

  • Requires Redis setup
  • Requires worker processes
  • Complex configuration
  • Hours of setup

HookPulse:

  • Zero infrastructure
  • One API call
  • 30 seconds total

vs. Cron Jobs

Cron Jobs:

  • Server-specific
  • No retry logic
  • No monitoring
  • Manual management

HookPulse:

  • Cloud-based
  • Automatic retries
  • Built-in monitoring
  • API management

vs. Manual Scheduling

Manual:

  • Remember to execute
  • Easy to forget
  • No reliability

HookPulse:

  • Automatic execution
  • Never forgets
  • 99.9%+ reliability

Tips for Success

1. Use ISO 8601 Format: Always use ISO 8601 for dates (e.g., "2026-01-23T14:30:00Z")

2. Specify Timezone: Always specify timezone to avoid confusion

3. Test First: Test your webhook endpoint before scheduling

4. Monitor Execution: Check execution logs in HookPulse dashboard

5. Handle Errors: Implement retry logic in your webhook endpoint

Next Steps

Now that you've scheduled your first API call:

1. Check Execution Logs: Monitor your webhook execution in the dashboard

2. Set Up Retries: Configure retry logic for failed webhooks

3. Add More Schedules: Schedule recurring webhooks with cron

4. Explore Workflows: Create multi-step workflows

5. Monitor Performance: Use built-in analytics

Conclusion

Scheduling a one-off API call with HookPulse takes 30 seconds:

1. Get API key (10 seconds)

2. Create webhook template (10 seconds)

3. Schedule webhook (10 seconds)

No infrastructure. No complexity. Just works.

Start scheduling API calls in 30 seconds with HookPulse.

Ready to Try HookPulse?

Start scheduling webhooks in minutes. No infrastructure, no maintenance, just reliable webhook scheduling built on Elixir/OTP.

Start Free Trial