Build on Aiffinity
Add rich, data-driven widget cards directly into Aiffinity users' feeds. Connect your platform's live data to the people who matter most to your users.
What are Widgets?
Widgets are structured data cards rendered natively inside the Aiffinity app. When a user connects your platform, you push data through the Widget API and it appears in their personal feed — beautifully formatted, always up to date.
Register
Declare your widget ID, connector, component types, and domain in the Developer Portal.
Verify domain
Add a DNS TXT record to prove ownership of your domain. Widgets go live after verification.
User connects
When a user links your connector in Aiffinity, you receive a user_connected webhook with their opaque partner_user_id.
Push data
POST to /v1/partners/widget-data/:partner_user_id with your payload. The widget appears instantly.
Partner User IDs
Aiffinity never exposes real user IDs to partners. Instead, each user-partner pair is assigned a stable, opaque partner_user_id derived via HMAC-SHA256.
connect_webhook_url containing partner_user_id, widget_id, and a timestamp. Store this ID — it's how you identify the user in all future push calls.
{
"event": "user_connected",
"partner_user_id": "a3f2c91b…", // stable, opaque — not a real Aiffinity user ID
"widget_id": "my-widget",
"timestamp": "2026-03-21T12:00:00Z"
}
API Keys
All partner API calls are authenticated with an x-partner-key header. Keys are SHA-256 hashed server-side — the raw value is shown exactly once at creation and never stored.
curl https://api.aiffinity.me/v1/partners/widgets \ -H "x-partner-key: YOUR_API_KEY"
Rotate your key at any time from the API Keys page. The old key is invalidated immediately.
Endpoints
Base URL: https://api.aiffinity.me
| Method | Path | Description |
|---|---|---|
| GET | /v1/partners/widgets | List your registered widgets |
| POST | /v1/partners/widgets | Register a new widget |
| PATCH | /v1/partners/widgets/:widget_id | Update widget manifest (name, webhook URL, accent color, etc.) |
| POST | /v1/partners/verify-domain | Trigger DNS TXT record verification |
| POST | /v1/partners/widget-data/:partner_user_id | Push widget data for a user |
| POST | /v1/partners/api-keys | Rotate your API key |
// Example: push hero_card widget data
curl -X POST https://api.aiffinity.me/v1/partners/widget-data/PARTNER_USER_ID \
-H "x-partner-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"widget_id": "my-widget",
"payload": {
"component": "hero_card",
"data": {
"header_label": "Portfolio",
"display_value": "$24,800",
"display_subtitle": "5 positions",
"stats": [{ "label": "P&L", "value": "+$1,200", "trend": "up" }]
}
}
}'
21 Component Types
Each widget declares up to 3 component types. Choose from Basic, Data, and Interactive types depending on what best represents your platform's data.
Stats & Content
Numbers, lists, text blocks, tags, avatars. The everyday workhorses.
Visualisations
Charts, timelines, images, ranked lists. For platforms with rich structured data.
Tappable Actions
Buttons and links that open URLs in the browser. Drive traffic and deep links.
See full schemas and example payloads in the Component Reference →
Ready to build?
Register your widget, verify your domain, and push your first data in minutes.
Create account →