Analytics
Export brand metrics as CSV or JSON, and read the organization's first-run milestones.
6 operations, every one needs an API key. Read the concepts first.
Every call goes to https://app.postbroad.com; see Authentication and the error catalogue.
| Endpoint | What it does | Scope |
|---|---|---|
POST /v1/metrics/exports | Queue a CSV or JSON export of brand metrics | analytics.export |
GET /v1/metrics/exports | The caller's recent metrics exports, newest first | analytics.export |
GET /v1/metrics/exports/{requestId} | Read the caller's metrics export and its short-lived download link | analytics.export |
GET /v1/metrics/exports/{requestId}/content | Download the file after rechecking the requester, scope and its signature | analytics.export |
GET /v1/events/activation | Read first-run milestones for the organization | any key |
POST /v1/events/activation | Count a first-run step for the organization | any key |
#Operations
#Queue a CSV or JSON export of brand metrics
POST/v1/metrics/exports
Operation createMetricsExport. Needs a key with the scope analytics.export.
Needs an interactive member session and analytics.export on every brand in the request. The period must fit within the plan's analytics history. YouTube numbers are always left out.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: MetricsExportInput
| Field | Type | Required | Description |
|---|---|---|---|
format | "csv" or "json" | yes | |
from | string | yes | |
to | string | yes | |
brandIds | string (uuid)[] | no | |
subjectType | "channel" or "delivery" | no | |
subjectIds | string (uuid)[] | no | |
networks | string[] | no |
Response 202: MetricsExportView. The durable export request
Errors: 400 bad_request, 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal, 503 unavailable.
curl -X POST "https://app.postbroad.com/v1/metrics/exports" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"format": "csv",
"from": "string",
"to": "string",
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"subjectType": "channel",
"subjectIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"networks": [
"string"
]
}'const res = await fetch("https://app.postbroad.com/v1/metrics/exports", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"format": "csv",
"from": "string",
"to": "string",
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"subjectType": "channel",
"subjectIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"networks": [
"string"
]
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"createdAt": "2026-10-21T09:00:00Z",
"finishedAt": "2026-10-21T09:00:00Z",
"expiresAt": "2026-10-21T09:00:00Z",
"errorCode": "string",
"downloadUrl": "https://example.com",
"format": "csv",
"specHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"excludedNetworks": [
null
],
"from": "string",
"to": "string",
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
]
}#The caller's recent metrics exports, newest first
GET/v1/metrics/exports
Operation listMetricsExports. Needs a key with the scope analytics.export.
Needs an interactive member session. Returns at most the 20 newest exports the caller asked for; an export whose brands or period the caller may no longer see is left out.
Response 200: MetricsExportList. The caller's recent metrics exports that current access still allows
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal, 503 unavailable.
curl -X GET "https://app.postbroad.com/v1/metrics/exports" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/metrics/exports", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"createdAt": "2026-10-21T09:00:00Z",
"finishedAt": "2026-10-21T09:00:00Z",
"expiresAt": "2026-10-21T09:00:00Z",
"errorCode": "string",
"downloadUrl": "https://example.com",
"format": "csv",
"specHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"excludedNetworks": [
null
],
"from": "string",
"to": "string",
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
]
}
]
}#Read the caller's metrics export and its short-lived download link
GET/v1/metrics/exports/{requestId}
Operation getMetricsExport. Needs a key with the scope analytics.export.
Needs an interactive member session and the access the request was made with.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
requestId | path | yes | string (uuid) |
Response 200: MetricsExportView. The export
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal, 503 unavailable.
curl -X GET "https://app.postbroad.com/v1/metrics/exports/<requestId>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/metrics/exports/<requestId>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"createdAt": "2026-10-21T09:00:00Z",
"finishedAt": "2026-10-21T09:00:00Z",
"expiresAt": "2026-10-21T09:00:00Z",
"errorCode": "string",
"downloadUrl": "https://example.com",
"format": "csv",
"specHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"excludedNetworks": [
null
],
"from": "string",
"to": "string",
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
]
}#Download the file after rechecking the requester, scope and its signature
GET/v1/metrics/exports/{requestId}/content
Operation downloadMetricsExport. Needs a key with the scope analytics.export.
Reached through the signed downloadUrl of the export. The file is CSV or JSON, as the request asked; its Content-Type says which.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
requestId | path | yes | string (uuid) | |
org | query | yes | string (uuid) | |
expires | query | yes | string | |
signature | query | yes | string |
Response 200. A private CSV or JSON file
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal, 503 unavailable.
curl -X GET "https://app.postbroad.com/v1/metrics/exports/<requestId>/content?org=<org>&expires=<expires>&signature=<signature>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/metrics/exports/<requestId>/content?org=<org>&expires=<expires>&signature=<signature>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();#Read first-run milestones for the organization
GET/v1/events/activation
Operation getActivationMilestones. Any API key of the organization may call it.
Cloud only. Derived from current authorized organization records; wizard steps are separately reported.
Response 200: ActivationMilestones. Observed milestones
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/events/activation" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/events/activation", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"signup": false,
"firstChannel": false,
"firstPublishedPost": false,
"firstTeammate": false,
"firstAgent": false,
"wizard": [
"kind"
]
}#Count a first-run step for the organization
POST/v1/events/activation
Operation recordActivationEvent. Any API key of the organization may call it.
Cloud only. One count per organization and step; repeating a step answers counted false. Never blocks the first run: callers ignore a failure.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: ActivationEventInput
| Field | Type | Required | Description |
|---|---|---|---|
event | "wizard_step" | yes | |
step | "kind" or "brand" or "connect" or "post" or "next" | yes | |
kind | OrgKind | no |
Response 200: ActivationEventResult. Whether this step was counted now
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/events/activation" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"event": "wizard_step",
"step": "kind",
"kind": "creator"
}'const res = await fetch("https://app.postbroad.com/v1/events/activation", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"event": "wizard_step",
"step": "kind",
"kind": "creator"
}),
});
const data = await res.json();{
"counted": false
}Schemas
Every type the operations above use
#ActivationEventInput
| Field | Type | Required | Description |
|---|---|---|---|
event | "wizard_step" | yes | |
step | "kind" or "brand" or "connect" or "post" or "next" | yes | |
kind | OrgKind | no |
#ActivationEventResult
| Field | Type | Required | Description |
|---|---|---|---|
counted | boolean | yes |
#ActivationMilestones
| Field | Type | Required | Description |
|---|---|---|---|
signup | boolean | yes | |
firstChannel | boolean | yes | |
firstPublishedPost | boolean | yes | |
firstTeammate | boolean | yes | |
firstAgent | boolean | yes | |
wizard | "kind" or "brand" or "connect" or "post" or "next"[] | yes |
#CostEstimate
| Field | Type | Required | Description |
|---|---|---|---|
unit | string | yes | |
amountMicros | integer | yes | |
currency | "USD" | yes | |
billedBy | "postbroad" or "third_party" | yes |
#DestinationKind
Type: "feed" or "board" or "subreddit" or "chat" or "channel" or "community" or "group" or "forum" or "list" or "publication" or "organization" or "playlist"
#DispatchingRef
A delivery that had already started (or gone live) when the change committed; it may still publish.
| Field | Type | Required | Description |
|---|---|---|---|
deliveryId | string (uuid) | yes | |
channelId | string (uuid) | yes | |
state | "sending" or "accepted" or "processing" or "published" or "unknown" | yes | |
claimedAt | string (date-time) or null | yes | |
versionNo | integer | yes |
#ErrorCode
Type: "bad_request" or "org_required" or "unauthenticated" or "reauth_required" or "invalid_credentials" or "forbidden" or "not_found" or "method_not_allowed" or "idempotency_key_required" or "idempotency_key_reused" or "request_in_progress" or "revision_mismatch" or "preview_required" or "preview_stale" or "dispatch_started" or "duplicate_risk_unacknowledged" or "conflict" or "validation_failed" or "rule_violation" or "budget_exhausted" or "limit_reached" or "organization_frozen" or "approval_required" or "unsupported_media_type" or "payload_too_large" or "rate_limited" or "internal" or "unavailable" or "busy" or "timeout"
#MetricsExportDocument
Type: string
#MetricsExportInput
The period, brands and format of a metrics export. from and to are UTC days (YYYY-MM-DD); to is not included, and the period is at most 730 days. networks takes network slugs.
| Field | Type | Required | Description |
|---|---|---|---|
format | "csv" or "json" | yes | |
from | string | yes | |
to | string | yes | |
brandIds | string (uuid)[] | no | |
subjectType | "channel" or "delivery" | no | |
subjectIds | string (uuid)[] | no | |
networks | string[] | no |
#MetricsExportList
| Field | Type | Required | Description |
|---|---|---|---|
data | MetricsExportView[] | yes |
#MetricsExportView
A metrics export: queued, built by the export worker, then downloadable through a short-lived link signed for its requester.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
state | "queued" or "running" or "done" or "failed" | yes | |
createdAt | string (date-time) | yes | |
finishedAt | string (date-time) or null | yes | |
expiresAt | string (date-time) or null | yes | |
errorCode | string or null | yes | |
downloadUrl | string (uri) or null | yes | |
format | "csv" or "json" | yes | |
specHash | string | yes | |
excludedNetworks | any[] | yes | |
from | string | yes | |
to | string | yes | |
brandIds | string (uuid)[] or null | yes |
#Network
Type: "facebook" or "instagram" or "threads" or "linkedin" or "bluesky" or "x" or "tiktok" or "youtube" or "google_business_profile" or "reddit" or "telegram" or "discord" or "slack" or "pinterest" or "dribbble" or "mastodon" or "whop" or "twitch" or "kick" or "farcaster" or "vk" or "lemmy" or "mewe" or "nostr" or "listmonk" or "wordpress" or "medium" or "hashnode" or "devto" or "ghost" or "snapchat" or "odnoklassniki" or "tumblr" or "flickr" or "vimeo" or "dailymotion" or "soundcloud" or "beehiiv" or "discourse" or "circle" or "mighty_networks" or "viber" or "line" or "hatena_blog" or "wechat" or "kuaishou" or "zalo" or "band" or "pixelfed" or "misskey" or "peertube" or "hive" or "lens" or "moltbook" or "facebook_groups" or "facebook_profile" or "substack_notes" or "skool"
#OrgKind
Type: "creator" or "agency" or "developer"
#PreflightResult
Type: object
#PreviewDestination
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string (uuid) | yes | |
network | Network | yes | |
handle | string or null | yes | |
scheduledAt | string (date-time) or null | yes | |
payloadHash | string | yes | |
payload | PreviewPayload | yes | What will be sent to one destination, from the frozen payload model. |
manualHandoff | object | no | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | CostEstimate[] | yes | |
verificationLevel | VerificationLevel | yes |
#PreviewPayload
What will be sent to one destination, from the frozen payload model.
| Field | Type | Required | Description |
|---|---|---|---|
v | 1 | yes | |
orgId | string (uuid) | yes | |
brandId | string (uuid) | yes | |
postVersionId | string (uuid) | yes | |
contentHash | string | yes | |
variantId | string (uuid) | yes | |
channelId | string (uuid) | yes | |
network | string | yes | |
connectorVersion | string | yes | |
destination | object | yes | |
intendedVisibility | "public" or "followers" or "private" or "draft" or "inbox" or "scheduled_native" | yes | |
aiLabel | boolean | yes | |
utm | map of string | yes | |
parts | object[] | yes |
#PreviewResult
| Field | Type | Required | Description |
|---|---|---|---|
receipt | string | yes | |
expiresAt | string (date-time) | yes | |
postId | string (uuid) | yes | |
versionNo | integer | yes | |
contentHash | string | yes | |
mode | "schedule" or "publish_now" | yes | |
blocked | boolean | yes | |
requiresReview | boolean | yes | |
destinations | PreviewDestination[] | yes | |
totalCost | CostEstimate[] | yes |
#Problem
The one error body of every route (RFC 9457 problem details with a stable code). Another organization's resource, a Postbroad-Org the member does not belong to and a resource outside a token's brand allowlist all answer 404 not_found, never 403.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | |
title | string | yes | |
status | integer | yes | |
code | ErrorCode | yes | |
detail | string | yes | |
requestId | string | yes | |
retryable | boolean | yes | |
errors | ProblemItem[] | no | |
preview | PreviewResult | no | |
currentRevision | integer | no | |
alreadyDispatching | DispatchingRef[] | no | |
limit | object | no | |
retryAfterSeconds | integer | no |
#ProblemItem
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | |
rule | string | yes | |
message | string | yes | |
channelId | string (uuid) or null | no |
#VerificationLevel
Type: "full" or "url_only" or "accepted_no_readback" or "manual"
Last generated 21 Nov 2026, from the contracts the API runs on.