v2

latestOpenAPI 3.1.12026-07-2613060964.2 KB

Update Mock Data

Update the mock data for a template. Sets the input payload, recipient, tenant, actor, and batching configuration used for previews and testing.

patch/v2/{workspace}/template/{template_slug}/mock_data/

Path parameters

workspacestring required
template_slugstring required

Request body

payloadobject

Input payload data with sample variable values.

tenant_idstring

Tenant ID for preview.

is_batchboolean

Whether to simulate batched/digest data.

batch_countinteger

Number of batched events to simulate (only relevant when is_batch is true).

recipient_sub_type'user' | 'object'

Type of recipient.

recipient_distinct_idstring

Distinct ID of the test recipient (when recipient_sub_type is user).

actor_sub_type'user' | 'object'

Type of actor.

actor_distinct_idstring

Distinct ID of the actor user.

Example request

{
  "tenant_id": "default",
  "batch_count": 2,
  "recipient_sub_type": "user",
  "recipient_distinct_id": "user-123"
}

Response

Mock data updated successfully. Returns the same structure as Get Mock Data - both data (raw config) and transformed_data (resolved values).

object required