Logo di Api Webhooks

Api Webhooks

Organizzazione
rejot-dev
api-webhooks

Configura i webhook API in entrata end-to-end. Usalo quando l’utente ha bisogno di un URL webhook/callback, fornisce l’autenticazione del webhook o payload di esempio, definisce eventi del provider o instrada le consegne webhook.received agli eventi di automazione catalogati.

Add to TypingMind

Panoramica

Pubblicato darejot-dev
Repositoryfragno
Nome della skillapi-webhooks
Stelle
62
Fork
6
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da rejot-dev su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Api Webhooks in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/api-webhooks
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rejot-dev/fragno.git /tmp/fragno
mkdir -p .claude/skills
cp -r /tmp/fragno/apps/backoffice/content/static/skills/api-webhooks .claude/skills/api-webhooks
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Api Webhooks in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Api Webhooks non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Api Webhooks non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

API Webhooks

Configure one coherent webhook contract: endpoint, event source, cataloged provider events, routes, and verification. Use codemode and return a final inventory so the user can see exactly what was registered.

Setup sequence

1. Reserve the endpoint URL

Immediately create a draft endpoint with a stable lowercase endpointId derived from the provider name, then give the user the exact publicUrl returned by the tool.

js
const draft = await api.createWebhookEndpoint({
  endpointId: "example-provider",
  name: "Example Provider",
  status: "draft",
  verification: { type: "none" },
  deliveryIdentity: { type: "jsonBodyPath", path: ["webhookId"] },
  auth: { type: "none" },
});

return { webhookUrl: draft.publicUrl };

Creating the endpoint also provisions an event source named after its endpointId. For example, endpoint example-provider owns source example-provider. Source provisioning is asynchronous. If an immediate events.catalogCreate reports that this source does not exist, retry that operation a bounded number of times for this specific error. Keep the endpoint and source identifiers unchanged.

Draft endpoints reserve a stable URL and reject deliveries with WEBHOOK_ENDPOINT_DRAFT and "Webhook endpoint is not configured yet" until activated.

2. Establish the webhook contract

Collect the information required to make deliveries deterministic:

  • example JSON payloads for every event type the user wants to receive;
  • relevant delivery, signature, and discriminator headers;
  • a provider delivery ID from a header or payload path;
  • authentication details;
  • endpoint verification challenge details, when applicable;
  • the payload field that discriminates event types, such as type.

Keep the endpoint in draft while required details are missing. The endpointId is the only value to deduce without evidence.

Choose deliveryIdentity from a stable provider identifier such as webhookId, event.id, id, or a provider delivery-ID header.

Authentication choices are none, bearer, apiKey, basic, and hmac. Treat “webhook secret,” “signing secret,” “key,” or a secret-shaped webhook value as an HMAC clue and collect the algorithm, signature location and name, encoding, optional prefix, and signed-payload format. Use bearer authentication only when the provider explicitly sends Authorization: Bearer ....

Setup guardrails

  • The API capability is available automatically for the current scope. Webhook endpoints share its storage and public URL configuration.
  • Use the shared api capability directly; connections.setup is for outbound API connections.
  • Give the user the complete, fully qualified receiving URL returned as webhook.publicUrl. Refer to it as the webhook URL, not the public base URL.
  • Assemble the final URL only from the tool result. The documented URL shape is explanatory, not a substitute for webhook.publicUrl.
  • Ask for example payloads and relevant headers before choosing delivery identities, schemas, or routes.
  • Derive only the endpointId without evidence. Keep the endpoint in draft while authentication, signature, verification, payload, header, discriminator, or delivery-identity details are unknown.
  • Store authentication secrets through endpoint tools and omit secret values from summaries, schemas, event examples, and completion responses.

3. Register provider events

For each distinct provider event, call events.catalogCreate with:

  • source: the webhook endpointId;
  • a stable eventType derived from the provider event discriminator;
  • a useful label and description;
  • a payload schema based on the projected event payload;
  • a representative example;
  • enabled: true.
js
const registered = await events.catalogCreate({
  source: "example-provider",
  eventType: "record.created",
  label: "Example Provider record created",
  description: "A record was created in Example Provider.",
  payloadSchema: {
    type: "object",
    properties: {
      recordId: { type: "string" },
      data: { type: "object" },
    },
    required: ["recordId"],
    additionalProperties: true,
  },
  example: { recordId: "rec_123", data: { status: "new" } },
  enabled: true,
});

The registered schema is the destination contract. Every route projection must produce all its required fields.

4. Route accepted deliveries

Accepted deliveries first produce api.webhook.received. Create one reclassification route for each cataloged provider event.

Every route must be endpoint-scoped. When the provider carries multiple event types, also match its event discriminator. Without the endpoint matcher, a route consumes deliveries from every API webhook endpoint.

The route matcher and projection inspect the complete automation event envelope. Webhook fields are under $.payload; provider body fields are under $.payload.body.

js
const route = await router.create({
  id: "example-provider-record-created",
  name: "Classify Example Provider record-created webhooks",
  enabled: true,
  trigger: {
    kind: "event",
    source: "api",
    eventType: "webhook.received",
    matcher: {
      all: [
        { path: "$.payload.endpointId", op: "eq", value: "example-provider" },
        { path: "$.payload.body.type", op: "eq", value: "record.created" },
      ],
    },
  },
  action: {
    kind: "reclassify_event",
    source: "example-provider",
    eventType: "record.created",
    payload: {
      kind: "projection",
      fields: {
        recordId: "$.payload.body.recordId",
        data: "$.payload.body.data",
      },
    },
  },
  description:
    "Reclassifies Example Provider record.created deliveries as example-provider record.created events.",
});

Projection paths always start with $.. Compare the projection against the destination event schema before creating the route; every required destination field must resolve for a matching delivery.

5. Activate the endpoint

Update the draft only after the webhook contract is known. When the user supplies the complete contract before setup begins, creating the endpoint directly as active is also valid.

js
const webhook = await api.updateWebhookEndpoint({
  endpointId: "example-provider",
  status: "active",
  verification: { type: "none" },
  deliveryIdentity: { type: "jsonBodyPath", path: ["webhookId"] },
  auth: { type: "none" },
});

For HMAC, configure the exact provider contract:

js
const webhook = await api.updateWebhookEndpoint({
  endpointId: "example-provider",
  status: "active",
  verification: { type: "none" },
  deliveryIdentity: { type: "jsonBodyPath", path: ["webhookId"] },
  auth: {
    type: "hmac",
    secret: "whs_secret_123",
    algorithm: "sha256",
    signature: {
      location: "header",
      name: "x-provider-signature",
      encoding: "hex",
      prefix: "sha256=",
    },
    signedPayload: { type: "rawBody" },
  },
});

HMAC decision guide

  • algorithm: use the provider's documented sha1, sha256, or sha512 algorithm.
  • signature.location: use header or query according to where the provider sends the signature.
  • signature.name: preserve the exact header or query-parameter name.
  • signature.encoding: use the documented hex, base64, or base64url encoding.
  • signature.prefix: include it only when the provider prefixes the encoded signature, such as sha256= or v1=.
  • signedPayload: use rawBody when the provider signs the unmodified request body. Use timestampedBody when it signs a prefix, timestamp, delimiter, and raw body.
  • For timestampedBody, preserve the exact prefix, timestampHeader, and delimiter, and use the provider's replay-tolerance window. An empty prefix is valid only when the provider signs the timestamp first without a prefix.

Verification challenge guide

Use { type: "none" } for ordinary delivery-only endpoints. Use challenge when the provider sends a synchronous value that must be echoed before deliveries begin.

A challenge configuration specifies:

  • the exact HTTP method;
  • a present predicate when the source only needs to exist, or an equals predicate when it must match a fixed value;
  • a match source from a header, query parameter, or JSON body path;
  • the header, query parameter, or JSON body path whose value the response echoes.

Slack-style signed challenge example

js
const webhook = await api.createWebhookEndpoint({
  endpointId: "slack",
  name: "Slack",
  status: "active",
  verification: {
    type: "challenge",
    method: "POST",
    when: {
      type: "equals",
      source: { type: "jsonBodyPath", path: ["type"] },
      value: "url_verification",
    },
    response: {
      type: "echoText",
      source: { type: "jsonBodyPath", path: ["challenge"] },
    },
  },
  deliveryIdentity: { type: "jsonBodyPath", path: ["event_id"] },
  auth: {
    type: "hmac",
    secret: "signing-secret",
    algorithm: "sha256",
    signature: {
      location: "header",
      name: "x-slack-signature",
      encoding: "hex",
      prefix: "v0=",
    },
    signedPayload: {
      type: "timestampedBody",
      prefix: "v0:",
      timestampHeader: "x-slack-request-timestamp",
      delimiter: ":",
      toleranceSeconds: 300,
    },
  },
});

return webhook.publicUrl;

6. Verify end-to-end

Tell the user when the endpoint is ready for a provider test delivery. Send a representative delivery when possible, then inspect both queues:

js
const [apiHooks, automationHooks] = await Promise.all([
  hooks.list({ fragment: "api", pageSize: 20 }),
  hooks.list({ fragment: "automations", pageSize: 50 }),
]);

Verification is complete only when:

  1. the endpoint returns an accepted response;
  2. the matching onWebhookReceived API hook completes;
  3. the original api.webhook.received automation event completes;
  4. each expected reclassified <endpointId>.<eventType> event completes without projection or schema errors.

A 202 Accepted response or a pending automation hook is intermediate evidence, not completion. When a hook fails, inspect its exact projection or schema error, repair the route, send a new unique delivery, and verify again.

Completion response

Finish every webhook setup with one inventory containing:

  • endpoint name, status, and exact fully qualified publicUrl;
  • event source (endpointId);
  • every registered source.eventType;
  • every route as trigger → destination, including endpoint and discriminator matchers;
  • authentication and verification mode, without secret values;
  • end-to-end verification status.

If the endpoint remains a draft, list the missing inputs required for activation. If no provider events were registered, state that explicitly.

Event envelope reference

api.webhook.received fires after an active endpoint accepts and authenticates a delivery. Its payload contains:

  • endpointId
  • deliveryId
  • hookId
  • receivedAt
  • redacted headers
  • redacted query
  • parsed JSON body
  • contentType

Use hookId or the automation event ID for idempotency. Duplicate provider deliveries with the same endpoint and delivery ID produce the same hook ID.

Tool reference

Use codemode first.

Webhook endpoint methods:

  • api.listWebhookEndpoints lists configured endpoints.
  • api.getWebhookEndpoint inspects one endpoint.
  • api.createWebhookEndpoint creates or replaces an endpoint.
  • api.updateWebhookEndpoint updates an endpoint.
  • api.deleteWebhookEndpoint deletes an endpoint.

A direct active endpoint is appropriate when the complete contract is already known:

js
const webhook = await api.createWebhookEndpoint({
  endpointId: "example-provider",
  name: "Example Provider",
  status: "active",
  verification: { type: "none" },
  deliveryIdentity: { type: "jsonBodyPath", path: ["webhookId"] },
  auth: { type: "none" },
});

return webhook.publicUrl;

Inspect existing configuration before replacing it:

js
const endpoints = await api.listWebhookEndpoints();
const endpoint = await api.getWebhookEndpoint({ endpointId: "example-provider" });

Event and routing methods:

  • events.catalogList
  • events.catalogGet
  • events.catalogCreate
  • router.list
  • router.get
  • router.create
  • router.update
  • router.delete

Webhook endpoints use the shared api capability automatically. Return the exact tool-provided publicUrl; the receive URL shape is /api/http/:scope/webhooks/endpoints/:endpointId/events.

Domande frequenti

Cosa fa la skill IA Api Webhooks?

Configura i webhook API in entrata end-to-end. Usalo quando l’utente ha bisogno di un URL webhook/callback, fornisce l’autenticazione del webhook o payload di esempio, definisce eventi del provider o instrada le consegne webhook.received agli eventi di automazione catalogati.

Perché usare Api Webhooks su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Api Webhooks è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Api Webhooks in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/api-webhooks. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Api Webhooks?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Api Webhooks?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Api Webhooks: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Api Webhooks è gratuita?

Sì. È pubblicata su GitHub da rejot-dev con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇