Overview

The DataPulse API provides programmatic access to your analytics workspace, predictive models, and historical datasets. All endpoints use standard HTTP methods and return JSON responses. The base URL for all API requests is:

Base URL
https://api.datapulse.io/v1
Sandbox vs Production Use api-sandbox.datapulse.io for testing. Sandbox credentials auto-refresh daily and do not affect production data.

Authentication

Authenticate your requests using Bearer tokens included in the Authorization header. Generate API keys from your Dashboard > Settings > API Keys.

HTTP Header
Authorization: Bearer dp_live_sk_9x8y7z6w5v4u3t2s1r

Keys prefixed with dp_live_ access production data. Keys prefixed with dp_test_ are scoped to the sandbox environment. Keep your keys secure and rotate them regularly.

Rate Limits

API requests are throttled to ensure platform stability. Limits are applied per API key:

PlanRequests / MinuteRequests / DayConcurrent
Starter6010,0005
Professional300100,00015
EnterpriseUnlimitedUnlimited50

Rate limit headers are included in every response:

Response Headers
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 284
X-RateLimit-Reset: 1698765432

Error Handling

The API uses standard HTTP status codes and returns detailed error objects in the response body:

JSON Error Response
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "The provided API key is invalid or expired.",
    "type": "authentication_error",
    "request_id": "req_8x9y2z3a4b"
  }
}
CodeMeaning
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource does not exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Platform issue

Endpoints

GET /analytics/reports Stable

Retrieve a paginated list of analytics reports generated by your workspace.

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoResults per page (max: 100)
statusstringNoFilter by completed, processing, or failed
Response 200
{
  "data": [
    {
      "id": "rpt_9x8y7z",
      "name": "Q3 Revenue Analysis",
      "status": "completed",
      "created_at": "2024-10-15T14:32:00Z",
      "download_url": "https://cdn.datapulse.io/reports/rpt_9x8y7z.pdf"
    }
  ],
  "pagination": { "total": 42, "page": 1, "next": "/v1/analytics/reports?page=2" }
}
POST /analytics/predict Stable

Submit data points for real-time predictive analysis using your deployed ML models.

ParameterTypeRequiredDescription
model_idstringYesID of the trained prediction model
featuresobjectYesKey-value pairs matching model schema
confidence_thresholdfloatNoMin confidence to return (0.0-1.0)
Request Body
{
  "model_id": "mdl_churn_v2",
  "features": {
    "tenure_months": 14,
    "monthly_spend": 89.50,
    "support_tickets": 3
  }
}
GET /datasets/:id Stable

Fetch metadata and schema information for a specific dataset.

Response 200
{
  "id": "ds_cust_2024",
  "name": "Customer Transactions 2024",
  "row_count": 148205,
  "columns": ["user_id", "amount", "timestamp", "region"],
  "size_mb": 24.8,
  "last_updated": "2024-11-02T09:15:00Z"
}
PUT /workspaces/:id/config Beta

Update workspace-level analytics configuration, retention policies, and data export settings.

Beta Endpoint Configuration changes may take up to 5 minutes to propagate. Backup your current config before applying updates.
Request Body
{
  "retention_days": 90,
  "auto_archive": true,
  "export_format": "parquet",
  "notifications": {
    "email_on_failure": true,
    "slack_webhook": "https://hooks.slack.com/services/..."
  }
}