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

# Configure destination test mode

> Enables or disables Meta Test Events mode for a destination owned by the authenticated Signal tracker.



## OpenAPI

````yaml https://plainrouter.com/openapi.json patch /destinations/{destination}/test-mode
openapi: 3.1.0
info:
  title: PlainRouter Conversion API
  version: 0.5.0
  description: PlainRouter public Signals Conversion API.
servers:
  - url: https://plainrouter.com/api/v1
    description: Production
security:
  - signalTrackerSecret: []
paths:
  /destinations/{destination}/test-mode:
    patch:
      tags:
        - Operations
      summary: Configure destination test mode
      description: >-
        Enables or disables Meta Test Events mode for a destination owned by the
        authenticated Signal tracker.
      operationId: setDestinationTestMode
      parameters:
        - name: destination
          in: path
          required: true
          description: The destination ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                test_event_code:
                  type:
                    - string
                    - 'null'
                  maxLength: 100
              required:
                - enabled
      responses:
        '200':
          description: Updated destination and its effective test-mode state.
          content:
            application/json:
              schema:
                type: object
                properties:
                  destination:
                    type: object
                    properties:
                      id:
                        type: string
                      signal_tracker_id:
                        type: string
                      platform_ad_account_id:
                        type:
                          - integer
                          - 'null'
                      type:
                        $ref: '#/components/schemas/DestinationType'
                      credential_source:
                        $ref: '#/components/schemas/DestinationCredentialSource'
                      config:
                        anyOf:
                          - type: object
                            additionalProperties: {}
                          - type: array
                            items: {}
                          - type: 'null'
                      status:
                        $ref: '#/components/schemas/DestinationStatus'
                      created_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - signal_tracker_id
                      - platform_ad_account_id
                      - type
                      - credential_source
                      - config
                      - status
                      - created_at
                      - updated_at
                  test_mode:
                    type: boolean
                required:
                  - destination
                  - test_mode
        '401':
          description: Invalid or missing Signal tracker secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
components:
  schemas:
    DestinationType:
      type: string
      enum:
        - meta
      title: DestinationType
    DestinationCredentialSource:
      type: string
      enum:
        - oauth_connection
        - managed_token
      title: DestinationCredentialSource
    DestinationStatus:
      type: string
      enum:
        - active
        - inactive
      title: DestinationStatus
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorMessage
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
      title: ValidationError
  securitySchemes:
    signalTrackerSecret:
      type: http
      description: >-
        Per-tracker bearer secret. It authenticates only the Signal tracker
        represented by the credential.
      scheme: bearer

````