Get Analytics Report
curl --request GET \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "analytics_report",
"from": "2023-12-25",
"until": "2023-12-25",
"bucket": "day",
"time_zone": "Europe/Berlin",
"buckets": [
{
"local_start": "2026-08-09T12:00:00.000Z",
"bucket_end": "2026-08-09T12:00:00.000Z",
"local_date": "2023-12-25",
"local_end_date": "2023-12-25",
"post_count": 1,
"totals": {
"views": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"impressions": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"comments": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"reactions": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"shares": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"saves": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"link_clicks": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
}
}
}
],
"entries": [
{
"object": "post_analytics",
"post": "send_01JABCDEF",
"group": "launch-2026-08",
"channel": "x",
"published_at": "2026-08-09T12:00:00.000Z",
"state": "pending",
"metrics": {
"views": 1,
"impressions": 1,
"comments": 1,
"reactions": 1,
"shares": 1,
"saves": 1,
"link_clicks": 1
},
"fetched_at": "2026-08-09T12:00:00.000Z",
"provider_as_of": "2026-08-09T12:00:00.000Z",
"next_automatic_refresh_at": "2026-08-09T12:00:00.000Z",
"last_error": {
"code": "<string>",
"message": "<string>",
"at": "2026-08-09T12:00:00.000Z"
}
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}Analytics
Get Analytics Report
Get current totals for posts published in each day or week. The totals use the latest stored value for each Post. Past buckets can increase after a refresh.
GET
/
workspaces
/
{workspace_id}
/
analytics
Get Analytics Report
curl --request GET \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "analytics_report",
"from": "2023-12-25",
"until": "2023-12-25",
"bucket": "day",
"time_zone": "Europe/Berlin",
"buckets": [
{
"local_start": "2026-08-09T12:00:00.000Z",
"bucket_end": "2026-08-09T12:00:00.000Z",
"local_date": "2023-12-25",
"local_end_date": "2023-12-25",
"post_count": 1,
"totals": {
"views": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"impressions": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"comments": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"reactions": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"shares": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"saves": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
},
"link_clicks": {
"value": 1,
"coverage": {
"total_posts": 1,
"fetched_posts": 1,
"failed_posts": 1
}
}
}
}
],
"entries": [
{
"object": "post_analytics",
"post": "send_01JABCDEF",
"group": "launch-2026-08",
"channel": "x",
"published_at": "2026-08-09T12:00:00.000Z",
"state": "pending",
"metrics": {
"views": 1,
"impressions": 1,
"comments": 1,
"reactions": 1,
"shares": 1,
"saves": 1,
"link_clicks": 1
},
"fetched_at": "2026-08-09T12:00:00.000Z",
"provider_as_of": "2026-08-09T12:00:00.000Z",
"next_automatic_refresh_at": "2026-08-09T12:00:00.000Z",
"last_error": {
"code": "<string>",
"message": "<string>",
"at": "2026-08-09T12:00:00.000Z"
}
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}{
"type": "https://www.openpmm.com/docs/reference/errors#public_invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request body does not match the public contract.",
"instance": "urn:openpmm:request:req_01JABCDEF",
"code": "public_invalid_request",
"category": "validation",
"request_id": "req_01JABCDEF",
"retryable": false,
"retry": {
"safety": "not_retryable",
"after": null
},
"user_action": "check_request",
"errors": [
{
"pointer": "/posts/0/destination_id",
"code": "custom",
"detail": "Publishing an entry requires a destination."
}
]
}Authorizations
Send an account API key in the Authorization: Bearer <key> header.
Headers
Optional request ID. OpenPMM returns this value when it is valid. Otherwise, OpenPMM creates a request ID.
Maximum string length:
128Path Parameters
Unique workspace ID.
Example:
"ws_01JABCDEF"
Query Parameters
First local publication date to include.
Exclusive local publication date limit.
Publication cohort size.
Available options:
day, week Return only entries for this publishing channel.
Available options:
bluesky, facebook, instagram, threads, mastodon, x, linkedin, tiktok, youtube Maximum number of items to return.
Required range:
1 <= x <= 100The next_cursor value from the previous page. Send this value without changes.
Response
The analytics report.
Allowed value:
"analytics_report"Available options:
day, week Example:
"Europe/Berlin"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
