Callbacks and signatures
When a task finishes, TaskToHuman posts it to your callback URL, signed with your workspace's secret. Verify the signature, then act.
When a callback is sent#
A task with a callback URL (its own callback_url, or the task type's) gets a callback each time it finishes: when it is resolved, expired or cancelled (a task support reopens finishes again later). The body is the finished task as JSON, or your own shape with a custom payload. A task type can also start a GitHub Actions workflow when a task finishes.
POST /hooks/tasktohuman HTTP/1.1
Content-Type: application/json; charset=utf-8
User-Agent: TaskToHuman-Callbacks/1
TTH-Signature: t=1763284794,v1=7504a93c2a35ea43c577549c5a7f41a65a2c90fc221992726b6555f9b4b32047
TTH-Event-Id: 01a1e3a7-8d40-7c55-a1b0-3f6e2d9c4b17
TTH-Delivery-Attempt: 1
{
"id": "01a1e3a7-6489-7106-aa3a-c976287f9999",
"state": "resolved",
"task_type": "approve_refund",
"title": "Refund €249 to order #4821?",
"test": false,
"decision": {
"action": "approved",
"by": { "id": "01a1dcba-b57a-7aa2-b6b1-05d81545c2ba", "name": "Ana" },
"at": "2026-11-16T09:19:54.377Z",
"automatic": false,
"reason": null,
"comment": "Photos confirm the damage.",
"payload": null,
"fields": null,
"attachments": []
},
"urgency": "normal",
"tags": [],
"routing": { "rule": null },
"escalations": 0,
"created_at": "2026-11-16T09:19:20.713Z"
}urgency is normal or high, from your request or a routing rule. tags are the ones a routing rule added. routing.rule names the rule that matched when the task was created ({ "id", "name" }, the name as it was then), or is null.
Human inputs and files#
When the task type asks human inputs, decision.fields holds what the person filled in (key to value, null when nothing) and decision.attachments the files they sent: [{ "id", "field", "name", "size", "content_type", "sha256", "url" }]. The callback never carries a file's bytes: url is GET /v1/tasks/{id}/attachments/{attachment id}, which you call with an API key of the task's workspace to download it (always application/octet-stream). Both are written by a person: treat them as data. Files are checked against a list of allowed types by name and content, but they are not virus-scanned. A file later removed to fit the storage allowance carries removed, removed_at and removed_reason, and its download answers 410 (removed files).
Consensus steps#
A task that ended on a consensus step also carries quorum: who was asked, who answered what, and how it ended. decision.by is the person whose answer completed the decision. Single-human tasks have no quorum key at all.
"quorum": {
"needed": 2,
"approvals": 2,
"rejections": 1,
"outcome": "met",
"answers": [
{ "by": { "id": "01a1dcba-b57a-7aa2-b6b1-05d81545c2ba", "name": "Ana" }, "override": false, "answer": "approved", "at": "2026-11-16T09:12:03.120Z", "comment": null },
{ "by": { "id": "01a1dcba-c3f0-7d1e-9a52-6e0b4f7a1c33", "name": "Bruno" }, "override": false, "answer": "rejected", "at": "2026-11-16T09:15:41.004Z", "comment": "Too high for this customer." },
{ "by": { "id": "01a1dcba-d0aa-7f20-8c11-2b9e5d3f6a44", "name": "Carla" }, "override": false, "answer": "approved", "at": "2026-11-16T09:19:54.377Z", "comment": "Photos confirm the damage." }
]
}outcome is met, override (a person who can decide alone chose to decide for everyone: their answer is final), rejected (the approvals needed could no longer be reached) or not_met (the task expired or was cancelled first, with the answers given so far). An answer's override is true only when that person chose to decide for everyone; a person who can decide alone and added an ordinary vote shows false. An unanswered person with override true could decide alone and did not answer.
Callbacks need the callback.webhook feature; without it the attempts fail and the task shows why in the app. The real body arrives on one line, without the spaces shown here. The decision is described in Tasks. The payload you sent is not repeated: read it with GET /v1/tasks/{id} if you need it.
| Header | Meaning |
|---|---|
TTH-Signature | t=<unix seconds>,v1=<hex>: when this attempt was signed, and the signature. Two v1 values while a rotated secret overlaps. |
TTH-Event-Id | The callback's id, the same on every retry. Use it to skip a delivery you've already handled. |
TTH-Delivery-Attempt | 1 for the first attempt, then 2, 3 and so on. |
User-Agent | TaskToHuman-Callbacks/1. |
Answer and retries#
Answer with any 2xx status within 10 seconds. Do the slow work afterwards. Any other status, a redirect or a timeout is retried after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour and 2 hours, then every 4 hours, until 24 hours after the first attempt. After that the callback is marked failed, and you can retry it from the task in the app.
Callback URL rules#
Callback URLs are checked when you save them (on the task type, or a task's own callback_url) and again before every attempt:
httpsonly, with a certificate that is valid for the host name. Free certificates exist, for example from Let's Encrypt; self-signed and expired certificates are refused, and nothing is sent.- Port 443 or 8443. If your server can only listen on another port, ask support: they can allow one more port for your organization.
- A public host name. A public IP address is accepted too, but use a name: when callbacks are sent through Cloudflare's network (Where callbacks come from), a new URL with an IP address is refused with
callback_url_ip_not_allowed, and one saved earlier fails withblocked_url. Private and internal networks,localhostand other local or reserved names (.local,.localdomain,.lan,.internal,.home.arpa,.test,.example,.invalid,.onion,.svc,.corp,.home,.intranet,.private), host names with an underscore, ending in a dot or whose last part does not start with a letter (127.0.0.256), and TaskToHuman's own addresses are refused. - No user name or password in the URL (check the signature instead).
- When callbacks are sent through Cloudflare's network (Where callbacks come from), three more things fail with
blocked_urlorport_not_allowed: a URL with an IP address instead of a host name, a URL longer than 2,000 characters once written in plain ASCII (an international host name asxn--…, other characters percent-encoded), and a port below 1024 other than 443.
When an attempt fails, the task in the app shows why. The codes you may see:
| Code | What happened | What to do |
|---|---|---|
timeout | No 2xx within 10 seconds. | Answer first, work afterwards. |
connect_failed | Nothing answered on that host and port, it didn't speak TLS, or the host name doesn't resolve to a public address. | Check the URL, the port, your DNS and your firewall. |
certificate_invalid | Your server's certificate was refused (self-signed, expired, or for another name). | Install a valid certificate. |
redirect | Your server answered with a redirect. Redirects are never followed. | Use the final URL. |
blocked_url | The URL no longer passes the rules above. | Change the URL. |
port_not_allowed | The URL's port isn't allowed (any more) for your organization. | Use 443 or 8443, or ask support. |
http_<status> | Your server answered with this status. | Answer with 2xx once the callback is handled. |
deferred_too_long | The callback waited its whole 24 hours behind a sending limit (too many of your callbacks at once, or to one host) and was never sent again. | Retry it in the app; if it happens again, contact support. |
header_decrypt_failed | One of your custom headers couldn't be read on our side, so nothing was sent (a callback never goes out without a header you configured). | Save that header again in the app; the next retry sends it. |
custom_headers_invalid | A saved custom header doesn't pass the rules below, so nothing was sent. | Check your custom headers in the app. |
relay_unavailable, relay_rejected, relay_quota | A temporary delivery problem on our side: the callback did not reach your server. | Nothing: we retry on the usual schedule. |
feature_not_in_plan | Your plan doesn't include callbacks (callback.webhook), or the task type has a custom payload template and your plan no longer includes custom payloads. Nothing was sent. | Change plan, or remove the template; then retry the callback from the task. |
payload_template_failed | The task type's custom payload template didn't give a valid JSON object for this task, so nothing was sent. | Fix the template, then retry the callback from the task: it renders again. |
body_too_large | The finished task is too large to send as a callback (very long comments or edited data: about 2 MB). | Read the task with GET /v1/tasks/{id}. |
Verify the signature#
Each workspace has one signing secret (whsec_…), revealed once in the app under API & webhooks, then Signing secrets. It signs every callback of the workspace, test and live. Check every callback before acting on it:
- Read the raw request body as bytes, before any JSON parsing. Parsing and serializing again changes it.
- Split
TTH-Signatureon commas intokey=valuepairs: onetand one or morev1. - Compute the HMAC-SHA256 of
t, a dot, and the raw body, with the secret's UTF-8 bytes as the key, as lower-case hex. - Accept the callback when the result equals any
v1value, compared in constant time. - Reject it when
tis more than 5 minutes from your clock. Every retry is signed again with a fresht. - Skip a
TTH-Event-Idyou've already handled: a delivery can arrive twice.
With the SDKs, this is one call: verifyCallback in @tasktohuman/sdk, verify_callback in tasktohuman for Python. Without them, these functions do steps 2 to 5. Each is tested against the same test vectors as our own signer.
import { createHmac, timingSafeEqual } from "node:crypto";
// Checks a TaskToHuman callback before you act on it.
// rawBody: the request body exactly as it arrived (a Buffer),
// before any JSON parsing
// header: the TTH-Signature header,
// "t=<unix seconds>,v1=<hex>[,v1=<hex>]"
// secret: your workspace's signing secret (whsec_…)
export function verifyTaskToHumanSignature(
rawBody,
header,
secret,
now = Date.now() / 1000,
) {
let t;
const signatures = [];
for (const part of String(header ?? "").split(",")) {
const [key, value] = part.trim().split("=");
if (key === "t") t = value;
else if (key === "v1" && value) signatures.push(value);
}
// Replay protection: refuse a timestamp more than 5 minutes off.
if (!/^\d+$/.test(t ?? "")) return false;
if (Math.abs(now - Number(t)) > 300) return false;
const expected = createHmac("sha256", secret)
.update(`${t}.`)
.update(rawBody)
.digest();
// During a secret rotation there are two v1 values: accept either.
return signatures.some((signature) => {
const given = Buffer.from(signature, "hex");
return (
given.length === expected.length && timingSafeEqual(given, expected)
);
});
}import hashlib
import hmac
import time
def verify_tasktohuman_signature(
raw_body: bytes,
header: str,
secret: str,
now: float | None = None,
) -> bool:
"""Checks a TaskToHuman callback before you act on it.
raw_body: the request body exactly as it arrived (bytes),
before any JSON parsing
header: the TTH-Signature header,
"t=<unix seconds>,v1=<hex>[,v1=<hex>]"
secret: your workspace's signing secret (whsec_...)
"""
t, signatures = None, []
for part in (header or "").split(","):
key, _, value = part.strip().partition("=")
if key == "t":
t = value
elif key == "v1" and value:
signatures.append(value)
# Replay protection: refuse a timestamp more than 5 minutes off.
if t is None or not (t.isascii() and t.isdigit()):
return False
if abs((time.time() if now is None else now) - int(t)) > 300:
return False
signed = t.encode("ascii") + b"." + raw_body
key = secret.encode("utf-8")
expected = hmac.new(key, signed, hashlib.sha256).hexdigest()
# During a secret rotation there are two v1 values: accept either.
return any(hmac.compare_digest(expected, s) for s in signatures)using System.Globalization;
using System.Security.Cryptography;
using System.Text;
/// <summary>Checks a TaskToHuman callback before you act on it.</summary>
public static class TaskToHumanSignature
{
/// <param name="rawBody">
/// The request body exactly as it arrived, before any JSON parsing.
/// </param>
/// <param name="header">
/// The TTH-Signature header:
/// "t=<unix seconds>,v1=<hex>[,v1=<hex>]".
/// </param>
/// <param name="secret">Your workspace's signing secret (whsec_…).</param>
/// <param name="now">The current time (DateTimeOffset.UtcNow).</param>
public static bool Verify(
byte[] rawBody,
string? header,
string secret,
DateTimeOffset now)
{
ArgumentNullException.ThrowIfNull(rawBody);
string? t = null;
var signatures = new List<string>();
foreach (var part in (header ?? "").Split(','))
{
var pair = part.Trim().Split('=', 2);
if (pair.Length != 2)
{
continue;
}
if (pair[0] == "t")
{
t = pair[1];
}
else if (pair[0] == "v1")
{
signatures.Add(pair[1]);
}
}
// Replay protection: refuse a timestamp more than 5 minutes off.
if (t is null
|| !long.TryParse(t, NumberStyles.None,
CultureInfo.InvariantCulture, out var seconds)
|| Math.Abs(now.ToUnixTimeSeconds() - seconds) > 300)
{
return false;
}
var signed = new byte[t.Length + 1 + rawBody.Length];
Encoding.ASCII.GetBytes(t + ".", signed);
rawBody.CopyTo(signed, t.Length + 1);
var key = Encoding.UTF8.GetBytes(secret);
var expected = HMACSHA256.HashData(key, signed);
// During a secret rotation there are two v1 values: accept either.
foreach (var signature in signatures)
{
if (signature.Length == expected.Length * 2
&& signature.All(Uri.IsHexDigit)
&& CryptographicOperations.FixedTimeEquals(
Convert.FromHexString(signature), expected))
{
return true;
}
}
return false;
}
}<?php
/**
* Checks a TaskToHuman callback before you act on it.
*
* @param string $rawBody the request body exactly as it arrived
* (file_get_contents('php://input'))
* @param string $header the TTH-Signature header,
* "t=<unix seconds>,v1=<hex>[,v1=<hex>]"
* @param string $secret your workspace's signing secret (whsec_…)
*/
function verify_tasktohuman_signature(
string $rawBody,
string $header,
string $secret,
?int $now = null
): bool {
$t = null;
$signatures = [];
foreach (explode(',', $header) as $part) {
$pair = explode('=', trim($part), 2);
if (count($pair) !== 2) {
continue;
}
if ($pair[0] === 't') {
$t = $pair[1];
} elseif ($pair[0] === 'v1') {
$signatures[] = $pair[1];
}
}
// Replay protection: refuse a timestamp more than 5 minutes off.
if ($t === null || !ctype_digit($t)) {
return false;
}
if (abs(($now ?? time()) - (int) $t) > 300) {
return false;
}
$expected = hash_hmac('sha256', $t . '.' . $rawBody, $secret);
// During a secret rotation there are two v1 values: accept either.
foreach ($signatures as $signature) {
if (hash_equals($expected, $signature)) {
return true;
}
}
return false;
}And a receiver that uses them:
import express from "express";
import { verifyTaskToHumanSignature } from "./verify.mjs";
const app = express();
// express.raw keeps the exact bytes that were signed.
const raw = express.raw({ type: "application/json" });
app.post("/hooks/tasktohuman", raw, (req, res) => {
const ok = verifyTaskToHumanSignature(
req.body,
req.get("TTH-Signature"),
process.env.TTH_SIGNING_SECRET,
);
if (!ok) return res.sendStatus(400);
const task = JSON.parse(req.body.toString("utf8"));
// Skip a TTH-Event-Id you have already handled,
// then act on task.decision.
res.sendStatus(204);
});
app.listen(3000);import json
import os
from flask import Flask, abort, request
from verify import verify_tasktohuman_signature
app = Flask(__name__)
@app.post("/hooks/tasktohuman")
def tasktohuman_callback():
raw = request.get_data() # the exact bytes that were signed
ok = verify_tasktohuman_signature(
raw,
request.headers.get("TTH-Signature", ""),
os.environ["TTH_SIGNING_SECRET"],
)
if not ok:
abort(400)
task = json.loads(raw)
# Skip a TTH-Event-Id you have already handled,
# then act on task["decision"].
return "", 204app.MapPost("/hooks/tasktohuman",
async (HttpRequest request, IConfiguration config) =>
{
using var buffer = new MemoryStream();
await request.Body.CopyToAsync(buffer); // the exact bytes that were signed
var raw = buffer.ToArray();
var ok = TaskToHumanSignature.Verify(
raw,
request.Headers["TTH-Signature"],
config["TaskToHuman:SigningSecret"]!,
DateTimeOffset.UtcNow);
if (!ok)
{
return Results.BadRequest();
}
using var task = JsonDocument.Parse(raw);
// Skip a TTH-Event-Id you have already handled,
// then act on the decision.
return Results.NoContent();
});<?php
require __DIR__ . '/verify.php';
$raw = file_get_contents('php://input'); // the exact bytes that were signed
$header = $_SERVER['HTTP_TTH_SIGNATURE'] ?? '';
$secret = (string) getenv('TTH_SIGNING_SECRET');
if (!verify_tasktohuman_signature($raw, $header, $secret)) {
http_response_code(400);
exit;
}
$task = json_decode($raw, true);
// Skip a TTH-Event-Id you have already handled,
// then act on $task['decision'].
http_response_code(204);Rotating the secret#
Rotating the secret in the app keeps the previous one signing for 24 hours. During that overlap every callback carries two v1 values, the new one first, so your receiver keeps working whichever secret it holds. Deploy the new secret, then end the overlap early in the app if the old one leaked.
Custom headers#
The signature is how you know a callback is ours and unchanged: check it first, always. Some receivers want a credential as well before a request gets through: an API gateway, a firewall rule, an automation tool's webhook with header authentication. For those, add your own headers in the app. They are an addition to the signature, never a replacement: a header only shows that the sender knows a value.
- For every callback of your organization: under API & webhooks, then Signing secrets, in Custom headers. Only members who can manage every workspace can change these.
- For one task type: in the task type, under After the answer, in Custom headers for callbacks, once it has a saved callback URL. A header with the same name replaces the organization's value for that task type (names are compared without case). Every change to them, and every change of the callback URL they go to, is recorded in the task type's history.
| Rule | |
|---|---|
| Name | A name of your own, such as X-Api-Key or X-Acme-Token: letters, digits and hyphens, at most 64 characters. |
| Standard HTTP headers | Refused: every name in the IANA HTTP field name registry, such as Host, Content-Type, Cookie or User-Agent. The one exception is Authorization, which you can set (for example Bearer <token>). |
| Reserved names | Refused: names starting with CF-, Proxy- (so Proxy-Authorization too), X-Forwarded-, Sec-, Content- or our own TTH-, and X-Real-IP, True-Client-IP and CDN-Loop. Also the headers some servers trust to change the method, the path, the host or the caller's address: X-HTTP-Method-Override, X-HTTP-Method, X-Method-Override, X-Original-URL, X-Rewrite-URL, X-Host, X-Original-Host, X-Client-IP, X-Cluster-Client-IP, X-Originating-IP, X-Remote-IP, X-Remote-Addr, Client-IP, Fastly-Client-IP and HTTP2-Settings. |
| Cloudflare Access | If your receiver is behind Cloudflare Access, you can set CF-Access-Client-Id and CF-Access-Client-Secret (a service token). These are the only two CF- names allowed; every other name starting with CF- is refused. |
| Value | 1 to 2,048 plain characters (printable ASCII, no line breaks). |
| How many | 10 for the organization and 10 per task type; the names and values one callback sends are at most 8 KB together. |
What to know:
- Values are secrets. They are stored encrypted and never shown again, in the app or anywhere else: you can replace or delete a value, not read it. The app shows the name and, for a secret of 24 characters or more, its last 4 characters. For a value such as
Bearer <token>the secret is the token: a shorter token shows nothing. - They go to one exact address. Custom headers are sent only with a callback whose URL is exactly the callback URL saved on its task type (scheme, host, port, path and query). A task that brings its own
callback_url, a staff replay to a corrected address, or a task created before the saved URL was changed is delivered and signed as usual but carries no custom header. A task type's own headers can only be entered once a URL is saved. They are kept when that URL is changed, and from then on go to the new address: the app says so before the save, and the change is recorded in the task type's history with who made it and the names of the headers; other changes cannot push that entry out of the history. If the URL is removed, the headers stay saved and are not sent. The organization's headers are sent to a task type's URL only after a member who may manage organization headers has saved or confirmed that exact URL. The app shows this as "Organization headers are not sent: an admin has to confirm this address", with a button for those who may confirm. Under API & webhooks, then Signing secrets, in Custom headers, those members also see Task types waiting for your approval: every such task type with its full callback address. Select several and choose Approve selected; the confirmation names the organization's headers (never their values) and lists every address. If an address changed after the list was loaded, nothing is approved and the list shows the current addresses to check again. - They are not part of the signature.
TTH-Signaturecovers the timestamp and the body, as before. The order of the headers carries no meaning, andTTH-Signature,TTH-Event-IdandTTH-Delivery-Attemptcan't be replaced. - Per-task headers don't exist.
POST /v1/taskstakes no headers; they are configuration, set in the app.
Custom payload#
On plans that include it (callback.custom_payload), a task type can send a JSON body of your own design instead of the finished task: the shape a chat tool's incoming webhook, a ticketing system or your own service expects, without code in between. In the app, open the task type, then After the answer, Payload: choose Custom template (instead of Standard payload), then Edit template. The editor lists the variables, shows the problems with their line and previews the body for an approved, a rejected and an expired sample task. With Standard payload you can preview the usual body, on every plan.
The template's result replaces the body for every callback of that task type, whichever URL it goes to (the task type's, or a task's own callback_url). The headers stay ours: TTH-Signature, TTH-Event-Id, TTH-Delivery-Attempt and your custom headers. Templates are set in the app only: the API and MCP don't configure callbacks.
The template language#
A template is JSON with Liquid placeholders, in the same safe subset as the message templates:
- Tags:
if,elsif,else,unless,commentandraw. No loops, noassign,capture,includeorrender. - Filters:
default,upcase,downcase,capitalize,strip,plus,minus,times, andjson. {{ x }}writesxas the inside of a JSON string, escaped: quotes, backslashes, line breaks and other control characters,<,>,&,',+and every non-ASCII character become\",\\or\uXXXX. Put it between quotes:"title": "{{ task.title }}". A comment with quotes or a line break can't break your JSON.{{ x | json }}writesxas a complete JSON value: a string with its quotes, a number,trueorfalse,null, an object or an array. Use it without quotes:"amount": {{ result.amount | json }},"tags": {{ task.tags | json }}.
After rendering, the text must be one JSON object, parsed strictly (no comments, no trailing commas). It is then written compactly, so the spaces and line breaks of your template never reach the receiver. A template is at most 16,000 characters; the body at most 256 KB, nested at most 32 levels.
| Variable | Value |
|---|---|
task.id, task.type, task.title, task.state, task.urgency, task.created_at, task.finished_at | Text. task.type is the task type's key. |
task.url | The task in the app, for your team. |
task.test | true for a test task. |
task.escalations | How many times the task moved to a backup. |
task.tags | The tags, as an array: use json. |
task.payload, task.payload.<key> | The fields as the task was created, without sensitive fields. |
decision.action, decision.reason, decision.at, decision.comment | The decision, or null. decision.comment is written by a person. |
decision.automatic | true when nobody decided. |
decision.by.id, decision.by.name | Who decided, or null. |
decision.payload, decision.payload.<key> | The edited values, or null (sensitive fields left out). |
decision.fields, decision.fields.<key> | The human inputs. |
decision.attachments | The files sent, as an array of objects like the standard body's decision.attachments: use json. |
result.<key> | The edited value if the approver edited the field, otherwise the value as created. |
callback.id | The delivery's id (TTH-Event-Id), to skip repeats. |
A field the task type doesn't have, or a sensitive field, is refused when you save. A field removed later renders as null.
Examples#
{
"text": "{{ task.title }}: {{ decision.action }}{% if decision.by.name %} by {{ decision.by.name }}{% endif %}",
"blocks": [
{ "type": "section", "text": { "type": "mrkdwn", "text": "*{{ task.title }}*: {{ decision.action }}\n<{{ task.url }}|Open in TaskToHuman>" } }
]
}{
"type": "message",
"attachments": [{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{ "type": "TextBlock", "weight": "Bolder", "text": "{{ task.title }}" },
{ "type": "TextBlock", "wrap": true, "text": "{{ decision.action | capitalize }}{% if decision.comment %}: {{ decision.comment }}{% endif %}" }
]
}
}]
}{
"event": "approval.{{ decision.action }}",
"task_id": "{{ task.id }}",
"order": {{ task.payload.order_id | json }},
"amount": {{ result.amount | json }},
"approved_by": {{ decision.by.name | json }},
"automatic": {{ decision.automatic | json }},
"inputs": {{ decision.fields | json }},
"delivery": "{{ callback.id }}"
}Signature, checks and failures#
- The signature covers the exact body you receive, the compact rendered JSON. Verify it over the raw bytes, as usual.
- Checked when you save. The template renders against three sample tasks built from the task type's fields: approved by a person (with edited values and every human input filled), rejected with a long comment full of quotes, backslashes and line breaks, and expired automatically with nobody deciding. Each must give a JSON object within the limits; the problem names the sample. The codes are listed under Errors.
- A template that fails for a real task (an
ifthat leaves a trailing comma, a body over 256 KB) fails that callback withpayload_template_failed, visible on the task in the app. The standard body is never sent instead: a receiver built for your shape would misread it. Fix the template, then retry the callback from the task: it renders again with the template you saved. - If your plan stops including custom payloads while a template is saved, the template is kept and can still be edited or removed, but that task type's callbacks fail with
feature_not_in_plan, visible on the task in the app. Nothing is sent in another shape. Remove the template (choose Standard payload) or change plan, then retry the callback from the task. - Setting, changing or removing a template is recorded in the task type's history, with a fingerprint of the text, not the text.
A task type can also start a GitHub Actions workflow when a task finishes, with or without a template: see GitHub Actions.
Where callbacks come from#
Know a callback is ours by its signature, not by the address it comes from. A source address tells you little: addresses change, and other senders can share them.
If your firewall must filter by source address anyway, open the app: API & webhooks → Signing secrets → Where callbacks come from.
- When callbacks are sent through Cloudflare's network, that section lists the address ranges they come from (IPv4 and IPv6), with a copy button and the date of the last update. These are Cloudflare's published ranges (cloudflare.com/ips), and they are shared by all Cloudflare customers: anyone can send from them. Filtering by address is an addition to verifying the signature, never a replacement for it.
- When that section shows no ranges, we don't publish source addresses, and they can change without notice. Don't filter by address: verify the signature.
Either way, a custom header is the simple way to give your gateway a credential next to the signature.
Without callbacks#
Can't receive callbacks, for example behind a firewall? Ask for the task with GET /v1/tasks/{id} instead. Poll gently: people take minutes or hours, so once a minute is plenty.