Skip to content
DocsAnalytics

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.

EndpointWhat it doesScope
POST /v1/metrics/exportsQueue a CSV or JSON export of brand metricsanalytics.export
GET /v1/metrics/exportsThe caller's recent metrics exports, newest firstanalytics.export
GET /v1/metrics/exports/{requestId}Read the caller's metrics export and its short-lived download linkanalytics.export
GET /v1/metrics/exports/{requestId}/contentDownload the file after rechecking the requester, scope and its signatureanalytics.export
GET /v1/events/activationRead first-run milestones for the organizationany key
POST /v1/events/activationCount a first-run step for the organizationany 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

FieldTypeRequiredDescription
format"csv" or "json"yes
fromstringyes
tostringyes
brandIdsstring (uuid)[]no
subjectType"channel" or "delivery"no
subjectIdsstring (uuid)[]no
networksstring[]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
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"
  ]
}'
TypeScript
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();
Response 202
{
  "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
curl -X GET "https://app.postbroad.com/v1/metrics/exports" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/metrics/exports", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
requestIdpathyesstring (uuid)

Response 200: MetricsExportView. The export

Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal, 503 unavailable.

curl
curl -X GET "https://app.postbroad.com/v1/metrics/exports/<requestId>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/metrics/exports/<requestId>", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
requestIdpathyesstring (uuid)
orgqueryyesstring (uuid)
expiresqueryyesstring
signaturequeryyesstring

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
curl -X GET "https://app.postbroad.com/v1/metrics/exports/<requestId>/content?org=<org>&expires=<expires>&signature=<signature>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
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
curl -X GET "https://app.postbroad.com/v1/events/activation" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/events/activation", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

FieldTypeRequiredDescription
event"wizard_step"yes
step"kind" or "brand" or "connect" or "post" or "next"yes
kindOrgKindno

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
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"
}'
TypeScript
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();
Response 200
{
  "counted": false
}

Schemas

Every type the operations above use

#ActivationEventInput

FieldTypeRequiredDescription
event"wizard_step"yes
step"kind" or "brand" or "connect" or "post" or "next"yes
kindOrgKindno

#ActivationEventResult

FieldTypeRequiredDescription
countedbooleanyes

#ActivationMilestones

FieldTypeRequiredDescription
signupbooleanyes
firstChannelbooleanyes
firstPublishedPostbooleanyes
firstTeammatebooleanyes
firstAgentbooleanyes
wizard"kind" or "brand" or "connect" or "post" or "next"[]yes

#CostEstimate

FieldTypeRequiredDescription
unitstringyes
amountMicrosintegeryes
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.

FieldTypeRequiredDescription
deliveryIdstring (uuid)yes
channelIdstring (uuid)yes
state"sending" or "accepted" or "processing" or "published" or "unknown"yes
claimedAtstring (date-time) or nullyes
versionNointegeryes

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

FieldTypeRequiredDescription
format"csv" or "json"yes
fromstringyes
tostringyes
brandIdsstring (uuid)[]no
subjectType"channel" or "delivery"no
subjectIdsstring (uuid)[]no
networksstring[]no

#MetricsExportList

FieldTypeRequiredDescription
dataMetricsExportView[]yes

#MetricsExportView

A metrics export: queued, built by the export worker, then downloadable through a short-lived link signed for its requester.

FieldTypeRequiredDescription
idstring (uuid)yes
state"queued" or "running" or "done" or "failed"yes
createdAtstring (date-time)yes
finishedAtstring (date-time) or nullyes
expiresAtstring (date-time) or nullyes
errorCodestring or nullyes
downloadUrlstring (uri) or nullyes
format"csv" or "json"yes
specHashstringyes
excludedNetworksany[]yes
fromstringyes
tostringyes
brandIdsstring (uuid)[] or nullyes

#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

FieldTypeRequiredDescription
channelIdstring (uuid)yes
networkNetworkyes
handlestring or nullyes
scheduledAtstring (date-time) or nullyes
payloadHashstringyes
payloadPreviewPayloadyesWhat will be sent to one destination, from the frozen payload model.
manualHandoffobjectno
preflightPreflightResultyes
pendingChecksstring[]yes
costCostEstimate[]yes
verificationLevelVerificationLevelyes

#PreviewPayload

What will be sent to one destination, from the frozen payload model.

FieldTypeRequiredDescription
v1yes
orgIdstring (uuid)yes
brandIdstring (uuid)yes
postVersionIdstring (uuid)yes
contentHashstringyes
variantIdstring (uuid)yes
channelIdstring (uuid)yes
networkstringyes
connectorVersionstringyes
destinationobjectyes
intendedVisibility"public" or "followers" or "private" or "draft" or "inbox" or "scheduled_native"yes
aiLabelbooleanyes
utmmap of stringyes
partsobject[]yes

#PreviewResult

FieldTypeRequiredDescription
receiptstringyes
expiresAtstring (date-time)yes
postIdstring (uuid)yes
versionNointegeryes
contentHashstringyes
mode"schedule" or "publish_now"yes
blockedbooleanyes
requiresReviewbooleanyes
destinationsPreviewDestination[]yes
totalCostCostEstimate[]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.

FieldTypeRequiredDescription
typestringyes
titlestringyes
statusintegeryes
codeErrorCodeyes
detailstringyes
requestIdstringyes
retryablebooleanyes
errorsProblemItem[]no
previewPreviewResultno
currentRevisionintegerno
alreadyDispatchingDispatchingRef[]no
limitobjectno
retryAfterSecondsintegerno

#ProblemItem

FieldTypeRequiredDescription
pathstringyes
rulestringyes
messagestringyes
channelIdstring (uuid) or nullno

#VerificationLevel

Type: "full" or "url_only" or "accepted_no_readback" or "manual"

Last generated 21 Nov 2026, from the contracts the API runs on.