AttributionHub Logo

REST API Overview

The AttributionHub REST API allows you to programmatically access the attribution data we collect — including sessions, conversions, contacts, insights, and more. This enables you to build custom dashboards, enrich CRM data, or power advanced marketing analytics.

To begin using the API, you'll first need a valid API key. If you need your API key or need your API key refreshed, please contact your account representative.

Authentication

Every API request must include your domain-specific API key in the request headers:

1Authentication: YOUR_API_KEY
Use Authentication as the header name — not Authorization.
  • API keys are provided with your AttributionHub onboarding and are tied to your primary domain.
  • You can request new or replacement keys at any time.
  • Each key is validated on every request.
  • If your monthly quota is exceeded, a 429 Too Many Requests error will be returned.

Example 429 Response:

1{
2 "error": "API monthly limit exceeded.",
3 "limit": 5000,
4 "used": 5000,
5 "domain": "example.com"
6}
Need a higher quota? Contact your account representative.

Available API Endpoints (Reference)

The API includes several RESTful endpoints, each offering different views of your attribution and conversion data:

EndpointDescription
/contactsView CRM-style contact summaries with session and conversion details
/conversionsRetrieve raw conversion event data with optional filtering
/insightsGet rollup metrics including conversion rates, session stats, and attribution timelines
/pagesAnalyze performance of landing, conversion, and drop-off pages
/sessionsFetch session-level attribution, including conversion and exit events

Each endpoint has its own filtering, pagination, and usage instructions — refer to the individual endpoint docs for full details.


Troubleshooting

Missing API Key Header (401 Unauthorized)

This error occurs when the Authentication header is missing from your request.

Fix:

Ensure every request includes your API key using the correct header name:

1Authentication: YOUR_API_KEY
Use Authentication — not Authorization.

Example Response:

1{
2 "error": "Missing authentication key."
3}

Unauthorized Access (403 Forbidden)

This happens when the provided API key is invalid or unrecognized.

Fix:

  • Double-check that your API key is correct.
  • Make sure it hasn't expired or been rotated.
  • API keys are domain-specific — verify it’s for the correct domain.

Example Response:

1{
2 "error": "Unauthorized access."
3}

Quota Exceeded (429 Too Many Requests)

Your domain has reached its monthly API request quota.

Fix:

You’ll need to upgrade your subscription to increase your limit. Contact your account representative for help.

Example Response:

1{
2 "error": "API monthly limit exceeded.",
3 "limit": 5000,
4 "used": 5000,
5 "domain": "example.com"
6}

Server Errors (5xx – Internal Errors)

If you receive a 5xx status code (like 500 Internal Server Error), the issue is on our end — typically due to a server-side failure or unexpected condition during processing.

When this happens:

  • The request reached AttributionHub's servers but couldn’t be completed due to an internal error.
  • These are not related to your API key or quota, and typically indicate a temporary outage or unexpected failure.

Example Response:

1{
2 "error": "Initialization failed",
3 "details": "Class 'Example' not found"
4}

What you should do:

  • Retry the request after a short delay. Temporary issues may resolve quickly.
  • If the error persists, please contact us immediately so we can investigate and resolve the issue.

Please include your domain name, the endpoint you were trying to access, and the full error message if available.

These types of errors are rare but important to address quickly to maintain data reliability and integration uptime.