Skip to main content
Posthook supports three ways to schedule a hook: a UTC timestamp (postAt), a local datetime with a timezone (postAtLocal + timezone), or a relative delay from now (postIn).

UTC scheduling with postAt

Provide an RFC 3339 timestamp in UTC:

Local time scheduling with postAtLocal + timezone

When you need delivery at a specific clock time in a specific timezone, use postAtLocal and timezone together. Posthook converts the local time to UTC at scheduling time, accounting for DST.

Relative delay with postIn

Schedule a hook relative to now using a duration string. Posthook resolves the delay to a UTC timestamp at scheduling time.
Examples: 30s, 5m, 2h, 7d, 1h30m, 1d2h30m45s

Validation rules

  • Provide exactly one of postAt, postAtLocal, or postIn.
  • timezone is required with postAtLocal and forbidden with postAt or postIn.

DST behavior

When using postAtLocal + timezone, Posthook resolves ambiguous times automatically:
  • Spring forward (gap): If the local time falls in a skipped hour, delivery is shifted forward to the first valid moment after the gap (e.g., 02:30 becomes 03:00).
  • Fall back (fold): If the local time occurs twice, the earlier occurrence is used.

Per-hook retry override

You can override your project’s default retry settings for individual hooks by including a retryOverride object. If omitted, the hook uses your project’s retry configuration.

Fields

Example: aggressive retries

Retry up to 15 times with a 5-second fixed delay:

Example: exponential backoff

Start with a 10-second delay, doubling up to 5 minutes:

Usage quota

Each plan includes a monthly hook quota — the number of hooks you can schedule per calendar month. Every POST /hooks call counts toward the quota, regardless of when the hook is scheduled to deliver. The quota resets at the start of each calendar month. When you hit the limit, POST /hooks returns 429 Too Many Requests until the quota resets. Posthook sends email alerts at 75%, 100%, and 150% of your quota so you can adjust usage or upgrade before reaching the limit. Quota limits may vary by plan.

Quota headers

Every POST /hooks response includes headers showing your current plan usage: Use these headers to monitor usage programmatically and avoid hitting plan limits.