ProfilePilot
Loading…
Developer API

Email Marketing, Workflows & Omnichannel Campaigns API

Export email subscriber counts, deliverability health, broadcast/newsletter campaign metrics, automation workflow enrollments, WhatsApp marketing campaigns, and social posts.

Use these four endpoints to export every performance metric across Email Marketing, Automated Workflows & Sequences, WhatsApp Marketing Campaigns, and Multi-Platform Social Posts into your BI warehouse.

1. Email Marketing Overview & Deliverability Health (GET /api/v1/email/reports/overview)

Endpoint: GET https://profilepilotapp.com/api/v1/email/reports/overview Required Scope: email:read or reports:read Required Product Subscription: Email Marketing + Developer API Access

Query Parameters:

  • startDate & endDate (YYYY-MM-DD, optional — defaults to last 30 days UTC).

Performance Metrics & Response Fields:

  • active_eligible_contacts (number) — Live mailable audience count (subscribed, not opted out, not suppressed).
  • plan_usage — { planCode, planName, contactLimit, monthlySendLimit, sendsUsedThisMonth, sendsRemainingThisMonth }.
  • totals — { sent, delivered, opened, clicked, unsubscribed, bounced, complaints } combined across campaigns and workflows in the period.
  • rates — { deliveryRate, openRate, clickRate, unsubscribeRate, bounceRate, complaintRate } (openRate, clickRate, and unsubscribeRate use delivered as denominator; bounceRate and complaintRate use sent).
  • breakdown — { campaign_sends, workflow_sends, sent_campaigns_in_period }.
  • list_growth — { newSubscribers, unsubscribes, netGrowth, suppressionsAdded }.
  • deliverability — { status, bounceRatePct, complaintRatePct, warmupActive, dailyCap }.
  • top_links[] — Most-clicked URLs in the period ({ url, clicks, uniqueClicks }).
  • recent_campaigns[] & top_workflows[] — Period leaderboards.
curl -sS -X GET "https://profilepilotapp.com/api/v1/email/reports/overview?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" },
  "email_enabled": true,
  "active_eligible_contacts": 24180,
  "plan_usage": {
    "planCode": "growth_25k",
    "planName": "Growth (25,000 contacts)",
    "contactLimit": 25000,
    "monthlySendLimit": 250000,
    "sendsUsedThisMonth": 96420,
    "sendsRemainingThisMonth": 153580
  },
  "totals": {
    "sent": 96420,
    "delivered": 95810,
    "opened": 32960,
    "clicked": 6890,
    "unsubscribed": 142,
    "bounced": 610,
    "complaints": 8
  },
  "rates": {
    "deliveryRate": 99.4,
    "openRate": 34.4,
    "clickRate": 7.2,
    "unsubscribeRate": 0.1,
    "bounceRate": 0.6,
    "complaintRate": 0.0
  },
  "breakdown": {
    "campaign_sends": 78200,
    "workflow_sends": 18220,
    "sent_campaigns_in_period": 4
  },
  "list_growth": {
    "newSubscribers": 1240,
    "unsubscribes": 142,
    "netGrowth": 1098
  },
  "deliverability": {
    "status": "healthy",
    "bounceRatePct": 0.63,
    "complaintRatePct": 0.01
  },
  "top_links": [
    { "url": "https://example.com/october-specials", "clicks": 3410 }
  ],
  "recent_campaigns": [],
  "top_workflows": []
}

2. Email Broadcasts & Newsletters Performance (GET /api/v1/email/campaigns)

Endpoint: GET https://profilepilotapp.com/api/v1/email/campaigns Required Scope: email:read or reports:read Required Product Subscription: Email Marketing + Developer API Access

Query Parameters:

  • status ("draft" | "scheduled" | "sending" | "sent" | "paused" | "cancelled" | "failed", comma-separated optional)
  • kind ("broadcast" | "newsletter", optional)
  • limit (1–500, default 100) & offset (default 0)

Performance Metrics & Response Fields (`campaigns[]`):

  • id, name, kind ("broadcast" | "newsletter"), status, audience_kind, segment_id, audience_label.
  • message: { id, subject, subject_b, ab_enabled, preview_text, from_name, reply_to }.
  • scheduled_at, started_at, completed_at, total_recipients, failed_count, skipped_count.
  • totals: { sent, delivered, opened, clicked, unsubscribed, bounced, complaints }.
  • rates: { deliveryRate, openRate, clickRate, unsubscribeRate, bounceRate, complaintRate }.
curl -sS -X GET "https://profilepilotapp.com/api/v1/email/campaigns?status=sent&limit=25" \
  -H "Authorization: Bearer ppapi_your_secret_key"
{
  "ok": true,
  "campaigns": [
    {
      "id": "ec_90123",
      "name": "October Spring Harvest Catalog",
      "kind": "broadcast",
      "status": "sent",
      "audience_kind": "segment",
      "segment_id": "seg_vip_buyers",
      "audience_label": "Segment: VIP Buyers",
      "message": {
        "id": "emsg_4455",
        "subject": "Spring Harvest Specials Are Live",
        "subject_b": "Save 20% on Spring Harvest Specials",
        "ab_enabled": true,
        "preview_text": "Exclusive trade pricing valid through Friday.",
        "from_name": "Harbour & Vine",
        "reply_to": "hello@example.com"
      },
      "scheduled_at": "2026-10-15T07:00:00Z",
      "started_at": "2026-10-15T07:00:04Z",
      "completed_at": "2026-10-15T07:12:19Z",
      "total_recipients": 19500,
      "failed_count": 0,
      "skipped_count": 48,
      "totals": {
        "sent": 19452,
        "delivered": 19340,
        "opened": 7156,
        "clicked": 1644,
        "unsubscribed": 29,
        "bounced": 112,
        "complaints": 1
      },
      "rates": {
        "deliveryRate": 99.4,
        "openRate": 37.0,
        "clickRate": 8.5,
        "unsubscribeRate": 0.1,
        "bounceRate": 0.6,
        "complaintRate": 0.0
      },
      "last_error": null,
      "created_at": "2026-10-14T14:20:00Z",
      "updated_at": "2026-10-15T07:12:19Z"
    }
  ],
  "pagination": { "total": 18, "limit": 25, "offset": 0 }
}

3. Email Sequences & Automations Performance (GET /api/v1/email/workflows)

Endpoint: GET https://profilepilotapp.com/api/v1/email/workflows Required Scope: email:read or reports:read Required Product Subscription: Email Marketing + Developer API Access

Query Parameters:

  • status ("draft" | "active" | "paused" | "archived", optional — defaults to all non-archived workflows)
  • kind ("sequence" | "automation", optional)

Performance Metrics & Response Fields (`workflows[]`):

  • id, name, description, kind ("sequence" | "automation"), status, trigger_type, trigger_label.
  • step_count (total canvas nodes) & email_step_count (email send nodes).
  • enrollments: { active, completed, exited, paused, failed, total }.
  • totals: { sent, delivered, opened, clicked, unsubscribed, bounced, complaints }.
  • rates: { deliveryRate, openRate, clickRate, unsubscribeRate, bounceRate, complaintRate }.
  • last_sent_at, last_error, activated_at, paused_at, created_at, updated_at.
curl -sS -X GET "https://profilepilotapp.com/api/v1/email/workflows?status=active" \
  -H "Authorization: Bearer ppapi_your_secret_key"
{
  "ok": true,
  "total": 2,
  "workflows": [
    {
      "id": "ewf_7788",
      "name": "Abandoned Cart Recovery (Shopify / WooCommerce)",
      "description": "Two-step cart recovery with goal exit on order_completed",
      "kind": "automation",
      "status": "active",
      "trigger_type": "abandoned_cart",
      "trigger_label": "Store: Abandoned cart",
      "step_count": 4,
      "email_step_count": 2,
      "enrollments": {
        "active": 84,
        "completed": 1420,
        "exited": 690,
        "paused": 0,
        "failed": 4,
        "total": 2198
      },
      "totals": {
        "sent": 3120,
        "delivered": 3098,
        "opened": 1611,
        "clicked": 588,
        "unsubscribed": 6,
        "bounced": 22,
        "complaints": 0
      },
      "rates": {
        "deliveryRate": 99.3,
        "openRate": 52.0,
        "clickRate": 19.0,
        "unsubscribeRate": 0.2,
        "bounceRate": 0.7,
        "complaintRate": 0.0
      },
      "last_sent_at": "2026-10-20T14:55:00Z",
      "last_error": null,
      "activated_at": "2026-09-01T08:00:00Z",
      "paused_at": null,
      "created_at": "2026-09-01T07:45:00Z",
      "updated_at": "2026-10-20T14:55:00Z"
    }
  ]
}

4. Omnichannel Marketing Campaigns & Social Posts (GET /api/v1/marketing/campaigns)

Endpoint: GET https://profilepilotapp.com/api/v1/marketing/campaigns Required Scope: marketing:read or reports:read Required Product Subscription: WhatsApp Commerce (for whatsapp channel) and/or Locations & Reputation (for social_posts channel) + Developer API Access

Query Parameters:

  • startDate & endDate (YYYY-MM-DD, optional — defaults to last 30 days UTC)
  • channel ("all" | "whatsapp" | "social_posts", optional, default "all")
  • limit (1–500, default 100) & offset (default 0)

Performance Metrics & Response Fields:

  • whatsapp_campaigns[]: Each campaign includes id, name, channel, status, template_name, template_language, send_api ("cloud_api" | "mm_lite"), total_recipients, totals ({ sent, delivered, read, failed, skipped, clicks }), rates ({ delivery_rate_pct, read_rate_pct, click_rate_pct, failure_rate_pct }), and tracked click_links[] ({ id, code, target_url, utm_source, utm_medium, utm_campaign, utm_content, click_count, last_clicked_at }).
  • whatsapp_click_links_summary: { total_links, total_clicks }.
  • social_posts[]: Multi-platform posts with id, content, platforms (["google", "facebook", "instagram"]), status ("Published" | "Scheduled" | "Failed" | "Pending Approval"), post_type, scheduled_at, published_at, failure_reason, cta_type, cta_url, utm_params.
  • social_posts_summary: { by_status, by_platform }.
curl -sS -X GET "https://profilepilotapp.com/api/v1/marketing/campaigns?startDate=2026-10-01&endDate=2026-10-20&channel=all" \
  -H "Authorization: Bearer ppapi_your_secret_key"
{
  "ok": true,
  "period": { "startDate": "2026-10-01", "endDate": "2026-10-20" },
  "channel": "all",
  "whatsapp_campaigns": [
    {
      "id": "mc_3311",
      "name": "Month-End Bulk Combo Alert",
      "channel": "whatsapp",
      "status": "completed",
      "template_name": "month_end_combo_v2",
      "template_language": "en",
      "send_api": "mm_lite",
      "scheduled_at": "2026-10-18T08:00:00Z",
      "started_at": "2026-10-18T08:00:02Z",
      "completed_at": "2026-10-18T08:19:40Z",
      "total_recipients": 4500,
      "totals": {
        "sent": 4480,
        "delivered": 4410,
        "read": 3616,
        "failed": 70,
        "skipped": 20,
        "clicks": 926
      },
      "rates": {
        "delivery_rate_pct": 98.4,
        "read_rate_pct": 82.0,
        "click_rate_pct": 21.0,
        "failure_rate_pct": 1.5
      },
      "click_links": [
        {
          "id": "lnk_01",
          "code": "mcombo26",
          "target_url": "https://example.com/deals/month-end",
          "utm_source": "whatsapp",
          "utm_medium": "campaign",
          "utm_campaign": "month_end_combo_v2",
          "utm_content": "cta_button",
          "click_count": 926,
          "last_clicked_at": "2026-10-20T11:04:12Z"
        }
      ],
      "last_error": null
    }
  ],
  "whatsapp_click_links_summary": {
    "total_links": 14,
    "total_clicks": 4820
  },
  "social_posts": [
    {
      "id": "sp_8821",
      "content": "Weekend fresh arrivals now in store across all 42 branches!",
      "platforms": ["google", "facebook", "instagram"],
      "status": "Published",
      "post_type": "Offer",
      "scheduled_at": "2026-10-17T09:00:00Z",
      "published_at": "2026-10-17T09:00:11Z",
      "failure_reason": null,
      "cta_type": "LEARN_MORE",
      "cta_url": "https://example.com/weekend-fresh",
      "utm_params": { "utm_source": "profilepilot", "utm_medium": "social" },
      "created_at": "2026-10-16T15:00:00Z",
      "updated_at": "2026-10-17T09:00:11Z"
    }
  ],
  "social_posts_summary": {
    "by_status": { "Published": 28, "Scheduled": 6 },
    "by_platform": { "google": 34, "facebook": 34, "instagram": 22 }
  },
  "pagination": {
    "whatsapp_total": 6,
    "social_posts_total": 34,
    "limit": 100,
    "offset": 0
  }
}

5. Troubleshooting & Common Scenarios

  • How is `active_eligible_contacts` defined? It counts contacts in your shared Marketing audience who are actively subscribed to email, have not unsubscribed (email_opted_out = false), and are not on the operational suppression list (hard bounce, complaint, or manual suppression).
  • Pushing custom trigger events into Email Automations: To fire custom events or enroll contacts into workflows from your backend or e-commerce store, see Email Automation Events & Store API (POST /api/v1/email/events, POST /api/v1/email/enrollments, and POST /api/v1/email/store).
Typical Tasks
  • Grant email:read and marketing:read scopes to your API key
  • Pull active eligible contact counts and deliverability via GET /api/v1/email/reports/overview
  • Export campaign and workflow performance via /api/v1/email/campaigns and /api/v1/email/workflows
  • Pull WhatsApp campaigns and social post statuses via GET /api/v1/marketing/campaigns

Developer API Reference

All Developer & Reporting API Modules

Manage API Keys →
Store Sync
locations:readlocations:write

Enterprise Store Locations API

Push and query your canonical store master records (up to 100 stores per batch) by store_code.

POST/api/v1/locations
GET/api/v1/locations
GET/api/v1/locations/{store_code}
DELETE/api/v1/locations/{store_code}
Local Presence & SEO
reports:readlocations:read

Locations 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.

GET/api/v1/reports/locations/metrics
GET/api/v1/reports/seo-grid
Reputation & CX
reputation:readreports:read

Reputation, Reviews, Red Flags & CSAT API

Export star ratings, customer reviews, reply rates, business-hours response times, Red Flag alerts, and Customer Satisfaction cases.

GET/api/v1/reports/reputation/summary
GET/api/v1/reputation/reviews
GET/api/v1/reputation/red-flags
GET/api/v1/reputation/csat
WhatsApp Commerce
whatsapp:readreports:read

WhatsApp 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.

GET/api/v1/whatsapp/orders
GET/api/v1/whatsapp/orders/{id}
GET/api/v1/whatsapp/reports/finance
GET/api/v1/whatsapp/reports/usage
Email & Marketing
email:readmarketing:readreports:read

Email Marketing, Workflows & Omnichannel Campaigns API

Pull active eligible subscriber counts, email campaign & automation engagement rates, WhatsApp marketing campaigns, and multi-platform social posts.

GET/api/v1/email/reports/overview
GET/api/v1/email/campaigns
GET/api/v1/email/workflows
GET/api/v1/marketing/campaigns
Inbox & Social Care
inbox:readsocial:readreports:read

Smart 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.

GET/api/v1/inbox/reports/sla
GET/api/v1/social-inbox/reports
Insights & BI
insights:readreports:read

Insights 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.

GET/api/v1/insights/overview