Webhooks
Inbound webhooks that deploy on push and start agents, and the outbound alert webhook REM CloudHub sends to your systems, with headers and payloads.
Inbound: deploy on push
Each project and job can be updated by a push to its branch.
In the console: Settings > Automation > Auto-update, set How it updates to Push, click New token, and copy the Webhook address and Webhook token (the token is shown once).
At your git host (GitHub, GitLab, Gitea or Bitbucket), add a webhook for push events to that address, with the token in a header.
POST https://remcloudhub.com/api/hooks/git/app/118
X-QCH-Webhook-Token: <webhook token>
Content-Type: application/json
{ ...your git host's push payload... }For a job the address is /api/hooks/git/job/{job_id}. REM CloudHub reads the pushed branches from the payload (GitHub and Gitea ref: refs/heads/<branch>, Bitbucket push.changes[].new.name). Answers are always 202 with a message:
Message | Meaning |
|---|---|
| A new deploy (or job rebuild) started |
| The push was to another branch |
| Auto-update is not set to Push |
| A job is mid-run; push again later or click Update now |
| Your release rules hold this project (for example a production gate) |
A wrong token, or a project that does not exist, answers 404 (the same answer for both). If your host cannot send headers, the token may be passed as ?token=; prefer the header, since URLs end up in logs.
Inbound: start an agent
An agent with a webhook trigger starts a run on each call. The webhook token is shown once when the agent is created (rotate it from the agent's page or POST /api/agents/{id}/webhook-token).
POST https://remcloudhub.com/api/agents/42/webhook
X-QCH-Webhook-Token: <agent webhook token>
X-QCH-Delivery: 7f9c2b1e-delivery-id
Content-Type: text/plain
New invoice INV-2207 from Acme, total 48,000 INR. Check it against the purchase order.The body (up to 20,000 characters) is the run's input. X-QCH-Delivery makes the call idempotent: sending the same delivery id again does not start a second run. The answer is 201 with the run: id, agent_id, version, trigger (webhook), state, thread_id, and later output, cost_usd, tokens_input, tokens_output. Follow it with GET /api/agents/runs/{id}. The run is autonomous: it has the agent's and its holder's rights, no person's. A wrong token answers 401.
Outbound: alert webhooks
Add a webhook channel under Activity > Alerts (channels view): the address is kept in the Vault and used only when sending. When an alert fires, REM CloudHub POSTs JSON in the Alertmanager v4 shape, so tools that accept Alertmanager webhooks work without changes:
{
"version": "4",
"status": "firing",
"receiver": "acme-ops",
"alerts": [
{
"status": "firing",
"startsAt": "2026-11-18T11:02:40+00:00",
"fingerprint": "a41c0e9b2f7d6c11",
"labels": {"alertname": "JobFailed", "severity": "warning"},
"annotations": {"summary": "nightly-report failed", "description": "Exit code 1 after 3m 12s. Open the run for its output."}
}
]
}Send test posts a message with "qch_test": true and the alert name QchChannelTest, so your receiver can tell tests apart. Delivery failures never stop REM CloudHub's evaluation; they are logged by type.
Outbound: product webhooks
Products integrated with REM CloudHub (registered by the platform team) can receive a webhook when their tokens or settings change. These are set up by the platform team, not by organisations.