LogoLogo
  • Contributing to RudderStack
  • Destination_Name
  • LICENSE
  • RudderStack Docs
  • docs
    • FAQ
    • Identity Resolution
    • Home
    • cloud-extract-sources
      • ActiveCampaign Source
      • Bing Ads
      • Chargebee
      • Common Settings
      • Facebook Ads
      • Freshdesk
      • Google Ads Source
      • Google Analytics
      • Google Search Console
      • Google Sheets
      • Cloud Extract Sources
      • Intercom v2
      • Intercom
      • Mailchimp
      • Marketo
      • Mixpanel
      • NetSuite
      • Pipedrive
      • QuickBooks
      • Salesforce Pardot
      • Sendgrid Source
      • Stripe Source
      • Xero
      • Zendesk Chat
      • Zendesk
      • hubspot
        • HubSpot Data Model and Schema Information
        • HubSpot
      • salesforce
        • Salesforce
        • Schema Comparison: RudderStack vs. Segment
    • connections
      • Connection Modes: Cloud Mode vs. Device Mode
    • data-governance
      • Data Governance
      • RudderTyper
      • Data Governance API
      • RudderTyper
      • tracking-plans
        • Tracking Plans
        • Tracking Plan Spreadsheet
    • data-warehouse-integrations
      • Amazon Redshift
      • Azure Data Lake
      • Azure Synapse
      • ClickHouse
      • Databricks Delta Lake
      • Google Cloud Storage Data Lake
      • Google BigQuery
      • Identity Resolution
      • Warehouse Destinations
      • Microsoft SQL Server
      • PostgreSQL
      • Amazon S3 Data Lake
      • Snowflake
      • FAQ
      • Warehouse Schema
    • destinations
      • Destinations
      • Webhooks
      • advertising
        • Bing Ads
        • Criteo
        • DCM Floodlight
        • Facebook App Events
        • Facebook Custom Audience
        • Facebook Pixel
        • Google Ads (gtag.js)
        • Google AdWords Enhanced Conversions
        • Google Adwords Remarketing Lists (Customer Match)
        • Advertising
        • LinkedIn Insight Tag
        • Lotame
        • Pinterest Tag
        • Reddit Pixel
        • Snap Pixel
        • TikTok Ads
      • analytics
        • Amplitude
        • AWS Personalize
        • Chartbeat
        • Firebase
        • FullStory
        • Google Analytics 360
        • Google Analytics
        • Heap.io
        • Hotjar
        • Analytics
        • Indicative
        • Keen
        • Kissmetrics
        • Kubit
        • Lytics
        • Mixpanel
        • Pendo
        • PostHog
        • Quantum Metric
        • Singular
        • adobe-analytics
          • Adobe Analytics Heartbeat Measurement
          • Mobile Device Mode Settings
          • Web Device Mode Settings
          • E-commerce Events
          • Adobe Analytics
          • Setting Up Adobe Analytics in RudderStack
        • google-analytics-4
          • Cloud Mode
          • Device Mode
          • Google Analytics 4
          • Setting up Google Analytics 4
        • profitwell
          • ProfitWell
          • Cloud Mode
          • Device Mode
      • attribution
        • Adjust
        • AppsFlyer
        • Branch
        • Attribution
        • Kochava
        • TVSquared
      • business-messaging
        • Business Messaging
        • Intercom
        • Kustomer
        • Slack
        • Trengo
      • continuous-integration
        • Visual Studio App Center
        • Continuous Integration
      • crm
        • Delighted
        • HubSpot
        • CRM
        • Salesforce
        • Variance
        • Zendesk
      • customer-data-platform
        • Customer Data Platform
        • Segment
      • error-reporting
        • Bugsnag
        • Error Reporting
        • Sentry
      • marketing
        • ActiveCampaign
        • AdRoll
        • Airship
        • Appcues
        • Autopilot
        • Blueshift
        • Braze
        • CleverTap
        • Customer.io
        • Gainsight PX
        • Gainsight
        • Marketing
        • Iterable
        • Klaviyo
        • Leanplum
        • Mailchimp
        • Marketo Lead Import
        • Marketo
        • MoEngage
        • Ometria
        • Pardot
        • Post Affiliate Pro
        • Qualtrics
        • SendGrid
        • Salesforce Marketing Cloud
        • Userlist
        • drip
          • Cloud Mode
          • Device Mode
          • Drip
          • Setting Up Drip in RudderStack
      • productivity
        • Google Sheets
        • Productivity
      • storage-platforms
        • Amazon S3
        • DigitalOcean Spaces
        • Google Cloud Storage
        • Storage Platforms
        • Azure Blob Storage
        • MinIO
        • Redis
      • streaming-platforms
        • Amazon EventBridge
        • Amazon Kinesis Firehose
        • Amazon Kinesis
        • Azure Event Hubs
        • BigQuery Stream
        • Confluent Cloud
        • Google Pub/Sub
        • Streaming Platforms
        • Apache Kafka
      • tag-managers
        • Google Tag Manager
        • Tag Managers
      • testing-and-personalization
        • Algolia Insights
        • Candu
        • Google Optimize
        • A/B Testing & Personalization
        • LaunchDarkly
        • Monetate
        • Optimizely Full Stack
        • Optimizely Web
        • Split.io
        • Statsig
        • VWO (Visual Website Optimizer)
    • get-started
      • RudderStack Cloud vs. RudderStack Open Source
      • Glossary
      • Get Started
      • RudderStack Architecture
    • reverse-etl
      • Amazon Redshift
      • Amazon S3
      • ClickHouse
      • FAQ
      • Google BigQuery
      • Reverse ETL
      • PostgreSQL
      • Snowflake
      • common-settings
        • Importing Data using Models
        • Importing Data using Tables
        • Common Settings
        • Sync Modes
        • Sync Schedule
      • features
        • Airflow Provider
        • Features
        • Models
        • Visual Data Mapper
    • rudderstack-api
      • Data Regulation API
      • HTTP API
      • RudderStack API
      • Personal Access Tokens
      • Pixel API
      • Test API
      • api-specification
        • Application Lifecycle Events Specification
        • API Specification
        • Video Events Specification
        • rudderstack-ecommerce-events-specification
          • Browsing
          • Coupons
          • E-Commerce Events Specification
          • Ordering
          • Promotions
          • Reviewing
          • Sharing
          • Wishlist
        • rudderstack-spec
          • Alias
          • Common Fields
          • Group
          • Identify
          • RudderStack Event Specification
          • Page
          • Screen
          • Track
    • rudderstack-cloud
      • Audit Logs
      • Dashboard Overview
      • Destinations
      • RudderStack Cloud
      • Live Events
      • Connection Modes: Cloud Mode vs. Device Mode
      • Sources
      • Teammates (User Management)
      • connections
        • Adding a Destination
        • Connections
    • rudderstack-open-source
      • Control Plane Setup
      • RudderStack Open Source
      • installing-and-setting-up-rudderstack
        • Developer Machine Setup
        • Docker
        • Data Plane Setup
        • Kubernetes
        • Sending Test Events
    • stream-sources
      • App Center
      • AppsFlyer
      • Auth0
      • Braze
      • Customer.io
      • Extole
      • Event Stream Sources
      • Iterable
      • Looker
      • PostHog
      • Segment
      • Shopify
      • Webhook Source
      • rudderstack-sdk-integration-guides
        • Client-side Event Filtering
        • SDKs
        • AMP Analytics
        • Cordova
        • .NET
        • Go
        • Java
        • Node.js
        • PHP
        • Python
        • React Native
        • Ruby
        • Rust
        • Unity
        • SDK FAQs
        • rudderstack-android-sdk
          • Adding Application Class
          • Flushing Events Periodically
          • Android
        • rudderstack-flutter-sdk
          • Flutter SDK v1
          • Flutter v2
          • Flutter
        • rudderstack-ios-sdk
          • iOS
          • tvOS
          • watchOS
        • rudderstack-javascript-sdk
          • Data Storage in Cookies
          • Detecting Ad-blocked Pages
          • JavaScript
          • JavaScript SDK Enhancements
          • JavaScript SDK FAQs
          • Querystring API
          • Quick Start Guide
          • Version Migration Guide
          • consent-managers
            • Consent Managers
            • OneTrust
    • transformations
      • Access Token
      • FAQ
      • Transformations
      • Transformations API
    • user-guides
      • User Guides
      • administrators-guide
        • Troubleshooting Guide
        • Alerting Guide
        • Bucket Configuration Settings for Event Backups
        • Configuration Parameters
        • Event Replay
        • High Availability
        • Horizontal Scaling
        • Administrator's Guides
        • Infrastructure Provisioning
        • Monitoring and Metrics
        • Okta SSO Setup
        • OneLogin SSO Setup
        • RudderStack Grafana Dashboard
        • Software Releases
      • how-to-guides
        • How to Use Custom Domains
        • How to Develop Integrations for RudderStack
        • How to Configure a Destination via the Event Payload
        • How to Filter Events using Different Methods
        • How to Filter Selective Destinations
        • How to Submit a Pull Request for a New Integration
        • How-to Guides
        • How to Debug Live Destination Events
        • How to Use AWS Lambda Functions with RudderStack
        • create-a-new-destination-transformer-for-rudder
          • Best Practices for Coding Transformation Functions in JavaScript
          • How to Create a New Destination Transformation for RudderStack
        • implement-native-js-sdk-integration
          • How to Add a Device Mode SDK to RudderStack JavaScript SDK
          • How to Implement a Native JavaScript SDK Integration
        • rudderstack-jamstack-integration
          • How to Integrate RudderStack with Your JAMstack Site
          • How to Integrate Rudderstack with Your Angular App
          • How to Integrate Rudderstack with Your Astro Site
          • How to Integrate Rudderstack with Your Eleventy Site
          • How to Integrate Rudderstack with Your Ember.js App
          • How to Integrate Rudderstack with a Gatsby Website
          • How to Integrate Rudderstack with a Hugo Site
          • How to Integrate Rudderstack with Your Jekyll Site
          • How to Integrate Rudderstack with Your Next.js App
          • How to Integrate Rudderstack with Your Nuxt.js App
          • How to Integrate Rudderstack with Your Svelte App
          • How to Integrate Rudderstack with Your Vue App
      • migration-guides
        • Migrating from Blendo to RudderStack
        • Migrating Your Warehouse Destination from Segment to RudderStack
        • Migration Guides
        • Migrating from Segment to RudderStack
  • src
    • @rocketseat
      • gatsby-theme-docs
        • text
          • Home
Powered by GitBook
On this page
  • Prerequisites
  • API authorization
  • Verifying destination events
  • Verifying events for disabled destinations
  • Overriding existing destination configuration
  • Verifying source events
  • Verifying events from a disabled source
  • Verifying events for disabled destinations
  • Verification stages
  • user_transform
  • dest_transform
  • send_to_destination
  • Supported message types
  • FAQs
  • Which destinations are not supported by the Test API?
  • What happens if type is not included in the event payload?
  • Can I disable a particular verification stage in the stage object?
  • Can I override the destination settings specified in the RudderStack dashboard using this API?
  • Contact us

Was this helpful?

  1. docs
  2. rudderstack-api

Test API

Detailed technical description of the RudderStack Test API to verify the event workflow for your configured sources and destinations.

PreviousPixel APINextapi-specification

Last updated 2 years ago

Was this helpful?

The RudderStack Test API offers two endpoints to verify successful event transformation and delivery for a given source-destination setup, without having to refer to the tab.

The Test API is currently not supported for Open-source RudderStack.

Also, some destinations like Apache Kafka, Google Pub/Sub, Google Sheets, etc. are not supported by this API. For the complete list, refer to the section below.

This guide details the various endpoints of the Test API.

Prerequisites

The following prerequisites must be met to use the Test API successfully:

  • You need to set up a source-destination connection in RudderStack. For more details, refer to .

  • You need to generate a to authenticate the API successfully.

API authorization

The Test API uses Basic Authentication for authenticating all the requests.

Basic Authentication concatenates the username and password with a colon (:) in between and encodes it using Base64 encryption.

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 you used to sign up for RudderStack.

  • The password is the personal access token generated previously.

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

Authorization: Basic bmFtZUBzdXJuYW1lLmNvbToxemw0R0prTHUwSHNCZHJESzg4TmdZWnpZMkU=

In case of the Invalid Authorization Header error, verify if the email address and the personal access token are valid.

Verifying destination events

This request verifies if the test events are successfully transformed and delivered to the specified destination.

  • Request Type: POST

  • Request Format:

https://api.rudderstack.com/v0/testDestination/<destination_ID>

Here, <destination_ID> should be replaced with the ID associated with the destination configured on the dashboard, as shown:

The /testDestination endpoint does not require a source to be connected to the destination.

  • Request body:

{
  "stage": {
    "user_transform": true,
    "dest_transform": true,
    "send_to_destination": true
  },
  "message": {
    // RudderStack HTTP Payload (identify, track, etc.)
  }
}
  • Sample payload:

{
  "message": {
    "context": {
      "traits": {
        "firstName": "James",
        "lastName": "Doe"
      }
    },
    "type": "identify",
    "userId": "abc@123.com"
  }
}
  • Sample request:

curl --location --request POST 'https://api.rudderstack.com/v0/testDestination/1zl4i0J8M8T7sozoLnueW46RVYe' \
--header 'Authorization: Basic c2FuZGh5YSs5ODdAcnVkZGVyc3RhY2suY29tOjF6bDRzOUt2NkducjVhRkhZV1E3RUg3Z2dwTA==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "message": {
        "context": {
            "traits": {
                "firstName": "James",
                "lastName": "Doe"
            }
        },
        "type": "identify",
        "userId": "abc@123.com"
    },
    "stage": {
        "user_transform": true,
        "dest_transform": true,
        "send_to_destination": true
    }
}'
  • Expected response:

{
  "destinationId": "1zl4i0J8M8T7sozoLnueW46RVYe",
  "destination": "WEBHOOK",
  "destinationName": "test-webhook-dest",
  "data": [{
    "user_transformed_payload": {
      "error": "Transformation VersionID not found"
    },
    "dest_transformed_payload": [{
      "version": "1",
      "type": "REST",
      "method": "POST",
      "endpoint": "https://webhook.site/9d5e3e43-6c2b-4b84-be9f-0147347b4cdf",
      "headers": {
        "content-type": "application/json"
      },
      "params": {},
      "body": {
        "JSON": {
          "context": {
            "traits": {
              "firstName": "James",
              "lastName": "Doe"
            }
          },
          "type": "identify",
          "userId": "abc@123.com"
        },
        "JSON_ARRAY": {},
        "XML": {},
        "FORM": {}
      },
      "files": {}
    }],
    "destination_response": [{
      "success": false,
      "error": {
        "message": "Token not found",
        "id": null
      }
    }],
    "destination_response_status": [
      404
    ]
  }]
}

Verifying events for disabled destinations

If the /testDestination endpoint is used to verify the events sent to a disabled destination, the API will return the following response:

{
  "destinationId": "<destination_ID>",
  "destinationName": "<destination_name>",
  "error": "Destination with id <destination_ID> is disabled"
}

A sample response highlighting the above error is shown below:

{
  "destinationId": "1zl4i0J8M8T7sozoLnueW46RVYe",
  "destinationName": "test-webhook-dest",
  "error": "Destination with id 1zl4i0J8M8T7sozoLnueW46RVYe is disabled"
}

To override this behavior and send the event to a disabled destination, you can call the /testDestination endpoint with the query parameter force=true, as shown:

https://api.rudderstack.com/v0/testDestination/<destination_ID>?force=true

Overriding existing destination configuration

You can also leverage the /testDestination endpoint to send your destination configuration as a part of the HTTP request body. This configuration overrides the existing destination configuration in RudderStack.

To use this feature, you must have set up the destination in RudderStack.

A sample request body highlighting this feature is shown below:

{
  "stage": {
    "user_transform": true,
    "dest_transform": true,
    "send_to_destination": true
  },
  "message": {
    // RudderStack HTTP Payload (identify, track, etc.)
  },
  "destinationConfig": {
        "webhookUrl": <webhook_URL>
    }
}

The destinationConfig field can be passed only for the testDestination endpoint.

Getting the destination definition variables

To override the destination configuration using the /testDestination endpoint, you need to know the configuration variables to use within destinationConfig. To get these variables, use the destination-definitions endpoint. The request format is listed below:

  • Request Type: GET

  • Request Format:

https://api.rudderstack.com/destination-definitions

This endpoint does not require any authentication.

Once you run this endpoint, you should be able to view all the variable names within the defaultConfig parameter of that destination, as seen below:

As seen in the above example, for the webhook destination, the configuration variables are webhookUrl, webhookMethod, and headers. These correspond to the webhook destination settings as seen in the RudderStack dashboard below:

Verifying source events

This request verifies if the test events are successfully sent from the specified source and delivered to all the connected destinations.

  • Request Type: POST

  • Request Format:

https://api.rudderstack.com/v0/testSource/<source_ID>

Here, <source_ID> should be replaced with the ID associated with the source configured on the dashboard, as shown:

The /testSource endpoint requires the specified source to be connected to at least one destination.

The /testSource endpoint essentially calls the /testDestination endpoint for each destination connected to that source and returns an array of responses.

  • Request body:

{
  "stage": {
    "user_transform": true,
    "dest_transform": true,
    "send_to_destination": true
  },
  "message": {
    // RudderStack HTTP Payload (identify, track, etc.)
  }
}

To know more about the stage object, refer to the Verification stages section below.

  • Sample payload:

{
  "message": {
    "context": {
      "traits": {
        "firstName": "James",
        "lastName": "Doe"
      }
    },
    "type": "identify",
    "userId": "abc@123.com"
  }
}
  • Sample request:

curl --location --request POST 'https://api.rudderstack.com/v0/testSource/1zlmsBMe1dcPbu3u6NTZFUFBrNQ' \
--header 'Authorization: Basic c2FuZGh5YSs5ODdAcnVkZGVyc3RhY2suY29tOjF6bDRzOUt2NkducjVhRkhZV1E3RUg3Z2dwTA==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "message": {
        "context": {
            "traits": {
                "firstName": "James",
                "lastName": "Doe"
            }
        },
        "type": "identify",
        "userId": "abc@123.com"
    },
    "stage": {
        "user_transform": true,
        "dest_transform": true,
        "send_to_destination": true
    }
}'
  • Expected response:

[{
    "destinationId": "1tIgXcaRnQDlBBtxlJMGGHFUWGb",
    "destinationName": "salesforce",
    "error": "Destination with id 1tIgXcaRnQDlBBtxlJMGGHFUWGb is disabled"
  },
  {
    "destinationId": "1zl4i0J8M8T7sozoLnueW46RVYe",
    "destination": "WEBHOOK",
    "destinationName": "test-webhook-dest",
    "data": [{
      "user_transformed_payload": {
        "error": "Transformation VersionID not found"
      },
      "dest_transformed_payload": [{
        "version": "1",
        "type": "REST",
        "method": "POST",
        "endpoint": "https://webhook.site/9d5e3e43-6c2b-4b84-be9f-0147347b4cdf",
        "headers": {
          "content-type": "application/json"
        },
        "params": {},
        "body": {
          "JSON": {
            "context": {
              "traits": {
                "firstName": "James",
                "lastName": "Doe"
              }
            },
            "type": "identify",
            "userId": "abc@123.com"
          },
          "JSON_ARRAY": {},
          "XML": {},
          "FORM": {}
        },
        "files": {}
      }],
      "destination_response": [{
        "success": false,
        "error": {
          "message": "Token not found",
          "id": null
        }
      }],
      "destination_response_status": [
        404
      ]
    }]
  },
  {
    "destinationId": "1tKpO0kantcKjd5czXVD1cdwUBE",
    "destination": "MARKETO",
    "destinationName": "Marketo",
    "data": [{
      "user_transformed_payload": {
        "error": "Transformation VersionID not found"
      },
      "dest_transformed_payload": [{
        "version": "1",
        "type": "REST",
        "method": "POST",
        "endpoint": "https://585-AXP-425.mktorest.com/rest/v1/leads.json",
        "headers": {
          "Authorization": "Bearer f96f0384-583b-4718-b8a3-38aaed4bc5ae:ab",
          "Content-Type": "application/json"
        },
        "params": {},
        "body": {
          "JSON": {
            "action": "createOrUpdate",
            "input": [{
              "FirstName": "James",
              "LastName": "Doe",
              "lastName": "Doe",
              "firstName": "James",
              "id": 1328262,
              "userId": "abc@123.com"
            }],
            "lookupField": "id"
          },
          "JSON_ARRAY": {},
          "XML": {},
          "FORM": {}
        },
        "files": {}
      }],
      "destination_response": [{
        "requestId": "555d#17d31b0a392",
        "result": [{
          "id": 1328262,
          "status": "updated"
        }],
        "success": true
      }],
      "destination_response_status": [
        200
      ]
    }]
  }
]

The above response indicates that the source with the source ID 1zlmsBMe1dcPbu3u6NTZFUFBrNQ is connected to three destinations:

  • Salesforce, a disabled destination

  • Webhook, with no transformation specified in the dashboard, and

  • Marketo

Verifying events from a disabled source

If the /testSource endpoint is used to verify the events sent from a disabled source, the API will send the following response:

{
  "message": "Source with <source_ID> is disabled"
}

To override this behavior and send the event from a disabled source to all the connected destinations, you can call the /testSource endpoint with the query parameter force=true, as shown:

https://api.rudderstack.com/v0/testSource/<source_ID>?force=true

Verifying events for disabled destinations

If the /testSource endpoint is used to verify the events sent to a disabled destination, the API will send the following response:

{
  "destinationId": "<destination_ID>",
  "destinationName": "<destination_name>",
  "error": "Destination with id <destination_ID> is disabled"
}

To override this behavior and send the event to a disabled destination, you can call the /testSource endpoint with the query parameter force=true, as shown:

https://api.rudderstack.com/v0/testSource/<source_ID>?force=true

Verification stages

The request body for the testDestination and testSource endpoints of this API is as shown:

{
  "stage": {
    "user_transform": true,
    "dest_transform": true,
    "send_to_destination": true
  },
  "message": {
    // RudderStack HTTP Payload (identify, track, etc.)
  }
}

Here, stage essentially defines the different stages enabled in the pipeline through which the API verifies the event payload. These stages are:

  • user_transform

  • dest_transform

  • send_to_destination

The following sections define each of these stages in detail.

user_transform

If user_transform is set to true, the API checks if a user transformation is connected to a destination and returns the transformed event as a response. If set to false, the API skips this stage completely and moves to the next stage (dest_transform).

Note the following:

  • Suppose you set user_transform to true, but no user transformation is specified while configuring the destination in the dashboard. In this case, the API returns the following response before skipping to the next stage:

"user_transformed_payload": {
  "error": "Transformation VersionID not found"
}
  • If an error occurs while applying the transformation to the payload, the API returns an error, and the next stages are aborted.

A sample API response is shown below:

[{
  "data": [{
    "user_transformed_payload": {
      "error": "Error: Error."
    },
    "dest_transformed_payload": {
      "error": "error encountered in user_transformation stage. Aborting."
    },
    "destination_response": {
      "error": "error encountered in dest_transformation stage. Aborting."
    }
  }]
}]

dest_transform

If dest_transform is set to true, the API returns the transformer response. This response shows the payload after it has been transformed into a destination-specific format.

A sample API response when dest_transform is set to true is shown below:

"dest_transformed_payload": [{
  "version": "1",
  "type": "REST",
  "method": "POST",
  "endpoint": "https://webhook.site/9d5e3e43-6c2b-4b84-be9f-0147347b4cdf",
  "headers": {
    "content-type": "application/json"
  },
  "params": {},
  "body": {
    "JSON": {
      "context": {
        "traits": {
          "firstName": "James",
          "lastName": "Doe"
        }
      },
      "type": "identify",
      "userId": "abc@123.com"
    },
    "XML": {},
    "FORM": {}
  },
  "files": {}
}]

send_to_destination

When send_to_destination is set to true, the event is sent to the destination and the API returns the response. If set to false, this stage is skipped completely.

A sample API response when send_to_destination is set to true is shown below:

"destination_response": [{
  "status": "success",
  "processed": 1,
  "unprocessed": []
}],
"destination_response_status": [200]

Supported message types

The Test API supports the following message type:

  • identify

  • track

  • page

  • screen

  • group

  • alias

If you specify any other message type apart from the supported events mentioned in the above list, you will get the following error:

{
    "message": "message type is unsupported"
}

You will get the following error message if no message type is specified in the payload, or if type is not a string:

{
    "message": "message type missing or invalid"
}

FAQs

Which destinations are not supported by the Test API?

What happens if type is not included in the event payload?

Simply put, type refers to the event type in the payload.

  • If type is missing in the event payload, the API will return the following error:

{
    "message": "message type missing or invalid"
}
  • If you set type to any value other than identify, track, page, screen, group, or alias, the API will return the following error:

{
    "message": "message type is unsupported"
}

Can I disable a particular verification stage in the stage object?

The request body for the testDestination and testSource includes the stage object, which is defined as follows:

{
  "stage": {
    "user_transform": true,
    "dest_transform": true,
    "send_to_destination": true
  }

The stage object defines the different stages enabled in the pipeline through which the API verifies the event payload. These stages are:

  • user_transform

  • dest_transform

  • send_to_destination

To disable or a specific verification stage, you can set the value of that parameter to be false. For example, if you don't want the API to check if a user transformation is applied to the event payload, you can set user_transform to false, as shown:

{
  "stage": {
    "user_transform": false,
    "dest_transform": true,
    "send_to_destination": true
  }

Can I override the destination settings specified in the RudderStack dashboard using this API?

Yes, you can.

Suppose you have configured a webhook destination in the RudderStack dashboard with the following settings:

Your HTTP request body should look like the following:

{
  "stage": {
    "user_transform": true,
    "dest_transform": true,
    "send_to_destination": true
  },
  "message": {
    // RudderStack HTTP Payload (identify, track, etc.)
  },
  "destinationConfig": {
        "webhookUrl": <webhook_URL>,
        "webhookMethod": <new_webhook_method>
    }
}

To get the variable names to use in destinationConfig, run the following GET request:

https://api.rudderstack.com/destination-definitions

Next, look for the webhook destination and the corresponding configuration variables for it under defaultConfig, as shown:

Finally, specify the new configuration value for the required variables and run the request. For instance, the new webhookUrl and webhookMethod values will replace the existing settings configured in the RudderStack dashboard.

Contact us

You can use this to generate the HTTP header.

To know more about the stage object, refer to the section below.

For more information on the message type, refer to the section below.

To override the dashboard settings, provide the new values for the destination configuration variables in the request body of the /testDestination endpoint as seen in the section above.

For a detailed use-case on how to use this feature, refer to the section below.

For more information on the message type, refer to the section below.

For more information on these message types, refer to the guide.

The Test API does not support the destinations that leverage the to send the test events. These destinations include:

The Test API also does not support the .

For more information, refer to the section above.

Refer to the section above for more information on each of the stage object parameters.

You can leverage the endpoint to send the new configuration as a part of the HTTP request body. This configuration overrides the existing destination settings configured in RudderStack.

For more information on the Test API, you can or start a conversation in our community.

Live Events
FAQs
this guide
personal access token
Basic Authentication Header Generator
Verification stages
Supported message types
Overriding existing destination configuration
FAQs
Supported message types
RudderStack Events Specification
rudder-server
Amazon Kinesis
Apache Kafka
Azure Event Hub
Amazon Kinesis Firehose
Amazon EventBridge
Amazon Personalize
Confluent Cloud
Google Pub/Sub
Google Sheets
Redis
BigQuery Stream
Object Storage Platforms
data warehouse destinations
Supported message types
Verification stages
/testDestination
contact us
Slack
Dashboard settings for webhook destination
Source ID
Configuration variables
Configuration variables
Dashboard settings
Destination ID