API Reference
Integrate Tagstack's martech intelligence directly into your applications and workflows. Scan any website, detect marketing technologies, and generate branded audit reports — all through simple REST endpoints.
Authentication
All API requests require a valid API key passed as a Bearer token in the Authorization header. You can generate an API key from your profile page. API access requires an active paid subscription.
Keep your API key secret. Do not expose it in client-side code, public repositories, or browser requests. If you believe your key has been compromised, regenerate it immediately from your profile.
Base URL
All API endpoints are served from a single base URL. All requests must use HTTPS.
Errors & Rate Limits
The API uses standard HTTP status codes to indicate success or failure. All error responses return a JSON body with an error field describing what went wrong.
| Status | Meaning | What to do |
|---|---|---|
| 200 | Success | Request completed successfully. |
| 400 | Bad Request | Missing or invalid parameters. Check the error message for details. |
| 401 | Unauthorized | API key is missing, invalid, expired, or your subscription is inactive. |
| 404 | Not Found | The requested resource doesn't exist or doesn't belong to you. |
| 429 | Rate Limited | Too many requests. Back off and retry after a short delay. |
| 500 | Server Error | Something went wrong on our end. Retry or contact support. |
API scan limits apply. Each scan consumes one credit from your monthly allowance. When your credits are exhausted, scan requests will return a success: false response. Limits reset at the start of each billing cycle. You can check your remaining credits on your profile page.
Scanning
Core scanning endpoints to analyze any website's marketing technology stack, detect GTM containers, assess configuration health, and retrieve Core Web Vitals.
The primary scanning endpoint. Analyzes a website or GTM container ID and returns a full breakdown of detected containers, their configuration, technologies in use, Core Web Vitals, and Cloudflare DNS status. Responses are cached for 1 hour.
| Parameter | Description | |
|---|---|---|
url string | The domain or GTM container ID to scan. Accepts a bare domain (e.g. stripe.com), a full URL, or a GTM ID (e.g. GTM-KL36Q2B). | Required |
The message field contains a stringified JSON of all detected containers and their full configuration (tags, triggers, variables, consent mode settings, enhanced measurement, etc.). Parse it with JSON.parse() for the complete breakdown.
A lightweight, high-speed scan that returns only the list of technology names detected on a domain. Faster than the full /api/scan endpoint — ideal for bulk lookups, enrichment pipelines, or when you just need to know what technologies a site uses without the full container breakdown.
| Parameter | Description | |
|---|---|---|
url string | The domain to scan. Must be a domain name (e.g. stripe.com), not a GTM container ID. | Required |
Saved Scans
Create persistent, shareable scan reports with optional custom branding. Each saved scan gets a unique URL you can share with clients. Perfect for agencies generating audit reports at scale.
Creates a saved scan report via query parameters. The scan runs asynchronously and returns a unique scan ID with a shareable URL. Useful for simple integrations and browser-based workflows.
| Parameter | Description | |
|---|---|---|
url string | Domain or full URL to scan. | Required |
containerId string | GTM container ID to scan (alternative to url). | Required |
brandName string | Custom brand name displayed on the saved report. | Optional |
brandLogo string | URL to a logo image for the saved report. | Optional |
brandVideoLink string | URL to a video embedded in the report. | Optional |
* Either url or containerId is required — you must provide at least one.
Same as the GET variant, but accepts a JSON body — cleaner for programmatic use, automation pipelines, and when passing multiple optional parameters.
Pro tip for agencies: Use the POST endpoint to generate branded audit reports at scale. Combine with a CRM integration to auto-send reports to prospects after enrichment.
Permanently deletes a saved scan report and its associated storage. The scan URL will no longer be accessible after deletion.
| Parameter | Description | |
|---|---|---|
id string (UUID) | The scan ID returned when the saved scan was created. | Required |
Export
Rebuild a scanned GTM container as a file you can import into a workspace you own — every tag, trigger and variable, ready for Admin → Import Container in Google Tag Manager.
Returns the container as GTM-importable JSON. Pass url to scan a container live, or ssid to export the exact snapshot stored by a saved scan. The response is sent as a file attachment named after the container.
Recognised vendor custom templates (LinkedIn, Reddit, Plausible and others) are embedded with their real source, so those tags arrive fully configured rather than as empty placeholders. Paused tags are omitted — Google Tag Manager strips a paused tag's configuration from the published container, so there is nothing left to rebuild it from.
| Parameter | Description | |
|---|---|---|
url string | GTM container ID to scan and export, e.g. GTM-XXXXXXX. Required unless ssid is given. | Optional |
ssid string (UUID) | Export a saved scan instead of a live one, using the exact data captured at save time. | Optional |
containerId string | Selects one container when a saved scan captured several. Defaults to the container with the most tags. | Optional |
Requires a paid plan. Free organizations receive 402 Payment Required. Each export counts against your plan's monthly container export allowance.
Use Cases
Here's what teams are building with the Tagstack API.
Postman Setup
Import this collection into Postman to start testing all Tagstack API endpoints immediately. You'll just need to set your API key as a variable.
tagstack-api.postman_collection.jsonapi_key to your key