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

# Test an HTTP action with a real request

> Requires `actions:http:execute`. This makes a REAL HTTP request to the configured endpoint and can change external data. Only use on an explicit test request. Never retry automatically: a repeated request is a new invocation and may repeat side effects. Preserves existing duplicate protection, receipts and diagnostics; reconcile an uncertain result before a deliberate new invocation. Other families return ACTION_OPERATION_NOT_SUPPORTED. An invocation failure may return HTTP 200 with ok:false. Write-capable tests require confirmExternalEffects=true and the current configurationVersion. Obtain explicit user confirmation for this individual real HTTP request; never infer consent from management scopes or retry automatically. Missing/stale confirmation returns HTTP_TEST_CONFIRMATION_REQUIRED (403) before dispatch. Read-only tests do not require consent. This confirmation requirement also applies to deprecated Tools write tests: older clients must explicitly confirm and send configurationVersion. Explicit new Off mode returns ACTION_INACTIVE (403); historical inactive definitions without an explicit mode retain direct-test eligibility. No test endpoint for Sheets or collection actions; use Playground.



## OpenAPI

````yaml /openapi.json post /actions/{actionId}/test
openapi: 3.0.3
info:
  title: Visito M2M API
  version: 1.0.0
  description: >-
    Tenant-scoped server-to-server API for channels, conversations, commerce,
    custom AI tools, and WhatsApp templates. Send operations are asynchronous
    and return queued acknowledgements. Expansion adds conversation controls,
    knowledge, sales opportunities, delivery status, reporting, and signed
    webhooks.
servers:
  - url: https://platform-api.visitoai.com/m2m/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Channels
  - name: Conversations
  - name: Commerce
  - name: Custom tools
  - name: WhatsApp templates
  - name: Properties
  - name: Knowledge
  - name: Sales CRM
  - name: Delivery
  - name: Reporting
  - name: Webhooks
paths:
  /actions/{actionId}/test:
    post:
      tags:
        - Actions
      summary: Test an HTTP action with a real request
      description: >-
        Requires `actions:http:execute`. This makes a REAL HTTP request to the
        configured endpoint and can change external data. Only use on an
        explicit test request. Never retry automatically: a repeated request is
        a new invocation and may repeat side effects. Preserves existing
        duplicate protection, receipts and diagnostics; reconcile an uncertain
        result before a deliberate new invocation. Other families return
        ACTION_OPERATION_NOT_SUPPORTED. An invocation failure may return HTTP
        200 with ok:false. Write-capable tests require
        confirmExternalEffects=true and the current configurationVersion. Obtain
        explicit user confirmation for this individual real HTTP request; never
        infer consent from management scopes or retry automatically.
        Missing/stale confirmation returns HTTP_TEST_CONFIRMATION_REQUIRED (403)
        before dispatch. Read-only tests do not require consent. This
        confirmation requirement also applies to deprecated Tools write tests:
        older clients must explicitly confirm and send configurationVersion.
        Explicit new Off mode returns ACTION_INACTIVE (403); historical inactive
        definitions without an explicit mode retain direct-test eligibility. No
        test endpoint for Sheets or collection actions; use Playground.
      operationId: testHttpAction
      parameters:
        - name: actionId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolTestRequest'
      responses:
        '200':
          description: Successful action operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolTestResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
components:
  schemas:
    ToolTestRequest:
      type: object
      properties:
        input:
          type: object
          additionalProperties: true
        confirmExternalEffects:
          type: boolean
          description: >-
            Set true only after explicit user confirmation for this real
            write-capable HTTP test. Read-only tests do not require
            confirmation.
        configurationVersion:
          type: string
          description: >-
            Exact current configurationVersion from the tool configuration;
            required for write-capable tests.
      additionalProperties: false
    ToolTestResponse:
      type: object
      required:
        - ok
        - durationMs
      properties:
        ok:
          type: boolean
        output:
          type: object
          additionalProperties: true
        error:
          $ref: '#/components/schemas/ToolInvocationError'
        durationMs:
          type: integer
    ToolInvocationError:
      type: object
      required:
        - code
        - message
        - retryable
      properties:
        code:
          type: string
        message:
          type: string
        retryable:
          type: boolean
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: M2M_AUTH_INSUFFICIENT_SCOPE
            message:
              type: string
            details:
              type: object
              additionalProperties: true
      example:
        error:
          code: M2M_AUTH_INSUFFICIENT_SCOPE
          message: M2M credential does not have required scope.
          details:
            requiredScopes:
              - conversations:write
            missingScopes:
              - conversations:write
  responses:
    Error:
      description: Structured error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Visito M2M API key
      description: Server-side tenant-scoped credential created from Build > API Keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.