View Modal Basic report

View Modal Basic report

GET https://api.ocamba.com/v1/hood/reports/modals/basic
The Modal Basic Report provides aggregated metrics on user interactions with modals, including views, responses, completion rates, NPS scores, and engagement statistics across partners, containers, and variations.

Tip
For easier search, Reports API gives you the possibility of using one of the following labels: today, yesterday, last-7-days, last-30-days, last-24-hours, this-month, last-month, current-hour, last-hour, last-48-hours, last-2-days, month-to-date, month-to-yesterday, quarter-to-date.
Note

Some metrics in the Modals Basic Report are modal-type specific:

  • NPS-specific metrics are populated only for NPS modals.
  • Helpful-specific metrics (e.g. likes, dislikes, helpful_rate) are populated only for Helpful modals.
    When a metric does not apply to the selected modal type, its value will be returned as 0.

Rate limits:

  • Burst: 10/s
  • Steady: 150/m

Query parameters

parameters

Response schemas

curl -X GET \
 "https://api.ocamba.com/v1/hood/reports/modals/basic" \
  -H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v1/hood/reports/modals/basic';
const options = {
  method: 'GET',
  headers: {
    Authorization: `Bearer {TOKEN}`
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v1/hood/reports/modals/basic");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

200 OK

[
  {
    "modal_id": "1030448",
    "modal_type": "nps",
    "avg_score": 6.82,
    "profiles": 223,
    "comments": 57,
    "promoters": 5,
    "passives": 200,
    "detractors": 55,
    "total_responses": 800,
    "response_rate": 78.86,
    "completion_rate": 48.82,
    "likes": 0,
    "dislikes": 0,
  },
  {
    "modal_id": "1030449",
    "modal_type": "helpful",
    "avg_score": 0.0,
    "profiles": 220,
    "comments": 57,
    "promoters": 0,
    "passives": 0,
    "detractors": 0,
    "total_responses": 800,
    "response_rate": 78.86,
    "completion_rate": 48.82,
    "likes": 600,
    "dislikes": 200,
  },
]

400 Bad Request

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

{
  "code": 500,
  "title": "Internal server error.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses