Skip to main content

Webhooks Overview

DATA Reshape webhooks provide server-to-server endpoints for sending tracking data directly from your backend systems. This enables reliable data collection without browser dependencies — ideal for e-commerce platforms, CRM systems, and any scenario where server-side tracking is required.

Prerequisites

Plan Requirements

Webhook access is available with Data Source Addon on FLEX plan and above. Contact DATA Reshape team to enable access for your account.

Once approved, you'll receive:

  • Script ID — your unique project identifier (8 characters, uppercase alphanumeric)
  • Access Token — secret authentication key
  • Webhook Base URL — your configured endpoint (e.g. https://dre2.yourdomain.com)

Authentication

All webhook requests require:

  • Method: POST
  • Content-Type: application/json
  • Header: X-Dre-Access-Token: YOUR_ACCESS_TOKEN
  • Query Parameter: id=YOUR_SCRIPT_ID

Integration Methods

Standard Integration

Universal endpoint for tracking any approved event using the Reshape Standard Syntax.

Event Create — single endpoint for all event types (checkout_completed, lead_created, order_canceled, etc.) with support for products, shipping, payments, coupons, user data, cookies, and consent.

$endpoint = 'https://dre2.yourdomain.com/webhooks/reshape/event?id=YOUR_SCRIPT_ID';

$ch = curl_init($endpoint);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Dre-Access-Token: YOUR_ACCESS_TOKEN'
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30
]);

$response = curl_exec($ch);
curl_close($ch);

Custom Integration

CUSTOM Plan Exclusive

Available exclusively for CUSTOM plan subscribers with dedicated development resources.

About Custom Integration — specialized webhook endpoints designed for your specific business logic, data structures, and operational workflows. Built by the DATA Reshape team in collaboration with your technical team.

Response Format

Success

{
"emitter": "DATA Reshape",
"detail": "Received. This has been processed.",
"level": 2,
"warnings": []
}

Success with Warnings

{
"emitter": "DATA Reshape",
"detail": "Received. This has been processed.",
"level": 2,
"warnings": [
"context.url is missing. Fallback to config host.",
"consent object does not match the required format and will be set to an object with all values set to true."
]
}

Error

{
"emitter": "DATA Reshape",
"detail": "event.id is missing or does not match the required format.",
"level": 2
}

Development Mode

Use context.environment: "dev" or append /test to the endpoint URL to validate payloads without processing:

{
"emitter": "DATA Reshape",
"detail": "Received. This will NOT be processed.",
"level": 2,
"warnings": [],
"data_received": { }
}

Getting Started

  1. Get credentials — contact the DATA Reshape team for your Script ID and Access Token
  2. Review the data objects — see Objects Documentation for the complete reference
  3. Implement the endpoint — use Event Create for standard integration
  4. Test with dev mode — validate payloads using environment: "dev" before going to production
  5. Go live — switch to environment: "prod" when ready

Support