Smart Inbox SLA & Social Inbox Engagement API
Pull Smart Inbox ticket volumes, priority/source breakdowns, and business-hours SLA metrics alongside Facebook & Instagram comment sentiment and actionable response rates.
Both endpoints calculate response and resolution durations strictly using your organisation’s configured Business Hours & Public Holidays (src/app/utils/responseTime.ts), matching the portal SLA clocks.
1. Smart Inbox SLA & Ticket Report (GET /api/v1/inbox/reports/sla)
Endpoint: GET https://profilepilotapp.com/api/v1/inbox/reports/sla Required Scope: inbox:read or reports:read Required Product Subscription: Smart Inbox + Developer API Access
Query Parameters:
startDate&endDate(YYYY-MM-DD, optional — defaults to last 30 days UTC)source("email"|"whatsapp"|"chatbot"|"manual"|"escalation", optional — defaults to"all")
Performance Metrics & Response Fields:
source_filter(string) — Active source filter ("all"or the requested channel).total_conversations(number) — Total non-spam conversations in the period (automatically excluding empty/ghost inbound email stubs).status_counts—{ open, pending, resolved }.priority_counts—{ low, normal, high, urgent }.source_breakdown—{ email, whatsapp, chatbot, manual, escalation }.first_reply_bh—{ replied_count, avg_business_minutes, formatted }(mean business-hours time to first agent reply).resolution_bh—{ resolved_count, avg_business_minutes, formatted }(mean business-hours time from conversation creation to resolution).sla_compliance—{ tracked, met, breached, compliance_rate_pct }evaluated against each conversation’ssla_due_attarget.business_hours_settings— The active weekday schedule used to compute the business-hours clocks.
curl -sS -X GET "https://profilepilotapp.com/api/v1/inbox/reports/sla?startDate=2026-10-01&endDate=2026-10-20" \
-H "Authorization: Bearer ppapi_your_secret_key"{
"ok": true,
"period": { "startDate": "2026-10-01", "endDate": "2026-10-20" },
"source_filter": "all",
"total_conversations": 184,
"status_counts": {
"open": 12,
"pending": 9,
"resolved": 163
},
"priority_counts": {
"low": 24,
"normal": 118,
"high": 31,
"urgent": 11
},
"source_breakdown": {
"email": 112,
"whatsapp": 54,
"chatbot": 0,
"manual": 0,
"escalation": 18
},
"first_reply_bh": {
"replied_count": 171,
"avg_business_minutes": 28.4,
"formatted": "28m"
},
"resolution_bh": {
"resolved_count": 163,
"avg_business_minutes": 195.0,
"formatted": "3h 15m"
},
"sla_compliance": {
"tracked": 184,
"met": 172,
"breached": 12,
"compliance_rate_pct": 93.5
},
"business_hours_settings": {
"monday": { "open": "08:00", "close": "17:00", "closed": false },
"tuesday": { "open": "08:00", "close": "17:00", "closed": false },
"wednesday": { "open": "08:00", "close": "17:00", "closed": false },
"thursday": { "open": "08:00", "close": "17:00", "closed": false },
"friday": { "open": "08:00", "close": "17:00", "closed": false },
"saturday": { "open": "08:00", "close": "13:00", "closed": false },
"sunday": { "open": "08:00", "close": "13:00", "closed": true }
}
}2. Social Inbox Engagement & Actionable Response Report (GET /api/v1/social-inbox/reports)
Endpoint: GET https://profilepilotapp.com/api/v1/social-inbox/reports Required Scope: social:read or reports:read Required Product Subscription: Locations & Reputation + Developer API Access
Query Parameters:
startDate&endDate(YYYY-MM-DD, optional — defaults to last 30 days UTC)accountId(string, optional) — Filter comments to a specific scoped social account.
Performance Metrics & Response Fields:
summary.total_comments(number) — Total top-level customer comments ingested across Facebook and Instagram in the period.summary.actionable_count(number) — Comments requiring customer care (negativesentiment,mod_status = "flagged", or triaged withcritical,inquiry, orstock). Pure spam is excluded.summary.actionable_replied(number) &summary.pending_actionable(number) — Actionable comments with or without a page-owner reply (counting replies sent via ProfilePilot or directly on Facebook/Instagram).summary.response_rate_pct(number | null) —actionable_replied / actionable_count × 100.summary.avg_response_bh_minutes(number | null) &summary.avg_response_bh_formatted(string) — Average business-hours response time on replied actionable comments.summary.sla_minutes(number) &summary.sla_hit_rate_pct(number | null) — Percentage of replied actionable comments answered within the target SLA window.summary.sentiment—{ positive, neutral, negative, classified }.summary.by_platform—{ facebook, instagram, other }comment counts.summary.footnote(string) — Methodology note for executive reports.stream[]— Up to 50 recent comment samples ({ id, locationName, platform, snippet, sentiment, tags, replied, bhMinutes, withinSla, createdAt }).
curl -sS -X GET "https://profilepilotapp.com/api/v1/social-inbox/reports?startDate=2026-10-01&endDate=2026-10-20" \
-H "Authorization: Bearer ppapi_your_secret_key"{
"ok": true,
"period": { "startDate": "2026-10-01", "endDate": "2026-10-20" },
"account_id": null,
"summary": {
"total_comments": 640,
"actionable_count": 142,
"actionable_replied": 134,
"pending_actionable": 8,
"response_rate_pct": 94.4,
"avg_response_bh_minutes": 34,
"avg_response_bh_formatted": "34m",
"sla_minutes": 240,
"sla_hit_rate_pct": 91.8,
"sentiment": {
"positive": 412,
"neutral": 154,
"negative": 74,
"classified": 640
},
"by_platform": {
"facebook": 420,
"instagram": 220,
"other": 0
},
"footnote": "Response rate = replies on actionable comments only (negative / critical / inquiry / stock / flagged). Replies count whether posted in ProfilePilot or on the social channel."
},
"stream": [
{
"id": "sc_990011",
"locationName": "Cape Town Flagship",
"platform": "facebook",
"snippet": "Do you have the 5kg bulk packs in stock today?",
"sentiment": "neutral",
"tags": ["inquiry", "stock"],
"replied": true,
"bhMinutes": 19,
"withinSla": true,
"createdAt": "2026-10-19T10:15:00Z"
}
]
}3. Troubleshooting & Common Scenarios
- Why does Social Inbox measure `response_rate_pct` on `actionable_count` instead of `total_comments`? High-volume retail posts receive hundreds of celebratory emojis and tag-a-friend comments that do not require an agent ticket. Measuring SLA strictly against actionable inquiries and complaints (
negative,critical,inquiry,stock,flagged) gives an accurate customer-care KPI. - Replies posted natively in Meta Business Suite:
commentIsReplieddetects both replies sent from ProfilePilot (comment_replies) and sub-comments posted directly by the page owner on Facebook or Instagram.
- Grant inbox:read and social:read scopes to your API key
- Call GET /api/v1/inbox/reports/sla for ticket SLA compliance and business-hours response times
- Call GET /api/v1/social-inbox/reports for Facebook & Instagram comment sentiment and actionable reply rates
Developer API Reference
All Developer & Reporting API Modules
locations:readlocations:writeEnterprise Store Locations API
Push and query your canonical store master records (up to 100 stores per batch) by store_code.
reports:readlocations:readLocations Metrics & Local SEO Geo-Grid API
Pull Google Business Profile impressions, website clicks, phone calls, direction requests, peak footfall days, Meta store metrics, and Geo-Grid Share of Voice.
reputation:readreports:readReputation, Reviews, Red Flags & CSAT API
Export star ratings, customer reviews, reply rates, business-hours response times, Red Flag alerts, and Customer Satisfaction cases.
whatsapp:readreports:readWhatsApp Commerce, Orders, Finance & Usage API
Export WhatsApp orders with normalized line items, fulfilment SLAs, paid GMV analytics, metered message volume, Auth OTP challenges, and loyalty balances.
email:readmarketing:readreports:readEmail Marketing, Workflows & Omnichannel Campaigns API
Pull active eligible subscriber counts, email campaign & automation engagement rates, WhatsApp marketing campaigns, and multi-platform social posts.
inbox:readsocial:readreports:readSmart Inbox SLA & Social Inbox Engagement API
Export Smart Inbox ticket volumes and business-hours SLA metrics alongside Facebook & Instagram comment sentiment and actionable response rates.
insights:readreports:readInsights Paid Media, GA4, Search Console & Attribution API
Pull paid media performance (Google Ads & Meta Ads), GA4 sessions and conversions, Google Search Console metrics, and True Attribution revenue.