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
- You configure a webhook URL on your brand.
- Brandmanna generates a secret token for signature verification.
- When you trigger the webhook from a draft, Brandmanna sends a POST request with the draft content.
- Your receiving endpoint verifies the HMAC signature and processes the payload.
Setting Up a Webhook
- Go to the Brands page and select the brand you want to configure.
- Open the webhook configuration section.
- Enter your webhook URL (e.g., a Zapier catch hook, Make.com webhook URL, or your own endpoint).
- Brandmanna generates a secret token — save this securely. You will use it to verify incoming payloads.
- Click Test Webhook to send a test payload and confirm the connection works.
Sending Content
To send a draft to your connected apps:
- Open any draft in the editor.
- Click Send to Connected Apps.
- 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
| Field | Type | Description |
|---|---|---|
event | string | The event type (e.g., draft.sent) |
draft_id | string | Unique identifier for the draft |
brand_id | string | Unique identifier for the brand |
brand_name | string | Human-readable brand name |
platform | string | Target platform (e.g., linkedin, instagram, twitter) |
topic | string | The draft topic or title |
content | string | The full draft text content |
cta | string | Call-to-action text |
hashtags | array | List of hashtag strings |
image_url | string or null | URL of the attached image, if any |
scheduled_at | string or null | ISO 8601 timestamp if the draft is scheduled |
status | string | Draft status (new, edited, scheduled, published) |
carousel_slides | array or null | Slide content for LinkedIn Carousel drafts |
link_back | string | URL to open the draft in the Brandmanna editor |
sent_at | string | ISO 8601 timestamp of when the webhook was sent |
Signature Verification
Every webhook request includes two custom headers:
| Header | Description |
|---|---|
X-Webhook-Signature | HMAC-SHA256 signature of the request body, using your secret token as the key |
X-Manna-Event | The event type (e.g., draft.sent) |
To verify a webhook is genuinely from Brandmanna:
- Read the raw request body.
- Compute an HMAC-SHA256 hash of the body using your secret token.
- Compare your computed hash with the value in the
X-Webhook-Signatureheader. - 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/jsonheader. 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.