Skip to Content
zued

Connect an agent

Start your own agent when a weekly snapshot is ready. zued sends a signed webhook, and the agent reads the new results and works on your actions through the API.

Your own agent can start as soon as zued has new results. When a weekly snapshot is ready, zued sends a signed message to an address you choose. That message starts your agent: an Orca bot, a Grok Bot routine, an n8n, Make or Zapier workflow, or Claude Code, Codex or Grok Build on your own server. The agent then reads the new figures, page changes and actions through the zued API. With a key that may change actions, it also marks actions done, assigns them and comments on them.

How it works

zued completes the weekly snapshot

The week's answers are in, and its results show in the app.

zued sends snapshot.completed

Every webhook of the project receives a signed snapshot.completed message, usually within a few minutes. While zued installs an update, it can take longer. The message names the project and the week and links to the results.

Your agent reads the results

The agent calls GET /v1/figures, GET /v1/changes and GET /v1/recommendations with an API key.

Your agent works on the actions

With a key that can change actions, the agent marks actions done or parked, assigns them to a member of the project and comments on them.

The message carries no figures. zued can update the figures of past weeks, for example after you merge two brands, so the agent always reads the current figures from the API.

Set it up

Create an API key

Open Settings → API and webhooks, tab Keys. Name the key and click Create key. Tick Can change actions only when the agent should mark actions done, assign them or comment on them. zued shows the key once, so copy it right away. Only an owner of the project can create keys.

Add a webhook

On the tab Webhooks, enter the address that starts your agent and click Add webhook. zued shows the signing secret, which starts with whsec_, once. Your receiver uses it to check each message. If the receiver starts only on its own key, enter it as a header too, for example name Authorization and value Bearer <key>. zued sends that header with every message and afterwards shows only its name.

The address must be a public https or http address. zued does not follow redirects, so enter the final address.

You can also add a webhook through the API, with a key that can change actions. The answer holds the secret, and only this answer shows it. Add "header": {"name": "Authorization", "value": "Bearer <key>"} to the body for a receiver that wants its own key.

curl -X POST https://api.zued.ai/v1/webhooks \
  -H "Authorization: Bearer $ZUED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://agent.example.com/zued", "types": ["snapshot.completed"]}'

GET /v1/webhooks lists the webhooks with their delivered, waiting and failed messages and the last error. A key that may only read sees each address up to its site, because an address such as a chat app's incoming webhook works as a key on its own. DELETE /v1/webhooks/{id} removes one.

An agent can ask for its own key, so nobody copies a key into it.

The agent asks for a key

It calls POST /v1/auth/device with its name and what it asks for: ["read"], ["read", "write"] to also change actions and webhooks, or ["read", "setup"] to also set up projects and start measurements. The answer holds a link for you and a code.

You open the link

Sign in and compare the code with the one your agent shows. Approve only if you started this in your own agent in the last few minutes.

You pick what the key reaches

Tick the projects the agent may reach, or All projects I own, including new ones. Nothing is ticked at first, so Approve waits for your choice. For an agent that asked to change things, pick Read or Read and change actions and webhooks. For an agent that asked to set up projects, tick or untick Set up projects and start paid measurements: it lets the agent add and fix pages, which zued then reads again. You can grant less than the agent asked for, never more.

The agent receives its key

It calls POST /v1/auth/token every interval seconds of the first answer. After you approve, the next call returns the key, once.

curl -X POST https://api.zued.ai/v1/auth/device \
  -H "Content-Type: application/json" \
  -d '{"client_name": "Claude Code", "scopes": ["read"]}'

curl -X POST https://api.zued.ai/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{"grant_type": "urn:ietf:params:oauth:grant-type:device_code", "device_code": "<device_code>"}'

The key reaches each project you picked as long as you own it. With all projects, it also reaches the projects you create later. The agent names the project of each request in the header Zued-Project, and GET /v1/projects lists the projects the key reaches. Settings → API and webhooks lists the agents you let in, says what each reaches and revokes them.

The message

zued sends a POST with a JSON body and three headers, as the Standard Webhooks specification describes.

content-type: application/json
webhook-id: 5d0c2f9e-8a41-4f7b-9c1e-2b7d6a3e4f10
webhook-timestamp: 1796029803
webhook-signature: v1,WmWdTNqBM3FG76cmcI6mi0s6ju7kEV4dLSj1mTA3LN0=

A webhook with its own header carries that header too. The signature does not cover it.

These headers are signed with the example secret whsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8= over the body below as zued sends it, as compact JSON without the spaces and line breaks between its parts. Test your check with them, its timestamp check switched off: this timestamp lies in the past.

{
  "type": "snapshot.completed",
  "timestamp": "2026-11-30T09:07:12.345678+00:00",
  "data": {
    "project": { "id": "7b01e145-3c55-4d1a-9e0f-6a2b8c4d5e6f", "name": "Example GmbH" },
    "snapshot": {
      "id": "c2a9e7d4-1f3b-4c8e-a6d5-9b0e2f4a7c13",
      "completed_at": "2026-11-30T08:58:41.102934+00:00",
      "complete": false,
      "engines": ["chatgpt", "gemini", "perplexity"],
      "missing_engines": ["gemini"],
      "week": "2026-11-23"
    },
    "links": {
      "figures": "/v1/figures",
      "prompts": "/v1/prompts?snapshot=c2a9e7d4-1f3b-4c8e-a6d5-9b0e2f4a7c13",
      "changes": "/v1/changes",
      "contradictions": "/v1/claims?verdict=contradicts",
      "recommendations": "/v1/recommendations"
    }
  }
}
  • webhook-id is the event's id. It stays the same when zued sends the message again, so skip an id you have already handled.
  • snapshot.id is the snapshot's id in GET /v1/snapshots.
  • complete is false when an engine answered too few prompts that week. missing_engines names those engines.
  • links are paths on https://api.zued.ai.

Answers and retries

Answer with a 2xx status within 10 seconds. Start the agent in the background and answer at once. Any other status, or no answer in time, counts as a failed delivery. zued then sends the message again after 5 minutes, 30 minutes, 2 hours, 8 hours and 24 hours. After the sixth failed attempt it stops. The tab Webhooks and GET /v1/webhooks show the last error.

Check the signature

Every message carries a signature made with your webhook's secret. Check it before your agent starts, so nobody else can start the agent with a forged message. Check the raw body exactly as received: parsing and re-encoding the JSON changes the bytes, and the check then fails. The official Standard Webhooks libraries do the check. They also refuse a message whose timestamp is more than 5 minutes off, so keep your server's clock right.

Python, with Flask (pip install standardwebhooks flask):

import os

from flask import Flask, request
from standardwebhooks.webhooks import Webhook, WebhookVerificationError

app = Flask(__name__)
webhook = Webhook(os.environ["ZUED_WEBHOOK_SECRET"])


@app.post("/zued")
def zued_event():
    try:
        event = webhook.verify(request.get_data(), dict(request.headers))
    except WebhookVerificationError:
        return "", 400
    if event["type"] == "snapshot.completed":
        start_agent(event)  # your code: start the agent, then return
    return "", 204

JavaScript, with Express (npm install standardwebhooks express):

import express from "express";
import { Webhook } from "standardwebhooks";

const app = express();
const webhook = new Webhook(process.env.ZUED_WEBHOOK_SECRET);

app.post("/zued", express.raw({ type: "application/json" }), (req, res) => {
  let event;
  try {
    event = webhook.verify(req.body, req.headers);
  } catch {
    return res.sendStatus(400);
  }
  if (event.type === "snapshot.completed") startAgent(event); // your code: start the agent, then return
  res.sendStatus(204);
});

app.listen(3000);

Without a library, compute an HMAC-SHA256 over <webhook-id>.<webhook-timestamp>.<raw body>. The key is the part of the secret after whsec_, decoded from base64. webhook-signature holds v1, followed by the result in base64.

Without a public address: read the events

An agent on a laptop or behind a firewall can ask for the same events instead. GET /v1/events returns them oldest first, and a key that only reads is enough.

curl "https://api.zued.ai/v1/events?after=$LAST_EVENT_ID" \
  -H "Authorization: Bearer $ZUED_API_KEY"
{
  "events": [
    { "id": "5d0c2f9e-8a41-4f7b-9c1e-2b7d6a3e4f10", "type": "snapshot.completed", "created_at": "2026-11-30T09:07:12.345678+00:00", "data": { "...": "as in the webhook" } }
  ],
  "has_more": false,
  "next_after": "5d0c2f9e-8a41-4f7b-9c1e-2b7d6a3e4f10"
}

Leave out after on the first call. Store next_after and send it as after on the next call. limit sets how many events one call returns, 50 by default and 200 at most. has_more is true when more events are waiting. Run the call on a schedule, for example every hour: a project gets one snapshot.completed a week.

What the agent reads and changes

The base address is https://api.zued.ai/v1, and every request sends the key as Authorization: Bearer <key>. Point your agent at https://api.zued.ai/v1/openapi.json: it describes every route and field. The API reference lists the same routes by group. After a snapshot, an agent usually reads GET /v1/figures, GET /v1/changes and GET /v1/recommendations, and with a key that may change actions it marks them done, assigns them and comments on them. Every change shows in the app under the name of the owner who created the key.

A key runs one request at a time, so tell your agent to send one request at a time.

A prompt to start from

Every tool below hands your agent a prompt. This one works as a start. It keeps the key out of the prompt text, because the agent reads it from the environment variable ZUED_API_KEY.

zued finished a weekly snapshot. The zued API is at https://api.zued.ai/v1,
described at https://api.zued.ai/v1/openapi.json. Send the header
"Authorization: Bearer $ZUED_API_KEY" with every request, one request at a time.
1. Read GET /v1/changes and GET /v1/recommendations?status=open.
2. For each open action whose page changed this week, check whether the change
   does what the action asks.
3. If it does, comment with what changed and mark the action done.
   If it does not, comment with what is still missing.

Fix pages zued could not analyse

zued cannot analyse every address: a page may redirect, have too little text, turn crawlers away or not exist. Such a page has no figures and still takes a page of your plan. GET /v1/pages marks it unreadable with the reason, and the agent replaces it with another address of your site, reads it again or removes it, as the Onboarding reference describes. Replacing and reading again need a key that may set up the project.

Connect an MCP client

Claude Code and other MCP clients can work with your project through tools, so the agent writes no API calls. The MCP server is at https://api.zued.ai/mcp. Most clients sign in to zued with OAuth, so no key changes hands. A client that only takes a key sends an API key in the Authorization header.

Signs in to zuedNeeds an API key in a header
Claude Code, claude.ai, ChatGPT and dots, Grok Bot, VS Code, Zed, Codex, Goose, Hermes, Kiro, Amp, Factory, Antigravity, opencode, Kilo Code, PiCursor, Windsurf, Gemini CLI, Cline, n8n, Make, Zapier, Perplexity, Le Chat, Copilot Studio, OpenClaw

Sign in without a key

In Claude Code, add the server:

claude mcp add --transport http zued https://api.zued.ai/mcp

Then run /mcp in Claude Code and pick zued, or run claude mcp login zued in your shell. Claude Code opens zued in your browser.

In claude.ai and ChatGPT, add https://api.zued.ai/mcp as a custom connector. VS Code, Zed, Codex, Goose, Hermes and the other clients in the first column take the same address and open zued in your browser too.

On zued, you answer the sign-in:

  • The page names the app, the site it comes from and where your answer sends you back to.
  • An app zued does not know gets a warning: approve only if you started this sign-in yourself on that site.
  • An app that returns to a program on your computer, such as Claude Code, Codex, VS Code, Zed or Goose, gets a note: approve only if you started the sign-in yourself in that app. An app zued does not know that returns to your computer gets a second warning, because any program there can use the app's name.
  • You tick the projects the client may reach, or All projects I own, including new ones. Nothing is ticked at first, so Approve waits for your choice.
  • You pick what the client may do: Read, Read and change actions and webhooks, and Set up projects and start paid measurements. You can grant less than the app asked for, never more.

After you approve, the browser returns to the client and its zued tools load. The client renews its access on its own while you use it, so you sign in once. It reaches each project you picked as long as you own it, and works until you revoke it in Settings → API and webhooks under Agents you let in. That list shows each client with the site it signed in from and when it was last used. To grant a client more, sign it in again.

Use an API key

The clients in the second column take only a key. Create one as Set it up describes and send it in the Authorization header. Claude Code takes a key too:

claude mcp add --transport http zued https://api.zued.ai/mcp \
  --header "Authorization: Bearer $ZUED_API_KEY"

Claude Code stores the key in its settings, so keep that file as private as the key. When zued refuses the key, Claude Code loads no zued tool and reports that the server rejected the header.

The tools

Each tool returns the same data as its API route and does the same as the app. A client sees only the tools its permissions allow.

Every client sees the tools that read:

ToolWhat it returns
list_projectsThe projects the client reaches, with their ids
get_projectThe project and its members, with the ids you assign actions to
weekly_figuresShare of Voice, appearance, Citation Share and Selection Rate for each week
find_absencesThe prompts whose answers never name your brand, and the brand they name instead
get_evidenceThe answers to one prompt, with their brands, citations and recommendation, a few at a time
list_contradictionsThe facts on your pages that an engine contradicts, and the sources it cites
list_changesThe pages whose content changed each week, and how their figures moved
get_recommendationsThe actions with their status, assignee, comments and outcome
get_strategyThe strategy's summary, the patterns across pages, the roadmap and the new pages
list_pagesThe pages with their figures, and the pages zued could not analyse with the reason
get_page_briefWhat to add, rewrite and move on one page
list_eventsThe project's events, such as snapshot.completed
list_webhooksThe project's webhooks and how their deliveries went
list_slotsYour plan slots, to see a paid one arrive
list_personasThe project's personas, and whether the page analysis still adds some
list_review_promptsThe prompts waiting for review before the first measurement
get_brand_proposalNames in the answers that may belong to your brand

With Read and change actions and webhooks, or a key that can change actions, the client also sees:

ToolWhat it does
mark_recommendationMarks an action done or parked, or opens it again
assign_recommendationAssigns an action to a member, who gets an email
comment_on_recommendationComments on an action
add_webhookAdds a webhook and shows its signing secret once
remove_webhookRemoves a webhook

With Set up projects and start paid measurements, the client also sees the tools that start crawls, prompt writing and measurements:

ToolWhat it does
create_projectCreates a project on a free slot of your account
start_checkoutA checkout link for a plan, for you to pay
assign_slotMoves the project onto a paid slot
add_personasAdds personas from a text about your customers
set_briefSets what you offer and the topics the prompts must cover
add_pagesAdds pages and starts their analysis
confirm_personasConfirms the personas, which starts writing the prompts
edit_review_promptChanges a prompt waiting for review
add_review_promptAdds a prompt of your own to the review
approve_reviewApproves the prompts, which starts the first measurement
confirm_brand_proposalCounts names of the brand proposal as your brand
replace_pageReplaces a page zued could not analyse with another address of your site
retry_pageReads a page zued could not analyse again
remove_pageRemoves a page and frees its page of your plan

list_slots, create_project and start_checkout act for your account, so they work for a client that signed in or holds a key from sign-in by link, and not with a key of one project. Such a client names the project in each tool's project_id, and list_projects lists the ids. The server tells the agent the order of the setup steps, so it can set up a project from start to first measurement while you only approve its sign-in and pay. A sign-in and a key each run one call at a time, so the agent calls one tool after another.

Orca

An Orca bot can start an automation when its webhook URL is called. The call goes through Orca Cloud to the computer the bot runs on.

  1. Sign in to Orca. Webhooks reach a bot through Orca Cloud.
  2. Ask your bot in chat to set up an automation that starts on a webhook call, with the prompt above. You can ask it to start only when the body's type is snapshot.completed.
  3. Copy the URL with Copy URL on the automation's card in Orca.
  4. Add that URL as a webhook in zued.
  5. Paste zued's signing secret, the one that starts with whsec_, into the Orca webhook as its signing secret, with Standard Webhooks as the sender type. Orca then starts the automation only for a message zued signed.

Orca hands the body of the call to the bot as information, not as instructions. Without a signing secret, anyone who has the Orca URL can start the automation, so treat the URL like a password. The run reads its data from the zued API with your key, so a forged call can only start a run on your real data. Keep ZUED_API_KEY in the environment of the bot's computer.

Without Orca Cloud, use a scheduled automation with a precheck instead. A precheck is a shell command that runs before each scheduled run, and Orca skips the run when it fails. Make it call GET /v1/events?after= and succeed only when a new event came. See Scheduled automations and Bot connectors in Orca's docs.

Grok

A Grok Bot routine can start on a webhook call. The routine's Webhook section shows the URL (POST to) and a key, which the caller must send as Authorization: Bearer <key>. Add the URL as a webhook in zued with a header: name Authorization, value Bearer followed by the routine's key. zued sends that header with every message, and the routine starts.

Grok Bot checks its key and not zued's signature. To check the signature too, add the webhook without the header and let a small receiver pass the message on. It checks zued's signature, as above, and then calls the routine:

import os

import requests


def start_agent(event):
    requests.post(
        os.environ["GROK_ROUTINE_URL"],
        json=event,
        headers={"Authorization": f"Bearer {os.environ['GROK_ROUTINE_KEY']}"},
        timeout=10,
    )

Grok Bot answers 200 when the run has started, before it ends. The bot receives the body together with the routine's instruction, so write the prompt above into the routine. See Skills and routines in xAI's docs.

To run Grok Build on your server instead, start it from the receiver as the coding agents below show, with grok -p "<prompt>". An agent you build on the xAI API starts the same way: your receiver calls it.

Automation tools

n8n, Make and Zapier each start a workflow on an incoming webhook: n8n with the Webhook node, Make with a custom webhook, Zapier with Webhooks by Zapier. Add the webhook address the tool gives you to zued.

Use the message as a trigger. The workflow reads every result from the zued API with your key, so a forged message can start a run but cannot feed the workflow false results. To check the signature inside the tool, its code step needs the body exactly as zued sent it. Where your tool cannot give you that, put the small receiver from Check the signature in front of it and let the receiver call the tool.

Coding agents

Claude Code, Codex and Grok Build each run without a terminal from one command. Your receiver starts one per message, in the background:

import json
import subprocess

PROMPT = "..."  # the prompt above

# Claude Code's sandbox: commands run without asking and reach api.zued.ai only.
SANDBOX = json.dumps({"sandbox": {
    "enabled": True,
    "failIfUnavailable": True,
    "autoAllowBashIfSandboxed": True,
    "network": {"allowedDomains": ["api.zued.ai"], "strictAllowlist": True},
}})


def start_agent(event):
    prompt = PROMPT + "\n\nThe event:\n" + json.dumps(event)
    subprocess.Popen(["claude", "-p", prompt, "--settings", SANDBOX])
    # Codex: subprocess.Popen(["codex", "exec", prompt])
    # Grok Build: subprocess.Popen(["grok", "-p", prompt])

The settings let Claude Code run its commands without asking and allow requests to api.zued.ai only. The agent reads answers that anyone can influence, and an instruction planted in one could tell it to send ZUED_API_KEY elsewhere: the sandbox refuses every other host. A permission rule such as Bash(curl *) lets curl reach any host, and a rule that names zued's address does not hold either, because curl takes a second address after the first. On Linux the sandbox needs bubblewrap and socat, and failIfUnavailable stops the run when the sandbox cannot start. See sandboxing in Claude Code's docs. Codex starts codex exec in a read-only sandbox, so give the run the sandbox settings it needs to reach api.zued.ai. See the docs of Claude Code, Codex and Grok Build.

GitHub Actions

GitHub starts a workflow on a repository_dispatch event. That call needs a GitHub token, which zued does not send, so your receiver makes it. Use a fine-grained token with write access to the repository's contents.

import os

import requests


def start_agent(event):
    requests.post(
        "https://api.github.com/repos/OWNER/REPO/dispatches",
        headers={
            "Accept": "application/vnd.github+json",
            "Authorization": f"Bearer {os.environ['GITHUB_TOKEN']}",
        },
        json={"event_type": "zued-snapshot", "client_payload": event["data"]},
        timeout=10,
    )

The workflow then runs your agent, for example with the Claude Code action, which starts on repository_dispatch. Store the zued key as a repository secret and give it to the agent the way the action's documentation describes. See repository dispatch in GitHub's docs.

Keep it safe

  • Keep the signing secret and the API key on the server or in the tool that runs your agent, for example in environment variables or the tool's secret store. Never put them in a browser, a public repository or the prompt text.
  • Create a key that only reads, unless the agent must change actions. Every change a key makes shows under the name of the owner who created it.
  • Check the signature of every message, and skip a webhook-id you have already handled.
  • Treat a message as a signal only. The agent reads its data from the API with your key, so a forged message cannot feed it false results.
  • A key and a webhook belong to the owner who created them. When that person stops owning the project, because they left it, became an editor or viewer, or deleted their account, the key stops working and the webhook receives nothing. Settings marks both as stopped, and a current owner creates new ones.
  • A key also stops while its creator is banned, or while their company requires single sign-on and their zued account does not use it.
  • A webhook's header value shows only when you add the webhook. Revoke a key in Settings when you no longer need it. To change a webhook's secret or header, remove the webhook and add it again.

On this page