Zum Inhalt springen
Entwickler

Webhooks

PostNimbo sendet in dem Moment an Ihre Adresse, in dem ein Beitrag live geht, damit Zapier, Make, n8n oder Ihr eigener Server darauf reagieren können.

Einrichten

  1. 1Öffnen Sie Einstellungen > Webhooks und geben Sie einen Namen und eine öffentliche https-Adresse ein.
  2. 2Wählen Sie die Kanäle aus, für die er gilt, oder keinen für alle Kanäle.
  3. 3Wählen Sie die Ereignisse: veröffentlichte Beiträge, von einem Flow gesammelte Leads, abgeschlossene Flows.
  4. 4Klicken Sie auf Send test event, um ein Beispiel eines Ereignisses an Ihre Adresse zu schicken.

In Zapier, Make und n8n

Die PostNimbo-Apps für Zapier, Make und n8n abonnieren für Sie: Das Einschalten eines Triggers ruft POST /public/v1/webhooks mit der Adresse auf, auf der das Tool lauscht, und das Ausschalten ruft DELETE /public/v1/webhooks/:id auf. Ihr eigener Code kann dasselbe mit einem API-Schlüssel tun.

Zapier, Make oder n8n einrichten

So wird zugestellt

  • Ein POST mit JSON-Body und dem Ereignisnamen im Header X-PostNimbo-Event.
  • Ihr Server hat 10 Sekunden für die Antwort auf einen veröffentlichten Beitrag und 5 Sekunden für ein Flow-Ereignis. Ein Flow-Ereignis wird nach einem Timeout, einer 429- oder einer 5xx-Antwort noch zweimal versucht; ein veröffentlichter Beitrag wird nicht wiederholt. Antworten Sie schnell und erledigen Sie die Arbeit danach.
  • Nur öffentliche https-Adressen werden akzeptiert, und auch eine Weiterleitung muss zu einer öffentlichen Adresse führen.
  • Jede Zustellung ist mit dem Secret aus den Webhook-Einstellungen signiert, in den Headern X-PostNimbo-Timestamp, X-PostNimbo-Signature.

Prüfen, ob eine Zustellung von uns kommt

Berechnen Sie mit Ihrem Secret einen HMAC-SHA256 aus dem Zeitstempel, einem Punkt und dem unveränderten Body, vergleichen Sie ihn in konstanter Zeit mit dem Signatur-Header und lehnen Sie Zeitstempel ab, die älter als 5 Minuten sind.

Node.js
const crypto = require('crypto');

// rawBody: the request body exactly as received, before JSON parsing
function fromPostNimbo(rawBody, headers, secret) {
  const timestamp = headers['x-postnimbo-timestamp'];
  const signature = headers['x-postnimbo-signature'] || '';
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  const expected =
    'sha256=' +
    crypto
      .createHmac('sha256', secret)
      .update(timestamp + '.' + rawBody)
      .digest('hex');
  return (
    signature.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
  );
}

Ereignisse

Dieselbe Liste gibt es unter GET /public/v1/webhooks/events, damit ein Tool die Trigger und Beispieldaten anzeigen kann.

post.published

A post went live on a channel. Sent once per channel, after the network accepted it, with the post in the array.

Webhooks with no channels get it for every channel; the others only for the channels they list.

Payload
[
  {
    "id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
    "content": "<p>Our autumn menu is here.</p>",
    "publishDate": "2026-10-26T09:30:00.000Z",
    "releaseURL": "https://www.linkedin.com/feed/update/urn:li:share:7000000000000000000",
    "state": "PUBLISHED",
    "integration": {
      "id": "c1d2e3f4-0000-4a00-8000-000000000001",
      "name": "Example Bakery",
      "providerIdentifier": "linkedin-page",
      "picture": "https://example.com/avatar.png",
      "type": "social"
    }
  }
]
post.scheduled

A post was queued to publish: scheduled (or published now), rescheduled, approved, or edited while scheduled. Sent once per channel, with the same fields as post.published. The next posts of a repeating post do not send it.

Webhooks with no channels get it for every channel; the others only for the channels they list.

Payload
[
  {
    "id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
    "content": "<p>Our autumn menu is here.</p>",
    "publishDate": "2026-10-26T09:30:00.000Z",
    "releaseURL": null,
    "state": "QUEUE",
    "integration": {
      "id": "c1d2e3f4-0000-4a00-8000-000000000001",
      "name": "Example Bakery",
      "providerIdentifier": "linkedin-page",
      "picture": "https://example.com/avatar.png",
      "type": "social"
    }
  }
]
post.failed

A post could not be published, or its publishing could not be confirmed, and is marked as failed. Sent once per channel, with the same fields as post.published (the reason is shown in PostNimbo).

Webhooks with no channels get it for every channel; the others only for the channels they list.

Payload
[
  {
    "id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
    "content": "<p>Our autumn menu is here.</p>",
    "publishDate": "2026-10-26T09:30:00.000Z",
    "releaseURL": null,
    "state": "ERROR",
    "integration": {
      "id": "c1d2e3f4-0000-4a00-8000-000000000001",
      "name": "Example Bakery",
      "providerIdentifier": "linkedin-page",
      "picture": "https://example.com/avatar.png",
      "type": "social"
    }
  }
]
lead.captured

An automation flow saved an email or phone number someone typed in answer to a question. Sent once per answer.

Webhooks with no channels get it for every channel's flows; the others only for the flows on the channels they list.

Payload
{
  "event": "lead.captured",
  "timestamp": "2026-10-26T09:30:00.000Z",
  "runId": "7d3f2a10-5c4e-4f8a-9a61-0e2b3c4d5e6f",
  "flow": {
    "id": "2a9e7c1b-3d4f-4e5a-8b6c-7d8e9f0a1b2c",
    "name": "Autumn menu giveaway"
  },
  "channel": {
    "id": "c1d2e3f4-0000-4a00-8000-000000000001",
    "network": "instagram",
    "name": "Example Bakery"
  },
  "contact": {
    "id": "4f5e6d7c-8b9a-4c0d-9e1f-2a3b4c5d6e7f",
    "name": "Sam Taylor",
    "username": "samtaylor",
    "email": "sam@example.com",
    "phone": "+447700900123",
    "tags": [
      "giveaway"
    ],
    "fields": {
      "postcode": "SW1A 1AA"
    }
  }
}
flow.completed

Someone reached the end of an automation flow. Sent once per run, with the same fields as lead.captured (email and phone are null when not collected).

Webhooks with no channels get it for every channel's flows; the others only for the flows on the channels they list.

Payload
{
  "event": "flow.completed",
  "timestamp": "2026-10-26T09:31:00.000Z",
  "runId": "7d3f2a10-5c4e-4f8a-9a61-0e2b3c4d5e6f",
  "flow": {
    "id": "2a9e7c1b-3d4f-4e5a-8b6c-7d8e9f0a1b2c",
    "name": "Autumn menu giveaway"
  },
  "channel": {
    "id": "c1d2e3f4-0000-4a00-8000-000000000001",
    "network": "instagram",
    "name": "Example Bakery"
  },
  "contact": {
    "id": "4f5e6d7c-8b9a-4c0d-9e1f-2a3b4c5d6e7f",
    "name": "Sam Taylor",
    "username": "samtaylor",
    "email": "sam@example.com",
    "phone": null,
    "tags": [
      "giveaway"
    ],
    "fields": {}
  }
}

Sie bauen etwas mit PostNimbo?

Erzählen Sie uns, woran Sie arbeiten. Wir helfen bei der API, prüfen Apps für das Verzeichnis und ergänzen die Endpunkte, die Integrationen brauchen.