How do I pull my OneText reporting through the API?
Last updated: November 3, 2026
Anything in your Reports dashboard can be pulled through the OneText API, so you can bring your data into your own dashboards, spreadsheets, or scripts. You don't need to build the request from scratch: the dashboard generates the exact API call for any report you set up.
What can I pull through the API?
Any report you can generate under Performance → Reports → Custom in your OneText dashboard.
How do I set it up?
Create an API key. In your OneText dashboard, go to Settings → API Credentials and click Add new API key. Under Performance and reporting, select the permission to view report types and generate reports. For full steps, see How do I create or rotate my OneText API key?
Open Custom Reports. Go to Performance → Reports → Custom.
Generate your report. Pick the report you want, set your date range and breakdown, and generate it.
Copy the API request. Click Actions → Show API Example to copy the ready-made request, including the endpoint and auth format.
What does an API request look like?
Here's an example generated with Show API Example:
curl -X POST 'https://onetext.com/api/reports/custom/generate' \
-H 'Content-Type: application/json' \
-H 'Authorization: YOUR_CREDENTIAL' \
-d '{
"type": "merchant_revenue_click_attribution",
"dateFrom": "2026-10-27",
"dateTo": "2026-11-03",
"interval": "day",
"timezone": "US/Eastern"
}'Replace YOUR_CREDENTIAL with your API key. The report type, dates, interval, and timezone in the request will match the settings you picked in the dashboard.
Still have questions?
Contact OneText Support and we'll be happy to help.