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

# Fire Sandbox Event

> Trigger a synthetic webhook event without running a real submission.

Looks up all assets in the submission and dispatches one event per asset to
all active subscriptions in the identity's workspace that subscribe to the
given event type.  No credits are consumed.  Useful for end-to-end testing
of your webhook handler before going live.

Authentication: Requires X-API-Key header with a sandbox (sk_test_) key.

Args:
    request_data: Event type and submission ID to target.
        For ``asset.processing.failed`` events an optional ``error_message`` is
        forwarded to subscribers; defaults to "Sandbox simulated failure".

Returns:
    FireSandboxEventResponse with the total count of subscriptions notified
    across all assets.

Raises:
    403: If the API key is not a sandbox (sk_test_) key.
    404: If the submission is not found in the authenticated workspace.
    422: If the request body fails validation.

Example:
    POST /api/v1/integrations/sandbox/events/fire
    {
        "eventType": "asset.processing.completed",
        "submissionId": "550e8400-e29b-41d4-a716-446655440000"
    }

    Response (200):
    { "dispatched": 2 }



## OpenAPI

````yaml /openapi.json post /api/integrations/sandbox/events/fire
openapi: 3.1.0
info:
  title: Midmarket Integrations API
  description: An API for Midmarket integrations.
  version: 0.1.0
servers:
  - url: https://mm-midmarket-integrations-api-preview.azurewebsites.net
    description: preview
security: []
paths:
  /api/integrations/sandbox/events/fire:
    post:
      tags:
        - sandbox
      summary: Fire Sandbox Event
      description: >-
        Trigger a synthetic webhook event without running a real submission.


        Looks up all assets in the submission and dispatches one event per asset
        to

        all active subscriptions in the identity's workspace that subscribe to
        the

        given event type.  No credits are consumed.  Useful for end-to-end
        testing

        of your webhook handler before going live.


        Authentication: Requires X-API-Key header with a sandbox (sk_test_) key.


        Args:
            request_data: Event type and submission ID to target.
                For ``asset.processing.failed`` events an optional ``error_message`` is
                forwarded to subscribers; defaults to "Sandbox simulated failure".

        Returns:
            FireSandboxEventResponse with the total count of subscriptions notified
            across all assets.

        Raises:
            403: If the API key is not a sandbox (sk_test_) key.
            404: If the submission is not found in the authenticated workspace.
            422: If the request body fails validation.

        Example:
            POST /api/v1/integrations/sandbox/events/fire
            {
                "eventType": "asset.processing.completed",
                "submissionId": "550e8400-e29b-41d4-a716-446655440000"
            }

            Response (200):
            { "dispatched": 2 }
      operationId: fire_sandbox_event_api_integrations_sandbox_events_fire_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FireSandboxEventRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FireSandboxEventResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - apiKey: []
components:
  schemas:
    FireSandboxEventRequest:
      properties:
        eventType:
          $ref: '#/components/schemas/WebhookEventType'
          description: The webhook event type to fire.
        submissionId:
          type: string
          format: uuid
          title: Submissionid
          description: Submission UUID to embed in the event payload.
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
          description: >-
            Error message forwarded to subscribers for 'asset.processing.failed'
            events. Defaults to 'Sandbox simulated failure' when omitted.
      type: object
      required:
        - eventType
        - submissionId
      title: FireSandboxEventRequest
      description: Request model for firing a synthetic sandbox webhook event.
      example:
        eventType: asset.processing.completed
        submissionId: 550e8400-e29b-41d4-a716-446655440000
    FireSandboxEventResponse:
      properties:
        dispatched:
          type: integer
          title: Dispatched
          description: Number of webhook subscriptions notified.
      type: object
      required:
        - dispatched
      title: FireSandboxEventResponse
      description: Response model for a fired sandbox event.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WebhookEventType:
      type: string
      enum:
        - asset.processing.completed
        - asset.processing.failed
      title: WebhookEventType
      description: All event types that can be delivered via webhooks.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Workspace-scoped API key. Format: sk_live_{64 hex chars}'
      x-default: sk_live_your_api_key_here

````