---
title: "Update Mock Data"
method: PATCH
path: "/v2/{workspace}/template/{template_slug}/mock_data/"
---

# Update Mock Data

`PATCH /v2/{workspace}/template/{template_slug}/mock_data/`

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

## Path parameters

- `workspace` string, required
- `template_slug` string, required

## Request body

- object
  - `payload` object — Input payload data with sample variable values.
  - `tenant_id` string — Tenant ID for preview.
  - `is_batch` boolean — Whether to simulate batched/digest data.
  - `batch_count` integer — Number of batched events to simulate (only relevant when `is_batch` is true).
  - `recipient_sub_type` 'user' | 'object' — Type of recipient.
  - `recipient_distinct_id` string — Distinct ID of the test recipient (when `recipient_sub_type` is `user`).
  - `recipient_object` object — Object identifier (when `recipient_sub_type` is `object`).
    - `object_type` string
    - `id` string
  - `actor_sub_type` 'user' | 'object' — Type of actor.
  - `actor_distinct_id` string — Distinct ID of the actor user.
  - `actor_object` object — Object identifier for actor.
    - `object_type` string
    - `id` string

## Response `200`

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

- object

## Other responses

- `401` — Authentication failed
- `404` — Resource not found

---

[API](https://skmtc.dev/suprsend/apis/suprsend-api.md) · [All operations](https://skmtc.dev/suprsend/apis/suprsend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/suprsend/suprsend-api/revisions/12383393d147/schema)
