> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Mock Data

> Retrieve the mock data (input payload, recipient, tenant, actor settings) for a template. Used for previewing and testing.



## OpenAPI

````yaml GET /v2/{workspace}/template/{template_slug}/mock_data/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v2/{workspace}/template/{template_slug}/mock_data/:
    get:
      summary: Get Mock Data
      description: >-
        Retrieve the mock data (input payload, recipient, tenant, actor
        settings) for a template. Used for previewing and testing.
      operationId: get-mock-data-v2
      parameters:
        - in: path
          name: workspace
          required: true
          schema:
            type: string
        - in: path
          name: template_slug
          required: true
          schema:
            type: string
        - in: query
          name: mode
          schema:
            type: string
            enum:
              - draft
              - live
            default: draft
      responses:
        '200':
          description: >-
            Mock data retrieved. Returns both the raw `data` (what the user
            configured) and the `transformed_data` (resolved values including
            tenant, recipient, actor properties, and batched events).
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The raw mock data configuration set by the user.
                    properties:
                      payload:
                        type: object
                      tenant_id:
                        type: string
                        nullable: true
                      is_batch:
                        type: boolean
                      batch_count:
                        type: integer
                      recipient_sub_type:
                        type: string
                        enum:
                          - user
                          - object
                      recipient_object:
                        type: object
                        nullable: true
                      recipient_distinct_id:
                        type: string
                        nullable: true
                      actor_sub_type:
                        type: string
                        enum:
                          - user
                          - object
                      actor_object:
                        type: object
                        nullable: true
                      actor_distinct_id:
                        type: string
                        nullable: true
                  transformed_data:
                    type: object
                    description: >-
                      Resolved data used for rendering previews - includes
                      tenant branding, recipient/actor profiles, batched events,
                      and preference URLs.
              example:
                data:
                  payload:
                    order_id: ORD-8821
                    order_total: $149.99
                    delivery_date: '2026-04-10'
                    tracking_url: https://yourapp.com/track/ORD-8821
                  tenant_id: tenant_abc
                  is_batch: false
                  batch_count: 2
                  recipient_sub_type: user
                  recipient_object: null
                  recipient_distinct_id: user_12345
                  actor_sub_type: user
                  actor_object: null
                  actor_distinct_id: null
                transformed_data:
                  order_id: ORD-8821
                  order_total: $149.99
                  delivery_date: '2026-04-10'
                  tracking_url: https://yourapp.com/track/ORD-8821
                  $batch_key: evaluated batch_key
                  $batched_events:
                    - order_id: ORD-8821
                      order_total: $149.99
                    - order_id: ORD-8821
                      order_total: $149.99
                  $batched_events_count: 2
                  $brand:
                    brand_id: tenant_abc
                    brand_name: Acme Inc.
                    logo: https://cdn.acme.com/logo.png
                    primary_color: '#1a73e8'
                    secondary_color: '#34a853'
                    tertiary_color: '#ffffff'
                    embedded_preference_url: https://preferences.example.com/embed
                    hosted_preference_domain: preferences.example.com
                    blocked_channels: null
                    social_links:
                      website: https://www.example.com
                      linkedin: https://linkedin.com/company/example
                      twitter: ''
                    properties: {}
                    timezone: America/New_York
                  $user:
                    name: Jamie Rivera
                    email: jamie.rivera@example.com
                  $recipient:
                    name: Jamie Rivera
                    email: jamie.rivera@example.com
                  $actor: {}
                  $embedded_preference_url: https://preferences.example.com/embed
                  $hosted_preference_url: https://preferences.example.com/?key=xxxxxxxxxxxxxxx
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - ServiceTokenAuth: []
      servers:
        - url: https://management-api.suprsend.com
      x-codeSamples:
        - lang: cURL
          label: Get Mock Data
          source: >
            curl -X GET
            "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/mock_data/?mode=draft"
            \
              --header 'Authorization: ServiceToken <token>'
components:
  responses:
    AuthenticationError:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            error_code: authentication_failed
            type: AuthenticationFailed
            message: Invalid service token.
            detail: Invalid service token.
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 404
            error_code: not_found
            type: NotFound
            message: workspace 'demo' not found
            detail: workspace 'demo' not found
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code
        error_code:
          type: string
          description: Specific error code identifier
        type:
          type: string
          description: Error type classification
        message:
          type: string
          description: Human-readable error message
        detail:
          type: string
          description: Additional error details
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.
    ServiceTokenAuth:
      type: apiKey
      in: header
      name: ServiceToken <token>
      description: >-
        You can get Service Token from [SuprSend dashboard -> Account Settings
        -> Service
        Tokens](https://app.suprsend.com/en/account-settings/service-tokens)
        section.

````