brandmanna
Developer

Webhooks

Send content to external tools using webhooks with HMAC signature verification.

Webhooks let you push draft content from Brandmanna to external tools like Zapier, Make.com, n8n, or any custom HTTP endpoint. When you click "Send to Connected Apps" on a draft, Brandmanna sends a signed JSON payload to your configured webhook URL.

How Webhooks Work

  1. You configure a webhook URL on your brand.
  2. Brandmanna generates a secret token for signature verification.
  3. When you trigger the webhook from a draft, Brandmanna sends a POST request with the draft content.
  4. Your receiving endpoint verifies the HMAC signature and processes the payload.

Setting Up a Webhook

  1. Go to the Brands page and select the brand you want to configure.
  2. Open the webhook configuration section.
  3. Enter your webhook URL (e.g., a Zapier catch hook, Make.com webhook URL, or your own endpoint).
  4. Brandmanna generates a secret token — save this securely. You will use it to verify incoming payloads.
  5. Click Test Webhook to send a test payload and confirm the connection works.

Sending Content

To send a draft to your connected apps:

  1. Open any draft in the editor.
  2. Click Send to Connected Apps.
  3. Brandmanna sends the draft content as a JSON payload to your configured webhook URL.

Payload Structure

Each webhook delivery sends a JSON body with the following fields:

{
  "event": "draft.sent",
  "draft_id": "d_abc123",
  "brand_id": "b_xyz789",
  "brand_name": "Acme Corp",
  "platform": "linkedin",
  "topic": "Q2 product launch announcement",
  "content": "We are thrilled to announce...",
  "cta": "Learn more at acme.com/launch",
  "hashtags": ["#ProductLaunch", "#AcmeCorp", "#Innovation"],
  "image_url": "https://api.brandmanna.com/images/abc123.png",
  "scheduled_at": "2026-04-15T09:00:00Z",
  "status": "scheduled",
  "carousel_slides": null,
  "link_back": "https://app.brandmanna.com/drafts/d_abc123",
  "sent_at": "2026-04-10T14:30:00Z"
}

Field Reference

FieldTypeDescription
eventstringThe event type (e.g., draft.sent)
draft_idstringUnique identifier for the draft
brand_idstringUnique identifier for the brand
brand_namestringHuman-readable brand name
platformstringTarget platform (e.g., linkedin, instagram, twitter)
topicstringThe draft topic or title
contentstringThe full draft text content
ctastringCall-to-action text
hashtagsarrayList of hashtag strings
image_urlstring or nullURL of the attached image, if any
scheduled_atstring or nullISO 8601 timestamp if the draft is scheduled
statusstringDraft status (new, edited, scheduled, published)
carousel_slidesarray or nullSlide content for LinkedIn Carousel drafts
link_backstringURL to open the draft in the Brandmanna editor
sent_atstringISO 8601 timestamp of when the webhook was sent

Signature Verification

Every webhook request includes two custom headers:

HeaderDescription
X-Webhook-SignatureHMAC-SHA256 signature of the request body, using your secret token as the key
X-Manna-EventThe event type (e.g., draft.sent)

To verify a webhook is genuinely from Brandmanna:

  1. Read the raw request body.
  2. Compute an HMAC-SHA256 hash of the body using your secret token.
  3. Compare your computed hash with the value in the X-Webhook-Signature header.
  4. If they match, the request is authentic. If not, reject it.

Verification Examples

Node.js:

const crypto = require('crypto');

function verifySignature(body, signature, secret) {
  const hash = crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return hash === signature;
}

Python:

import hmac
import hashlib

def verify_signature(body: bytes, signature: str, secret: str) -> bool:
    computed = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(computed, signature)

Integration Tips

  • Zapier: Use the "Webhooks by Zapier" trigger with "Catch Hook". Paste the generated URL into Brandmanna's webhook configuration.
  • Make.com: Create a scenario with a "Custom Webhook" trigger module. Use the generated URL in Brandmanna.
  • n8n: Add a "Webhook" node as your trigger. Set the HTTP method to POST and use the generated URL.
  • Custom endpoints: Accept POST requests with a Content-Type: application/json header. Always verify the HMAC signature before processing.

Troubleshooting

  • Test fails: Confirm your webhook URL is publicly accessible and accepts POST requests.
  • Signature mismatch: Make sure you are hashing the raw request body (not a parsed/re-serialized version) and using the correct secret token.
  • No payload received: Check that your endpoint returns a 2xx status code. Brandmanna does not retry failed deliveries automatically.

On this page