Tracking Plan API

Use our tracking plan API to programmatically manage your tracking plans.

danger
This API is deprecated. See Data Catalog API to create and manage your tracking plans programmatically.

The Tracking plan API lets you programmatically create and manage your tracking plans. You can use the API to:

  • Create/update/fetch tracking plans associated with your workspace
  • Define tracking plan rules
  • Create/update tracking plan configurations for a particular source
  • Link and unlink a source/events to a tracking plan
  • Delete a tracking plan

Prerequisites

To use the tracking plan API successfully:

info
For production use cases, RudderStack recommends using a service access token instead of personal access token.

API authorization

RudderStack uses Basic Authentication for authenticating all API requests.

info
All the popular HTTP clients (e.g. CURL, Postman, HTTPie) have default support for basic authentication.

The basic authentication for this API requires a username and password, where:

  • The username is the email address associated with your RudderStack workspace.
  • The password is the service access token generated above.
success
You can use this Basic Authentication Header Generator to generate the HTTP header.

For example, if the email address is name@surname.com and the service access token is 1zl4GJkLu0HsBdrDK88NgYZzY2E, your request must have the following HTTP header:

Authorization: Basic bmFtZUBzdXJuYW1lLmNvbToxemw0R0prTHUwSHNCZHJESzg4TmdZWnpZMkU=
info
In case of an Invalid Authorization Header error, verify your email address and the service access token.

Base URL

Use the base URL for your API requests depending on your region:

Tracking plan API usage

Tracking plan APIDescription
Tracking PlansThis section contains all the requests and the examples related to:

  • Creating a tracking plan
  • Fetching a single or all tracking plans
  • Updating a tracking plan
  • Upserting a tracking plan
  • Deleting a tracking plan
Tracking Plan RulesThis section contains all the requests and the examples related to setting the tracking plan rules like:

  • Creating events
  • Fetching all events
  • Fetching all events linked to a tracking plan
  • Updating events by ID
  • Linking or unlinking events from a tracking plan
  • Deleting events
It also contains upsert and deletion requests for all non-track rules (applicable for identify, group, page, and screen events) like:

  • Creating or updating a non-track rule for a tracking plan
  • Deleting a non-track rule mapped to a tracking plan
Source Tracking Plan ConnectionsThis section contains all the requests and the examples related to tracking plan configurations like:

  • Creating or updating tracking plan configurations for a source ID
  • Fetching all tracking plan configurations by source ID
  • Fetching all sources connected to a tracking plan
  • Linking or unlinking a source to a tracking plan

Event structure

To perform the tracking plan validation successfully, your event payload structure must conform to the standard RudderStack event spec.

See the following sample event payloads for more information:

You can also see the example request in the Create Tracking Plan API for the event formatting structure.



Questions? Contact us by email or on Slack