# MetaRouter Documentation > Server-Side Tag Management Without Compromise - Optimize control, privacy, and performance with MetaRouter's server-side tagging. Overcome technical complexities and ensure measurement parity and system governance. Learn more and get a demo today! ## Guides - [Getting Started](https://docs.metarouter.io/docs/getting-started-with-metarouter.md) - [Server-Side vs. Client-Side Tracking](https://docs.metarouter.io/docs/server-side-vs-client-side-tracking.md) - [What Is MetaRouter?](https://docs.metarouter.io/docs/what-is-metarouter.md) - [Setting Up Your Event Ingestion Endpoint](https://docs.metarouter.io/docs/setting-up-your-dns.md) - [Installing & Maintaining MetaRouter](https://docs.metarouter.io/docs/installing-maintaining-metarouter.md) - [Deploying Your Tracking File](https://docs.metarouter.io/docs/deploying-your-ajs-tracking-file.md) - [Analytics.js](https://docs.metarouter.io/docs/analyticsjs-overview.md) - [Javascript SDK](https://docs.metarouter.io/docs/analyticsjs-for-web.md) - [Analytics.js Event Methods](https://docs.metarouter.io/docs/analyticsjs-event-specs.md) - [Event Method: Page](https://docs.metarouter.io/docs/event-method-page.md) - [Event Method: Track](https://docs.metarouter.io/docs/event-method-track.md) - [Event Method: Identify](https://docs.metarouter.io/docs/event-method-identify.md) - [Event Method: Group](https://docs.metarouter.io/docs/event-method-group.md) - [Analytics.js Semantic Event Specs](https://docs.metarouter.io/docs/analyticsjs-semantic-event-specs.md) - [E-commerce Spec](https://docs.metarouter.io/docs/analyticsjs-ecommerce-spec.md) - [Video Spec](https://docs.metarouter.io/docs/video-spec.md) - [AJS File Builder](https://docs.metarouter.io/docs/ajs-file-builder.md) - [Common Fields](https://docs.metarouter.io/docs/ajs-common-fields.md) - [Mobile](https://docs.metarouter.io/docs/mobile.md) - [Android](https://docs.metarouter.io/docs/android.md): admin - [iOS](https://docs.metarouter.io/docs/ios.md): admin - [React Native](https://docs.metarouter.io/docs/react-native.md) - [Non-Analytics.js Events](https://docs.metarouter.io/docs/non-analyticsjs-events.md) - [HTTP API](https://docs.metarouter.io/docs/http-api.md) - [Sync Injector](https://docs.metarouter.io/docs/sync-injector.md) - [Cross-Domain Device Tracking](https://docs.metarouter.io/docs/cross-domain-identity-tracking.md) - [Custom Enrichment Syncs](https://docs.metarouter.io/docs/enrichment-service.md): A Sync Injector orchestrated workflow to securely enrich additional information into event payloads from the server. - [Custom Identity Syncs](https://docs.metarouter.io/docs/custom-identity-syncs.md) - [Google Tag](https://docs.metarouter.io/docs/google-tag.md) - [Monitoring Dashboard](https://docs.metarouter.io/docs/metarouter-dashboard.md) - [Event Metrics API](https://docs.metarouter.io/docs/event-metrics-api.md) - [Integration Transformations](https://docs.metarouter.io/docs/integration-transformations.md) - [Mappings](https://docs.metarouter.io/docs/mappings.md) - [Custom Expressions](https://docs.metarouter.io/docs/custom-expressions.md) - [Global Functions Documentation](https://docs.metarouter.io/docs/global-functions-docs.md) - [Enrichments](https://docs.metarouter.io/docs/enrichments.md) - [Spreadings](https://docs.metarouter.io/docs/spreadings.md) - [Integration Filters](https://docs.metarouter.io/docs/integration-filters.md) - [Building & Managing Pipelines](https://docs.metarouter.io/docs/configuring-pipelines.md) - [Schema Reporting](https://docs.metarouter.io/docs/schema-reporting.md) - [Schema Enforcement](https://docs.metarouter.io/docs/schema-enforcement.md) - [Bot Detection with PerimeterX](https://docs.metarouter.io/docs/bot-detection-with-perimeterx.md) - [CLI Tools](https://docs.metarouter.io/docs/cli-tools.md) - [CLI Event Debugger](https://docs.metarouter.io/docs/cli-event-debugger.md) - [Playbook Testing](https://docs.metarouter.io/docs/playbook-testing.md) - [Generating & Checking TLS Certificates](https://docs.metarouter.io/docs/generating-checking-tls-certificates.md) - [Transformation Library](https://docs.metarouter.io/docs/transformation-library.md) - [Advanced Consent Enforcement](https://docs.metarouter.io/docs/compliance-module.md) - [Current MetaRouter Integration Consent Categories](https://docs.metarouter.io/docs/current-metarouter-integration-consent-categories.md): This is a list of MetaRouter's current integrations and their recommended compliance consent categories. - [Audit Logs](https://docs.metarouter.io/docs/audit-logs.md) - [User Roles & Management](https://docs.metarouter.io/docs/user-roles-management.md) - [Data Replay](https://docs.metarouter.io/docs/data-replay.md) - [Server-to-Server Integration Onboarding for Third-Party Vendors](https://docs.metarouter.io/docs/metarouter-server-to-server-integration-overview-for-third-party-vendors.md) - [Starter Kits](https://docs.metarouter.io/docs/starter-kits.md) - [ActionIQ](https://docs.metarouter.io/docs/actioniq.md) - [Adjust](https://docs.metarouter.io/docs/adjust.md) - [adMarketplace](https://docs.metarouter.io/docs/admarketplace.md) - [Adobe Analytics](https://docs.metarouter.io/docs/adobe-analytics.md) - [Adobe Experience Platform](https://docs.metarouter.io/docs/adobe-experience.md) - [Amazon DSP Events](https://docs.metarouter.io/docs/amazon-dsp-events.md) - [Amazon S3](https://docs.metarouter.io/docs/amazon-s3.md) - [Amnet](https://docs.metarouter.io/docs/amnet.md) - [Amobee](https://docs.metarouter.io/docs/amobee.md) - [Amperity](https://docs.metarouter.io/docs/amperity.md) - [Amplitude](https://docs.metarouter.io/docs/amplitude.md) - [AppsFlyer](https://docs.metarouter.io/docs/appsflyer.md) - [Attentive](https://docs.metarouter.io/docs/attentive.md) - [AWIN](https://docs.metarouter.io/docs/awin.md) - [Axon](https://docs.metarouter.io/docs/axon.md) - [Azure Blob](https://docs.metarouter.io/docs/blob.md) - [Blueshift](https://docs.metarouter.io/docs/blueshift.md) - [Braze](https://docs.metarouter.io/docs/braze.md) - [Button](https://docs.metarouter.io/docs/button.md) - [Clinch](https://docs.metarouter.io/docs/clinch.md) - [Commission Junction](https://docs.metarouter.io/docs/commission-junction.md) - [Convert](https://docs.metarouter.io/docs/convert.md): This integration is currently in beta. Please reach out to your MetaRouter customer team to get started. - [Criteo](https://docs.metarouter.io/docs/criteo.md) - [DataBricks](https://docs.metarouter.io/docs/databricks.md) - [Customer.io](https://docs.metarouter.io/docs/customer-io.md) - [Eulerian](https://docs.metarouter.io/docs/eulerian.md) - [Google Ads - Conversions](https://docs.metarouter.io/docs/google-ads.md) - [Google AJSID Segments](https://docs.metarouter.io/docs/google-ads-audience.md) - [Google Analytics 4 - Collect](https://docs.metarouter.io/docs/google-analytics-4-collect.md) - [Google Analytics 4 - Measurement](https://docs.metarouter.io/docs/google-analytics-4-measurement.md) - [Google BigQuery](https://docs.metarouter.io/docs/google-bigquery-streaming.md) - [Google Cloud Storage](https://docs.metarouter.io/docs/gcs.md) - [Google CM360 - Floodlights](https://docs.metarouter.io/docs/google-cm360.md) - [Google Display & Video 360](https://docs.metarouter.io/docs/display-video-360.md) - [Google Firebase](https://docs.metarouter.io/docs/google-firebase.md) - [Google Pub/Sub](https://docs.metarouter.io/docs/google-pubsub.md) - [Heap](https://docs.metarouter.io/docs/heap.md) - [Hightouch](https://docs.metarouter.io/docs/hightouch.md) - [HubSpot](https://docs.metarouter.io/docs/hubspot-event.md) - [illumin](https://docs.metarouter.io/docs/acuity-ads.md) - [Impact Radius](https://docs.metarouter.io/docs/impact-radius.md) - [InMarket](https://docs.metarouter.io/docs/in-market.md) - [Innervate (RevJet)](https://docs.metarouter.io/docs/rev-jet.md) - [Iterable](https://docs.metarouter.io/docs/iterable.md) - [Kafka](https://docs.metarouter.io/docs/kafka.md) - [Kargo](https://docs.metarouter.io/docs/kargo.md) - [Kochava](https://docs.metarouter.io/docs/kochava.md) - [Kochava Identity Link](https://docs.metarouter.io/docs/kochava-identity-link.md) - [LinkedIn Ads - Conversions](https://docs.metarouter.io/docs/linkedin-ads-conversions.md) - [LiveRamp](https://docs.metarouter.io/docs/liveramp.md) - [Lytics](https://docs.metarouter.io/docs/lytics.md) - [Magellan AI](https://docs.metarouter.io/docs/magellan-ai.md) - [Matomo](https://docs.metarouter.io/docs/matomo.md) - [MediaMath](https://docs.metarouter.io/docs/media-math.md) - [Merkle](https://docs.metarouter.io/docs/merkle.md) - [Meta CAPI](https://docs.metarouter.io/docs/facebook-pixel.md) - [Microsoft Ads - CAPI](https://docs.metarouter.io/docs/microsoft-ads-capi.md) - [Mixpanel](https://docs.metarouter.io/docs/mixpanel.md) - [Moloco Commerce Media](https://docs.metarouter.io/docs/moloco.md) - [Movable Ink - Customer Data](https://docs.metarouter.io/docs/movable-ink.md) - [Nextdoor Ads](https://docs.metarouter.io/docs/nextdoor.md) - [Nextdoor CAPI](https://docs.metarouter.io/docs/nextdoor-capi.md) - [OpenAI Ads CAPI](https://docs.metarouter.io/docs/openai-ads-capi.md) - [Optimizely](https://docs.metarouter.io/docs/optimizely.md) - [Perion](https://docs.metarouter.io/docs/perion.md) - [Pinterest Ads](https://docs.metarouter.io/docs/pinterest.md) - [Pinterest CAPI](https://docs.metarouter.io/docs/pinterest-capi.md) - [Podscribe](https://docs.metarouter.io/docs/podscribe.md) - [Rakuten - Conversions](https://docs.metarouter.io/docs/rakuten-conversions.md) - [Reddit Ads](https://docs.metarouter.io/docs/reddit-ads.md) - [Redshift via Firehose](https://docs.metarouter.io/docs/redshift-via-firehose.md) - [Firehose IAM and Access Keys](https://docs.metarouter.io/docs/firehose-setup.md) - [Redshift Setup](https://docs.metarouter.io/docs/redshift-setup.md) - [Configure Redshift Serverless](https://docs.metarouter.io/docs/configure-redshift-serverless.md) - [Configure Redshift Provisioned Cluster](https://docs.metarouter.io/docs/configure-redshift-provisioned-cluster.md) - [Create Redshift Tables](https://docs.metarouter.io/docs/create-redshift-staging-table.md) - [Redshift Serverless - Create a Firehose Stream](https://docs.metarouter.io/docs/create-a-firehose-stream-for-redshift-serverless.md) - [Redshift Provisioned Cluster - Create Firehose Stream](https://docs.metarouter.io/docs/redshift-provisioned-cluster-create-firehose-stream.md) - [VPC Configuration](https://docs.metarouter.io/docs/vpc-configuration.md) - [Send a Test Record Using AWS CloudShell](https://docs.metarouter.io/docs/send-a-test-record-using-aws-cloudshell.md) - [Firehose MetaRouter Setup](https://docs.metarouter.io/docs/firehose-metarouter-setup.md) - [Ringier Axel Springer Poland](https://docs.metarouter.io/docs/ringier-axel-springer-poland.md) - [Roku](https://docs.metarouter.io/docs/roku.md) - [Roomvo](https://docs.metarouter.io/docs/roomvo.md) - [RTB House](https://docs.metarouter.io/docs/rtb-house.md) - [Salesforce CDP](https://docs.metarouter.io/docs/salesforce-cdp.md) - [Snapchat Ads](https://docs.metarouter.io/docs/snapchat.md) - [Snapchat CAPI](https://docs.metarouter.io/docs/snapchat-capi.md) - [Snowflake](https://docs.metarouter.io/docs/snowflake.md) - [Teads CAPI](https://docs.metarouter.io/docs/teads-capi.md) - [Teads Postback](https://docs.metarouter.io/docs/teads.md) - [The Trade Desk - Conversions](https://docs.metarouter.io/docs/the-trade-desk.md) - [The Trade Desk - First Party Advertiser](https://docs.metarouter.io/docs/the-trade-desk-first-party-advertiser.md) - [The Trade Desk - Offline Conversions](https://docs.metarouter.io/docs/the-trade-desk-offline-conversions.md) - [TikTok](https://docs.metarouter.io/docs/tiktok.md) - [Treasure Data](https://docs.metarouter.io/docs/treasure-data.md) - [VideoAmp](https://docs.metarouter.io/docs/videoamp.md) - [Wallaroo](https://docs.metarouter.io/docs/wallaroo.md) - [Wirtualna Polska](https://docs.metarouter.io/docs/wirtualna-polska.md) - [Webhooks](https://docs.metarouter.io/docs/build-your-own.md) - [X Ads](https://docs.metarouter.io/docs/x-ads.md) - [Xandr](https://docs.metarouter.io/docs/xandr.md) - [Yahoo CAPI](https://docs.metarouter.io/docs/yahoo-capi.md) - [Yahoo Pixel API](https://docs.metarouter.io/docs/yahoo-pixel-api.md) - [Zeotap](https://docs.metarouter.io/docs/zeotap.md) - [Identity Syncs](https://docs.metarouter.io/docs/identity-syncs.md) - [Acxiom Sync](https://docs.metarouter.io/docs/acxiom-sync.md) - [Adobe Sync](https://docs.metarouter.io/docs/adobe-sync.md) - [adMarketplace Sync](https://docs.metarouter.io/docs/admarketplace-sync.md) - [Adobe Everest Tech Sync](https://docs.metarouter.io/docs/adobe-everesttech-sync.md) - [Amnet Sync](https://docs.metarouter.io/docs/amnet-sync.md) - [Amobee Sync](https://docs.metarouter.io/docs/amobee-sync.md) - [Amperity Profile Sync](https://docs.metarouter.io/docs/amperity-profile-sync.md) - [AppsFlyer Sync](https://docs.metarouter.io/docs/apps-flyer-sync.md) - [AWIN Sync](https://docs.metarouter.io/docs/awin-sync.md) - [Axon Sync](https://docs.metarouter.io/docs/axon-sync.md) - [Bing Sync](https://docs.metarouter.io/docs/bing-sync.md) - [Bloomreach Sync](https://docs.metarouter.io/docs/bloomreach-sync.md) - [Button Sync](https://docs.metarouter.io/docs/button-sync.md) - [CEEId Sync](https://docs.metarouter.io/docs/ceeid-sync.md) - [Clinch Sync](https://docs.metarouter.io/docs/clinch-sync.md) - [Commission Junction Sync](https://docs.metarouter.io/docs/commission-junction-sync.md) - [Convert Sync](https://docs.metarouter.io/docs/convert-sync.md) - [Criteo Sync](https://docs.metarouter.io/docs/criteo-sync.md) - [Google Ad Manager Sync](https://docs.metarouter.io/docs/google-ad-manager-sync.md) - [Google Tag Coupled Sync (Legacy)](https://docs.metarouter.io/docs/gtag-sync-coupled.md) - [Google Tag Decoupled Sync](https://docs.metarouter.io/docs/gtag-decouple-sync.md) - [Google Ads Sync (Decoupled)](https://docs.metarouter.io/docs/google-ads-sync-decoupled.md) - [CM360 Sync (Decoupled)](https://docs.metarouter.io/docs/cm360-sync-decoupled.md) - [GA4 Sync (Decoupled)](https://docs.metarouter.io/docs/ga4-sync-decoupled.md) - [HubSpot Tag Sync](https://docs.metarouter.io/docs/hub-spottag-sync.md) - [illumin Sync](https://docs.metarouter.io/docs/acuity-ads-sync.md) - [inMarket Sync](https://docs.metarouter.io/docs/in-market-sync.md) - [Kargo Sync](https://docs.metarouter.io/docs/kargo-sync.md) - [LinkedIn Sync](https://docs.metarouter.io/docs/linked-in-sync.md) - [Merkle Sync](https://docs.metarouter.io/docs/merkle-sync.md) - [Meta Tag Sync](https://docs.metarouter.io/docs/facebook-tag-sync.md) - [Microsoft Ads Sync](https://docs.metarouter.io/docs/microsoft-ads-sync.md) - [Movable Ink Customer Data Sync](https://docs.metarouter.io/docs/movable-inkcustomerdata-sync.md) - [Neustar Sync](https://docs.metarouter.io/docs/neustar-sync.md) - [Nextdoor Sync](https://docs.metarouter.io/docs/nextdoor-sync.md) - [OpenAI Sync](https://docs.metarouter.io/docs/openai-sync.md) - [Optimizely Sync](https://docs.metarouter.io/docs/optimizely-sync.md) - [Perion Sync](https://docs.metarouter.io/docs/perion-sync.md) - [Pinterest Sync](https://docs.metarouter.io/docs/pinterest-sync.md) - [Pinterest CAPI Sync](https://docs.metarouter.io/docs/pinterest-capi-sync.md) - [Rakuten Sync](https://docs.metarouter.io/docs/rakuten-sync.md) - [Reddit Ads Sync](https://docs.metarouter.io/docs/reddit-ads-sync.md) - [RevJet (Innervate) Sync](https://docs.metarouter.io/docs/revjet-sync.md) - [Ringier Axel Springer Poland Sync](https://docs.metarouter.io/docs/ringier-axelspringerpoland-sync.md) - [Roku Sync](https://docs.metarouter.io/docs/roku-sync.md) - [Roomvo Sync](https://docs.metarouter.io/docs/roomvo-sync.md) - [RTB House Sync](https://docs.metarouter.io/docs/rtb-house-sync.md) - [Snapchat CAPI](https://docs.metarouter.io/docs/snapchat-capi-sync.md) - [TapAd Sync](https://docs.metarouter.io/docs/tap-ad-sync.md) - [Teads Sync](https://docs.metarouter.io/docs/teads-sync.md) - [Teads CAPI Sync](https://docs.metarouter.io/docs/teads-capi-sync.md) - [TikTok Sync](https://docs.metarouter.io/docs/tiktok-sync.md) - [The Trade Desk Sync](https://docs.metarouter.io/docs/the-tradedesk-sync.md) - [Unified ID 2.0 Sync](https://docs.metarouter.io/docs/unified-id-20.md) - [Verizon Sync](https://docs.metarouter.io/docs/verizon-sync.md) - [Wirtualna Polska Sync](https://docs.metarouter.io/docs/wirtualna-polska-sync.md) - [X Ads Sync](https://docs.metarouter.io/docs/x-ads-sync.md) - [Xandr Sync](https://docs.metarouter.io/docs/xandr-sync.md) - [Yahoo CAPI Sync](https://docs.metarouter.io/docs/yahoo-capi-sync.md) - [Yahoo Media Sync](https://docs.metarouter.io/docs/yahoo-media-sync.md) ## API Reference - [Create Custom Event](https://docs.metarouter.io/reference/post_custom-event.md): Custom events can be any arbitrary JSON as long as you provide Event Metadata MetaRouter requires a small set of structured metadata to accept and deliver events. In most cases, providing 2 fields is all we need to process your data: `writeKey` and `eventName`. Event Metadata is added to each event with the top-level key `_metarouter`. The Event Metadata consists of the following required and optional fields: All field types are strings. | Field | Required | Description | |-------------|-------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | writeKey | required | Write Key is your API key. | | eventName | required | Event Name is an arbitrary category for the event. Examples: "order created", "page view", "sign in" | | eventID | optional (auto-generated if absent) | Event ID is a guid/uuid for tracing the lifecycle of an event. If absent, MetaRouter creates a random UUIDv4. | | timestamp | optional (auto-generated if absent) | Timestamp is when the event was created. Must be a string in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601). If absent, MetaRouter sets this field to the current server time. | | anonymousID | optional | Anonymous ID is used for tracking and attribution. It should be a persistent, unique identifier (like a uuid) for an unauthenticated user. | | userID | optional | User ID is used for tracking and attribution. It should be a persistent, unique identifier (like a hashed email or database id) for an authenticated user. | | ip | optional (set if absent) | IP address. If absent, system adds IP address of the http request. | Inside an event, the event metadata is referenced as a simple JSON object with reserved key `_metarouter`. The `_metarouter` key must be part of the root object. ```json { "_metarouter": { "writeKey": "abc123", "eventName": "page view", "eventID": "123e4567-e89b-12d3-a456-426614174000", "timestamp": "2021-08-17T15:10:33Z", "anonymousID": "456e4567-e89b-12d3-a456-426614174000", "userID": "98765" }, "event": "my event fields", "json": "whatever json you want" } ``` You're free to omit optional fields or fields that MetaRouter auto-generates. ```json { "_metarouter": { "writeKey": "abc123", "eventName": "page view" }, "event": "my event fields", "json": "whatever json you want" } ``` ## JSONPath To reduce burden on clients, you can use [JSONPath](https://goessner.net/articles/JsonPath/) expressions to use values from your event to populate the Event Metadata. JSONPath syntax resources: * [goessner/jsonpath](https://goessner.net/articles/JsonPath/) * [smartbear/jsonpath](https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html) * [baeldung/jsonpath](https://www.baeldung.com/guide-to-jayway-jsonpath) Note the `_metarouter.eventName` is a JSONPath expression. In English, this JSONPath query says "use the value at productCategory as the eventName". ```bash curl -X POST https://staging.mr-in.com/v1/custom/event \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "_metarouter": { "writeKey": "example", "eventName": "{ ..productCategory }" }, "event": "my event fields", "productCategory": "kitchen" }' ``` Notice the `_metarouter.eventName` is set to 'kitchen'. Returns 201 response: ```json { "event": { "_metarouter": { "eventID": "a4d896bb-f425-4dac-a214-31940cf94006", "eventName": "kitchen", "writeKey": "example", "timestamp": "2021-08-17T18:08:09Z" }, "event": "my event fields", "productCategory": "kitchen" }, "success": true } ``` ## Request Header Placing an `"_metarouter": {}` object in your event is one way to submit events to the Ingest API. You can also set the `X-Event-Metadata` header to provide a metadata object ```bash curl -X POST https://staging.mr-in.com/v1/custom/event \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'X-Event-Metadata: {"writeKey": "example", "eventName": "{ ..productCategory }"}' \ -d '{"event": "my event fields", "productCategory": "kitchen" }' ```` Returns 201 response: ```json { "event": { "_metarouter": { "eventID": "defc1d32-01d7-416e-b9ba-534e04c13121", "eventName": "kitchen", "writeKey": "example", "timestamp": "2021-08-17T18:08:38Z" }, "event": "my event fields", "productCategory": "kitchen" }, "success": true } ``` ## Request Query Params Placing an `"_metarouter": {}` object in your event is one way to submit events to the Ingest API. Finally, you can place the Event Metadata in the request query params. ```bash curl -X POST https://staging.mr-in.com/v1/custom/event?writeKey=example&eventName=%7B%20..productCategory%20%7D \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{"event": "my event fields", "productCategory": "kitchen" }' ``` Returns 201 response: ```json { "event": { "_metarouter": { "eventID": "89e4438d-471e-4993-88b5-7e5692239da2", "eventName": "kitchen", "writeKey": "example", "timestamp": "2021-08-17T18:09:06Z" }, "event": "my event fields", "productCategory": "kitchen" }, "success": true } ``` ## Metadata Precedence If an object is present in `X-Event-Metadata` header or the query params, the metadata is *merged* with any `_metarouter` object in the event. Matching fields in the header or params overrides any existing values in the `_metarouter` object. If you submit both an `X-Event-Metadata` header and query params, the header takes precedence and the query params are ignored. ## Legacy _mrSchema Previously, event metadata was an object at `_mrSchema`. To preserve backwards compatability, the legacy `_mrSchema` object is also included in the final event. `_mrSchema` will be deprecated in the future. At this time, there is no timetable for deprecation. MetaRouter will ensure all pipelines and playbooks are updated before deprecating. The object at `_mrSchema` is identical to `_metarouter`. - [SearchEventTraces searches event trace data by various dimensions.](https://docs.metarouter.io/reference/controlservice_searcheventtraces2.md): Please ignore the following lint directives: buf:lint:ignore RPC_REQUEST_STANDARD_NAME buf:lint:ignore RPC_RESPONSE_STANDARD_NAME - [GetFileCredential](https://docs.metarouter.io/reference/controlservice_getfilecredential.md): Returns the file credential for the given id. - [DeleteFileCredential](https://docs.metarouter.io/reference/controlservice_deletefilecredential.md): Permanently deletes the file credential for the given id. - [CreateFileCredential creates a file credential given the id.](https://docs.metarouter.io/reference/controlservice_createfilecredential.md): If credential exists, overwrites it. - [ListFileCredentials](https://docs.metarouter.io/reference/controlservice_listfilecredentials.md): Lists all known file credential ids. - [GetPipeline](https://docs.metarouter.io/reference/controlservice_getpipeline.md): Finds a pipeline for a writekey. Supply scopes to determine the pipeline returned. - [DeletePipeline permanently deletes a pipeline for a writekey.](https://docs.metarouter.io/reference/controlservice_deletepipeline.md): Supply scope to determine the pipeline deleted. Most clients should use scope PIPELINE_SCOPE_PUBLIC. - [CreatePipeline](https://docs.metarouter.io/reference/controlservice_createpipeline.md): Creates a pipeline for a writekey. Supply scope to determine where to save the pipeline. Most clients should use scope PIPELINE_SCOPE_PUBLIC. - [DiffPipeline returns a diff of the pipeline without modifying any persisted resources.](https://docs.metarouter.io/reference/controlservice_diffpipeline.md): WriteKey must be in the request or set as 'wky' claim within the jwt. Deprecating the requirement in the jwt. buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE - [GetRuntimePipeline returns the pipeline as seen by the system at runtime.](https://docs.metarouter.io/reference/controlservice_getruntimepipeline.md): The runtime may modify the pipeline from what a client created, such as injecting default or legacy data, replacing params with default_values, and removing disabled integrations. Most clients should use /v1.1/pipeline endpoint instead. This endpoint may be useful for debugging writekeys. - [GetAllUniqueIntegrations](https://docs.metarouter.io/reference/controlservice_getalluniqueintegrations.md): Returns all the unique integrations across all pipelines. - [GetWriteKeys](https://docs.metarouter.io/reference/controlservice_getwritekeys.md): Returns list of writekeys for all configured pipelines. - [QueryDeliveryAnalytics returns total counts of events delivered to integrations.](https://docs.metarouter.io/reference/controlservice_querydeliveryanalytics.md): Returns delivered, error, and filtered counts over the requested time range, grouped by the requested dimensions. At least one dimension is required. Events queued for retry are excluded until delivery resolves as delivered or error. Rate limited to 10 requests per minute (burst of 5), shared with QueryIngestionAnalytics; exceeding the limit returns ResourceExhausted (HTTP 429). - [QueryIngestionAnalytics returns total counts of events ingested into the cluster.](https://docs.metarouter.io/reference/controlservice_queryingestionanalytics.md): Returns success and error counts over the requested time range, grouped by the requested dimensions. Dimensions are optional; an empty list returns a single ungrouped total. Rate limited to 10 requests per minute (burst of 5), shared with QueryDeliveryAnalytics; exceeding the limit returns ResourceExhausted (HTTP 429). - [ListAnalyticsIntegrations lists integrations observed in delivery analytics.](https://docs.metarouter.io/reference/controlservice_listanalyticsintegrations.md): Returns the distinct integration name and id pairs seen over the requested time range, optionally filtered by write keys. Use the results to build integration filters and dimensions for QueryDeliveryAnalytics. - [GetAnalyticsJSFile retrieves a gzipped analytics.js file from the cluster based on the pipeline_id.](https://docs.metarouter.io/reference/controlservice_getanalyticsjsfile.md): The ingestor will be calling this endpoint to serve the file. - [CreateAnalyticsJSFile stores a gzipped analytics.js file inside of the cluster.](https://docs.metarouter.io/reference/controlservice_createanalyticsjsfile.md): This file is then served by the ingestor e.g. ingest.mr-in.com/v1/files/pipeline-id Each cluster will have one file per pipeline. - [DeleteCrossDomain deletes a cross domain.](https://docs.metarouter.io/reference/controlservice_deletecrossdomain.md): Due to caching, may take up to 60s for changes to propagate to ingestor endpoints. - [CreateCrossDomain creates a cross domain which is served by the ingestor.](https://docs.metarouter.io/reference/controlservice_createcrossdomain.md): Cross domains help the sync injector keep track of a user's identity across different apex/root domains. Due to caching, may take up to 60s for new cross domains to propagate to ingestor endpoints. - [ListCrossDomains](https://docs.metarouter.io/reference/controlservice_listcrossdomains.md): Lists current cross domains. - [DeleteEnrichmentVariable](https://docs.metarouter.io/reference/controlservice_deleteenrichmentvariable.md): Deletes an enrichment variable. - [CreateEnrichmentVariable creates an enrichment variable that can be used in the enrichment service.](https://docs.metarouter.io/reference/controlservice_createenrichmentvariable.md): These variables are used to keep them secret in the cluster and not expose them in the browser. They will be used in the ingestor enrichment service to enrich events before they are sent to the integrations. - [ListEnrichmentVariables](https://docs.metarouter.io/reference/controlservice_listenrichmentvariables.md): Lists current enrichment variables. - [GetPipelineSchemaViolations gets the total count of all schema violations grouped by the event name.](https://docs.metarouter.io/reference/controlservice_getpipelineschemaviolations.md): write_key is required. schema_id and version_id are optional. - [GetEventSchemaViolations gets the details of schema violations for a specific event name.](https://docs.metarouter.io/reference/controlservice_geteventschemaviolations.md): Returns the total count of violations grouped by type and field. write_key and event_name are required. schema_id and version_id are optional. - [GetEventSchemaViolationEvents gets a sampling of events that match a schema violation.](https://docs.metarouter.io/reference/controlservice_geteventschemaviolationevents.md): Will attempt to return the most recent events. write_key, event_name, type, and details are required. field is not required since it could be empty for top level. limit is optional and defaults to 10 with a max of 100. schema_id and version_id are optional. - [ListPipelineSchemaViolations gets the total count of all schema violations grouped by write_key, schema_id, and version_id.](https://docs.metarouter.io/reference/controlservice_listpipelineschemaviolations.md): It does not include details of events. - [GetEventValues returns distinct arrays of common event values.](https://docs.metarouter.io/reference/controlservice_geteventvalues.md): Uses the events captured from event traces or debugging. - [SearchGeneratedEventSchemas](https://docs.metarouter.io/reference/controlservice_searchgeneratedeventschemas.md): Searches schema trace data by various dimensions. - [GeneratedEventSchemaDetails returns details about an event schema.](https://docs.metarouter.io/reference/controlservice_generatedeventschemadetails.md): Requires an event name and optional other search params like write key or last seen. - [GeneratedEventSchemasSummary](https://docs.metarouter.io/reference/controlservice_generatedeventschemassummary.md): Gets a summary of event schemas by event name with write keys and total count. - [DeleteIngestDomain deletes the ingest domain.](https://docs.metarouter.io/reference/controlservice_deleteingestdomain.md): Requires domain automation enabled. Domain is eventually removed from the ingest ingress. - [CreateIngestDomain adds domain as an endpoint for event ingestion.](https://docs.metarouter.io/reference/controlservice_createingestdomain.md): Requires domain automation enabled. Domain must have valid DNS records. - [ListIngestDomains retrieves all ingest domains.](https://docs.metarouter.io/reference/controlservice_listingestdomains.md): Requires domain automation enabled. - [ClientCredentialsToken sends a request to Auth0 using OAuth Client Credentials flow.](https://docs.metarouter.io/reference/controlservice_clientcredentialstoken.md): This enables organizations to access the Control API for Machine to Machine authentication. - [ListSchemaLibraries](https://docs.metarouter.io/reference/controlservice_listschemalibraries.md): Returns all Write Keys for existing Schema Libraries. - [DeleteSchemaLibrary](https://docs.metarouter.io/reference/controlservice_deleteschemalibrary.md): Permanently deletes all Event Schemas for a Write Key. - [GetSchemaLibrary](https://docs.metarouter.io/reference/controlservice_getschemalibrary.md): Returns a Schema Library by its Write Key. - [UpsertSchemaLibrary creates or updates all Event Schemas in the cluster based on write_key.](https://docs.metarouter.io/reference/controlservice_upsertschemalibrary.md): All schemas are stored in the same collection and are differentiated by the write_key. The format of the schema needs to be a JSONSchema https://json-schema.org/ - [DeleteSyncFunctionOriginURL](https://docs.metarouter.io/reference/controlservice_deletesyncfunctionoriginurl.md): Deletes a sync function origin URL. - [ListSyncFunctionOriginURLs](https://docs.metarouter.io/reference/controlservice_listsyncfunctionoriginurls.md): Lists the origin URLs for all sync functions. - [CreateSyncFunctionOriginURL creates a sync function origin URL.](https://docs.metarouter.io/reference/controlservice_createsyncfunctionoriginurl.md): These are the authorized origins for custom sync functions. Adding a sync function origin URL will allow the sync function to be used in the cluster and the proper CORS headers will be set. - [DeliverEventToIntegration delivers an event to an integration and returns the response.](https://docs.metarouter.io/reference/controlservice_delivereventtointegration.md): Uses the SDKConnection or EndpointSchema to deliver the event. No filters or transformations are run for the integration. - [ValidateIngestDomain](https://docs.metarouter.io/reference/controlservice_validateingestdomain.md): Ensures the domain's DNS records are set up correctly for ingestion. - [ValidateIngestTLS validates the ingest ingress TLS certificate.](https://docs.metarouter.io/reference/controlservice_validateingesttls.md): Returns an error if the SAN dns names do not contain all ingest domains configured in the cluster. Validation is not extensive. Only checks all ingest domains present in the cert. - [TransformEventWithPlaybook](https://docs.metarouter.io/reference/controlservice_transformeventwithplaybook.md): Receives a playbook and input event and returns the transformed output. - [ValidateIntegration](https://docs.metarouter.io/reference/controlservice_validateintegration.md): Validates an Integration and returns it if valid, or returns an error with missing fields. - [GetLuaModules](https://docs.metarouter.io/reference/controlservice_getluamodules.md): Returns all Transformation Libraries (Lua modules). - [DeleteLuaModule](https://docs.metarouter.io/reference/controlservice_deleteluamodule.md): Deletes a Transformation Library (Lua module) by name. - [GetLuaModule](https://docs.metarouter.io/reference/controlservice_getluamodule.md): Returns a Transformation Library (Lua module) by name. - [CreateLuaModule creates a Transformation Library (Lua module).](https://docs.metarouter.io/reference/controlservice_createluamodule.md): The module can be used anywhere in the cluster that a user is writing an expression. - [DeleteSecret](https://docs.metarouter.io/reference/controlservice_deletesecret.md): Permanently deletes the secret for the given id. - [GetSecret](https://docs.metarouter.io/reference/controlservice_getsecret.md): Returns the secret for the given id. - [CreateSecret creates a secret.](https://docs.metarouter.io/reference/controlservice_createsecret.md): Returns AlreadyExists if a secret with the same ID exists. - [CloneSecret clones a secret from an existing secret.](https://docs.metarouter.io/reference/controlservice_clonesecret.md): Fetches the source secret, applies removals, merges provided values, and stores as a new secret. Returns AlreadyExists if target ID exists. - [DeleteAudienceActivationConfig](https://docs.metarouter.io/reference/controlservice_deleteaudienceactivationconfig.md): Permanently deletes the audience activation config for the given id. - [GetAudienceActivationConfig](https://docs.metarouter.io/reference/controlservice_getaudienceactivationconfig.md): Returns the audience activation config for the given id. - [CreateAudienceActivationConfig](https://docs.metarouter.io/reference/controlservice_createaudienceactivationconfig.md): Creates or upserts an audience activation config. - [GetRuntimeAudienceActivationConfig](https://docs.metarouter.io/reference/controlservice_getruntimeaudienceactivationconfig.md): Returns the config with $$secret.KEY$$ values resolved. Useful for debugging audience activation configurations. - [DeleteMatchTableConfig](https://docs.metarouter.io/reference/controlservice_deletematchtableconfig.md): Permanently deletes the match table config for the given id. - [GetMatchTableConfig](https://docs.metarouter.io/reference/controlservice_getmatchtableconfig.md): Returns the match table config for the given id. - [CreateMatchTableConfig](https://docs.metarouter.io/reference/controlservice_creatematchtableconfig.md): Creates a match table configuration for building lookup tables from online data. - [ListMatchTableConfigs](https://docs.metarouter.io/reference/controlservice_listmatchtableconfigs.md): Lists all match table configurations. - [ValidateEvent parses and validates an event, returning its derived metadata.](https://docs.metarouter.io/reference/controlservice_validateevent.md): Uses the same parsing logic as the live ingestor pipeline. Call this when the user inputs or changes a test event to surface errors early. - [GetRuntimeMatchTableConfig](https://docs.metarouter.io/reference/controlservice_getruntimematchtableconfig.md): Returns the match table config with $$secret.KEY$$ values resolved. Useful for debugging match table configurations. - [ListRuntimeMatchTableConfigs](https://docs.metarouter.io/reference/controlservice_listruntimematchtableconfigs.md): Lists all match table configurations with $$secret.KEY$$ values resolved. Used by the retl matcher and generator services to fetch runtime-ready configs. - [CreateReplay](https://docs.metarouter.io/reference/controlservice_createreplay.md): Submits a data replay job; response carries run_id and workflow_name. - [GetRuntimeReplayConfig](https://docs.metarouter.io/reference/controlservice_getruntimereplayconfig.md): Returns the replay config with $$secret.KEY$$ values resolved. - [QueryDeliveryTimeseries returns event delivery (forwarder) counts bucketed by time, suitable for plotting trend charts in a single call.](https://docs.metarouter.io/reference/controlservice_querydeliverytimeseries.md): Returns one series per dimension tuple, each with an ordered, zero-filled array of {timestamp, success, errors, filtered} buckets at the requested interval. See the interval field for granularity and retention rules. Requires the read:analytics scope. Subject to the shared analytics rate limit (10 requests per minute). - [QueryIngestionTimeseries returns event ingestion counts bucketed by time, suitable for plotting trend charts in a single call.](https://docs.metarouter.io/reference/controlservice_queryingestiontimeseries.md): Returns one series per dimension tuple, each with an ordered, zero-filled array of {timestamp, success, errors} buckets at the requested interval. See the interval field for granularity and retention rules. Requires the read:analytics scope. Subject to the shared analytics rate limit (10 requests per minute).