Developers · contract metrics-exchange/1

Metrics Exchange API

Pull the VibeBack numbers a workspace owner chose to share — conversations, tickets, satisfaction, website traffic, payments and more — for any date range, as JSON, XML or CSV. Pull only: you ask whenever you like; VibeBack never calls you.

Base URL https://api.vibeback.io/metrics-exchange/v1

The doors

POST /tokenWho are you? Client id + secret for a short-lived opaque token (OAuth 2 client credentials).
GET /healthAre we connected, and is my setup what I think it is?
GET /timeWhat is “today” on your side, exactly? The resolved window of every shortcut.
GET /catalogueWhat can I ask for, and what does each number mean?
GET | POST /dataGive me the numbers — JSON, XML or CSV.
POST /token/revokeKill a token you believe has leaked. The only write a receiver can make.

Every response carries X-Request-Id; every data document carries a query_id. Every timestamp is ISO 8601 with an offset. Dates you send are read in the client’s timezone. Weeks start on Monday.

Authentication

Exchange the client id and secret you received from the workspace owner for an opaque token (OAuth 2 client credentials, RFC 6749 §4.4). Send it as Authorization: Bearer …. Renew before expires_in; do not parse the token. A revoked or deleted client’s tokens stop working on the next request.

# 1. Get a token
curl -X POST 'https://api.vibeback.io/metrics-exchange/v1/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&client_id=<id>&client_secret=<secret>'

# 2. Check the time windows
curl 'https://api.vibeback.io/metrics-exchange/v1/time' -H 'Authorization: Bearer <token>'

# 3. See every metric you may ask for
curl 'https://api.vibeback.io/metrics-exchange/v1/catalogue' -H 'Authorization: Bearer <token>'

# 4. Dry run: the exact shape, zero values
curl 'https://api.vibeback.io/metrics-exchange/v1/data?metrics=*&range=last_7_days&group=day&dry_run=true' -H 'Authorization: Bearer <token>'

# 5. Real numbers, yesterday, as CSV
curl 'https://api.vibeback.io/metrics-exchange/v1/data?metrics=*&range=yesterday&format=csv' -H 'Authorization: Bearer <token>'

Time

GET /time returns the provider clock, your client’s timezone, data_as_of and the exact window of every shortcut (to is exclusive; last_7_days excludes today; this_week and this_month include it)./data echoes the same window in period, so both sides always mean the same “today”. Bucket boundaries are exact instants: a daylight-saving night never merges or loses an hour.

Catalogue

GET /catalogue lists only the metrics your client may ask for, each with its id, version, label, description, unit, kind, allowed breakdowns, available_from and a sample_point — so you can build your mapping before any real data flows. Only count and sum may be added across periods; never add distinct, ratio orgauge. A ratio always carries its numerator and denominator.

Data

GET /data takes these parameters (or POST /data with the same names as a JSON body). Give exactly one of from + to, range or date.

metricsRequired. Comma-separated ids (a JSON array on POST), or * alone for every ticked metric.
fromDate or date-time in the client’s timezone (or with an explicit offset). Use with to.
toExclusive end of the window.
rangeA shortcut from /time: today, yesterday, this_week, last_7_days, this_month, last_month.
dateOne calendar day, YYYY-MM-DD, in the client’s timezone.
grouphour, day, week (Monday) or month — or omit it for one total per metric.
breakdownOne dimension the client has ticked and the level offers (website, channel, …).
timezoneAn IANA zone, only if the client allows overrides.
formatjson, xml or csv (or send Accept). Default JSON.
dry_runtrue returns the exact document shape with zero values — no database work.
pageThe opaque cursor from next_page or X-Next-Page.

Upsert on (metric id, start, breakdown) — never append. final: false marks an open period; a closed period can still change when a record is restored from Trash or permanently deleted, or a payment is refunded. Breakdown groups smaller than 5 are merged into Other. A dry run (dry_run=true) returns the full document with zeros and costs a tenth of a request.

Daily pull

Most receivers pull once a day. A day runs from midnight to midnight in your client’s timezone, which /time and every answer state. Every VibeBack number is stamped with the server’s clock when it happens, so yesterday is complete and final: true as soon as your midnight has passed. Pull the last 7 days rather than only yesterday: one request still carries every metric, and upserting it picks up the corrections described above. For history, ask one calendar month at a time, starting each metric at its own available_from. A whole year in one request is over the 10,000-point cap and is refused with TOO_MANY_POINTS. A window that starts before any requested metric’s available_from is refused with RANGE_BEFORE_AVAILABLE; ask for a metric that started recently in its own request.

# Every day, after midnight in your client's timezone: the last 7 full days,
# one point per metric per day. Upsert on (metric, start, breakdown) so later corrections replace earlier values.
curl 'https://api.vibeback.io/metrics-exchange/v1/data?metrics=*&range=last_7_days&group=day&format=csv' -H 'Authorization: Bearer <token>'

# One chosen day
curl 'https://api.vibeback.io/metrics-exchange/v1/data?metrics=*&date=2026-10-25&format=csv' -H 'Authorization: Bearer <token>'

# First run: fetch history one calendar month per request (at most 31 points per metric).
# Start each metric at its own available_from (see /catalogue); an earlier month is refused with RANGE_BEFORE_AVAILABLE.
curl 'https://api.vibeback.io/metrics-exchange/v1/data?metrics=*&from=2026-09-01&to=2026-10-01&group=day&format=csv' -H 'Authorization: Bearer <token>'

Formats and paging

JSON is the master shape. XML is the same tree with fixed element names, validated by /schema.xsd. CSV is long format, one row per point, with these 18 columns: query_id, dry_run, metric_id, metric_version, label, unit, kind, start, end, value, currency, numerator, denominator, final, breakdown_name, breakdown_value, timezone, data_as_of. An answer is at most 10,000 points; a longer one is paged from a frozen snapshot — follow next_page, the X-Next-Page header or the Link: rel="next"header until it is empty. A cursor that expired or belongs to another query answers INVALID_RANGE: start again from page one.

The spec files https://api.vibeback.io/metrics-exchange/v1/openapi.json (OpenAPI 3.1) and https://api.vibeback.io/metrics-exchange/v1/schema.xsd need a token, like every door except /token.

Errors

Every error is Problem Details JSON (RFC 9457), whatever format you asked for, with a stable code.

INVALID_CLIENT401Client authentication failed
TOKEN_EXPIRED401Access token expired or revoked
CLIENT_DISABLED403Client disabled
ACCOUNT_SUSPENDED403Account suspended
SCOPE_DISABLED403Data exports are not enabled for this level
METRIC_NOT_ALLOWED403Metric not available to this client
BREAKDOWN_NOT_ALLOWED403Breakdown not available to this client
INVALID_RANGE400Invalid period
RANGE_BEFORE_AVAILABLE400Period starts before the data is available
TOO_MANY_POINTS400Too many points
INVALID_TIMEZONE400Invalid timezone
FORMAT_NOT_ALLOWED406Format not allowed
RATE_LIMITED429Rate limited
NOT_FOUND404Not found
UNAVAILABLE503Service unavailable

Limits

Free, with fair-use limits shown to the owner on their screen: by default 1,000 data requests per client per day (a dry run counts 0.1), 20 token calls a minute per address and client, 60 a minute per address, 60 calls a minute per client to /health, /time, /catalogue and the spec files together, and 10,000 points per answer. Over a limit you get RATE_LIMITED with Retry-After — never partial data.

Receiver checklist

  1. Store the id and secret; get a token; renew before it expires.
  2. Call /time once a day and after any clock or daylight-saving doubt.
  3. Call /catalogue once a day, on METRIC_NOT_ALLOWED, and when /health’s metrics_enabled changes.
  4. Test your pipeline with dry_run=true before go-live.
  5. Pull /data no faster than the client’s freshness interval. Upsert. Show provisional points as such.
  6. Follow paging until it is empty; on INVALID_RANGE for a cursor, restart from page one.
  7. Watch notices for metric withdrawals (30 days’ notice).

Conformance

Check any provider — VibeBack or your own — with the conformance script (Python 3.11+, standard library only):metrics-exchange-conformance.py.

python3 metrics-exchange-conformance.py --base https://api.vibeback.io/metrics-exchange/v1 \
  --client-id <id> --client-secret <secret> --formats

Metrics VibeBack offers

A workspace owner ticks which of these a client may pull, per level. Platform totals exclude internal workspaces; workspace and website figures count everything.

IdLabelKind / unitLevelsBreakdownsAvailable from
signupsSignupsNew VibeBack user accounts, including invited teammates, by account creation time. Super admins are excluded; deleted accounts are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform—2026-01-30
workspaces_createdNew workspacesNew workspaces, by creation time. Deleted workspaces are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform—2026-05-14
websites_addedWebsites addedWebsites added to a workspace, verified or not, by the time they were added. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-01-30
websites_verifiedWebsites verifiedWebsites whose ownership was verified, by verification time. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-01-30
websites_liveWebsites liveWebsites where the VibeBack widget loaded on the site itself for the first time, by that time. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-10-09
members_joinedMembers joinedPeople who joined a workspace, by join time, including the owner who created it; someone who later left still counts in the period they joined. A person in two workspaces counts once in each, so platform totals equal the sum of workspaces. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-05-14
invitations_sentInvitations sentTeam invitations sent, by sending time, whatever happened to them afterwards. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-07-15
membersMembersWorkspace members at the end of each period: joined before it and not yet left or removed. Suspended members still count. A person in two workspaces counts once in each. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.gauge / countPlatform · Workspace—2026-05-14
active_membersMembers who signed inDistinct people who signed in during the period. Someone who signs in to two workspaces counts in each workspace but once in platform totals, so platform totals can be lower than the sum of workspaces. Platform totals exclude super admins. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.distinct / countPlatform · Workspace—2026-08-25
conversationsConversationsCustomer conversations started in the period, on every channel. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitechannel (Platform, Workspace, Website); website (Workspace)2026-08-05
conversations_handed_overHanded to a personConversations the bot handed to a person, by hand-over time. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitechannel (Platform, Workspace, Website); website (Workspace)2026-08-05
handover_wait_timeAverage wait for a personAverage time from the bot handing a conversation to a person until the first reply from a person, for conversations first answered in the period. A hand-over nobody has answered yet is not counted until someone does. numerator = total seconds, denominator = conversations answered; value = numerator ÷ denominator. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / secondsPlatform · Workspace · Websitechannel (Platform, Workspace, Website); website (Workspace)2026-08-05
bot_resolution_rateResolved by the botOf the conversations finished in the period, the share the bot resolved alone: never assigned, never handed over, no agent message. numerator = resolved by the bot, denominator = finished; value = numerator ÷ denominator × 100. Finish time is when it was resolved or closed; older conversations with neither use their last update time. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / percentPlatform · Workspace · Websitechannel (Platform, Workspace, Website); website (Workspace)2026-08-05
bot_repliesBot repliesMessages the bot sent, by sending time, including greetings and automated flow messages. Messages in conversations that are in Trash or permanently deleted are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitechannel (Platform, Workspace, Website); website (Workspace)2026-08-05
agent_repliesAgent repliesMessages people on the team sent to customers in conversations, by sending time. Messages in conversations that are in Trash or permanently deleted are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitechannel (Platform, Workspace, Website); website (Workspace)2026-08-05
billable_sessionsBillable chat sessionsChat sessions that count toward billing (one visitor, one website, 24 hours), by start time. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-07-31
tickets_createdTickets createdSupport tickets created in the period, from any source. Tickets without a website count in workspace totals only. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-07-29
tickets_resolvedTickets resolvedTickets resolved in the period, by resolution time, or close time for a ticket closed without being resolved. Merged tickets are not counted. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-07-29
first_response_timeAverage first response timeAverage time from ticket creation to its first response, for tickets first answered in the period. numerator = total seconds, denominator = tickets answered; value = numerator ÷ denominator. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / secondsPlatform · Workspace · Websitewebsite (Workspace)2026-07-29
resolution_timeAverage resolution timeAverage time from ticket creation to resolution, or to close for a ticket closed without being resolved, for tickets resolved in the period. Reopening a ticket takes it out of the period it was resolved in; it counts again, from creation, when it is resolved again. Merged tickets are not counted. numerator = total seconds, denominator = tickets resolved; value = numerator ÷ denominator. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / secondsPlatform · Workspace · Websitewebsite (Workspace)2026-07-29
sla_met_rateResolved within SLA targetOf the tickets resolved in the period that had a resolution target (an SLA policy), the share resolved within it. Tickets without a target are not counted; merged tickets are not counted. numerator = resolved within target, denominator = resolved with a target; value = numerator ÷ denominator × 100. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / percentPlatform · Workspace · Websitewebsite (Workspace)2026-08-19
csatCustomer satisfaction (CSAT)Average ticket satisfaction rating on a 0–100 scale (a 1–5 rating ÷ 5 × 100), by rating time; older ratings without a rating time use the ticket creation time. numerator = sum of ratings, denominator = 5 × ratings. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / percentPlatform · Workspace · Websitewebsite (Workspace)2026-07-29
feedback_submissionsFeedback submissionsFeedback, bug reports and feature requests sent from the widget or the browser extension. Automatically captured JavaScript errors are not counted. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitefeedback type (Platform, Workspace, Website); website (Workspace)2026-07-22
callsCallsVoice calls, inbound and outbound, whatever the outcome, by the time the call started. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspacedirection (Platform, Workspace)2026-07-25
talk_timeTalk timeTotal duration of completed calls, in seconds, by the time the call ended. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.sum / secondsPlatform · Workspacedirection (Platform, Workspace)2026-07-25
calls_missedMissed callsInbound calls that ended without being answered (no answer, declined, the caller hung up, or sent to voicemail), by the time the call ended. Calls that failed for a technical reason before anyone answered are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-07-25
call_answer_rateCall answer rateOf the inbound calls that ended in the period, the share a person answered. Calls that failed for a technical reason before anyone answered are left out of both numbers. numerator = answered, denominator = inbound calls; value = numerator ÷ denominator × 100. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / percentPlatform · Workspace—2026-07-25
call_wait_timeAverage wait before answerAverage time a caller waited before a person answered, for inbound calls answered and ended in the period. numerator = total seconds waited, denominator = answered calls; value = numerator ÷ denominator. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.ratio / secondsPlatform · Workspace—2026-07-25
emails_receivedEmails receivedInbound emails received into Email Channel mailboxes. Emails in conversations that are in Trash or permanently deleted are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-08-20
emails_sentEmails sentEmails sent from Email Channel mailboxes, by the time they went out; a scheduled email counts when it is sent, and a failed send is not counted. Emails in conversations that are in Trash or permanently deleted are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-08-20
appointments_bookedAppointments bookedAppointments booked in the period, by booking time (not appointment time). Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-08-20
website_sessionsWebsite sessionsVisitor sessions on websites that have the VibeBack widget, by session start. Platform totals exclude VibeBack's own websites. Sessions on websites in Trash are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitecountry (Platform, Workspace, Website); website (Workspace)2026-09-11
website_visitorsUnique website visitorsDistinct visitors (by the browser's visitor id) with at least one session in the period. A visitor on two websites counts once per website. Platform totals exclude VibeBack's own websites. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.distinct / countPlatform · Workspace · Website—2026-09-11
page_viewsPage viewsPages viewed on websites that have the VibeBack widget, by the time VibeBack received each event (a visitor's own clock can be days off; events stamped more than 31 days away from that time are ignored). Platform totals exclude VibeBack's own websites. Events on websites in Trash are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-09-11
widget_opensWidget opensTimes visitors opened the chat widget, by the time VibeBack received each event (a visitor's own clock can be days off; events stamped more than 31 days away from that time are ignored). Platform totals exclude VibeBack's own websites. Events on websites in Trash are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-09-11
customers_addedNew customersCustomer records created in the period. Customers merged into another are not counted. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-06-11
customersCustomersCustomer records at the end of each period: created before it and not moved to Trash by then. Customers merged into another count once, as the customer they were merged into. Permanently deleted customers are not counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.gauge / countPlatform · Workspace—2026-06-11
deals_createdNew dealsDeals created in sales pipelines, by creation time. Deals without a website count in workspace totals only. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-08-27
leads_createdNew leadsLeads that came into the CRM leads inbox (chat, form, WhatsApp, marketplace, import or added by hand), by arrival time. Merged leads and leads in Trash are not counted. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-11-06
leads_convertedLeads turned into dealsLeads converted to a deal in the period, by conversion time. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-11-06
leads_contacted_lateLeads contacted lateLeads whose first-contact time passed before anyone called, emailed, messaged or met them, by the time it passed. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-11-06
deals_wonDeals wonA deal counts as won when it is moved to a stage its pipeline marks as won (or, when the pipeline does not say, a stage named Won), in the period it closed. A deal moved out of a won stage leaves that period. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace · Websitewebsite (Workspace)2026-10-20
deals_won_valueValue of deals wonTotal value of the deals won in the period, by close time, using each deal's current value in the currency recorded on it, never re-converted; in single-currency mode, deals in other currencies are reported as unconverted_count. Won deals without a value are not counted. A deal counts as won when it is moved to a stage its pipeline marks as won (or, when the pipeline does not say, a stage named Won), in the period it closed. A deal moved out of a won stage leaves that period. Records in Trash or permanently deleted are not counted; restoring one from Trash counts it again. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.sum / currencyPlatform · Workspace—2026-10-20
paymentsPayments collectedPayments collected (completed, live mode), by the time the money arrived; older payments without a payment time use their creation time. Values are the amount recorded at payment time, never re-converted; in single-currency mode, payments in other currencies are reported as unconverted_count. A refunded payment leaves the period it was collected in. Test-mode payments are never counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.sum / currencyPlatform · Workspace—2026-08-20
payments_countPaymentsNumber of payments collected (completed, live mode), by payment time, in any currency. A refunded payment leaves the period it was collected in. Test-mode payments are never counted. Platform totals exclude workspaces VibeBack marks as internal; workspace and website figures count everything.countPlatform · Workspace—2026-08-20