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

# Test an HTTP request block

> Sends the request an HTTP request block holds, with its variables already replaced by sample values, and returns the status, a safe subset of the response headers and the body (truncated to 20,000 characters). Request headers and connection credentials are never echoed. A request that could not be sent still answers 200 with `ok` false and an error code. Administrator access is required.



## OpenAPI

````yaml /openapi/application.json post /api/v1/accounts/{account_id}/flow_builder/http_requests/test
openapi: 3.1.0
info:
  title: WiseApp API — Aplicação
  description: >-
    Referência completa da API do WiseApp: plataforma (provisionamento),
    aplicação (conta), cliente (canais públicos) e MCP.
  version: 1.1.0
servers:
  - url: https://chat.wiseapp360.com
    description: Sua instalação WiseApp
security: []
paths:
  /api/v1/accounts/{account_id}/flow_builder/http_requests/test:
    parameters:
      - $ref: '#/components/parameters/account_id'
        schema:
          type: string
        example: sample
    post:
      tags:
        - Flow Builder
      summary: Test an HTTP request block
      description: >-
        Sends the request an HTTP request block holds, with its variables
        already replaced by sample values, and returns the status, a safe subset
        of the response headers and the body (truncated to 20,000 characters).
        Request headers and connection credentials are never echoed. A request
        that could not be sent still answers 200 with `ok` false and an error
        code. Administrator access is required.
      operationId: test-flow-builder-http-request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/flow_builder_http_request_test_payload'
            examples:
              get_with_connection:
                summary: GET a path under a saved connection
                value:
                  http_request:
                    method: GET
                    connection_id: 3
                    url: /orders
                    query:
                      - key: email
                        value: jane@example.com
              post_json:
                summary: POST a JSON body to a full URL
                value:
                  http_request:
                    method: POST
                    url: https://hooks.example.com/leads
                    headers:
                      - key: X-Request-Source
                        value: flow-builder
                    body_type: json
                    body: '{"name":"Jane Doe","phone":"+15550100"}'
      responses:
        '200':
          description: Test result, sent or not.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow_builder_http_request_test_result'
              examples:
                success:
                  summary: Response received
                  value:
                    ok: true
                    method: GET
                    url: https://api.example.com/v1/orders?email=jane%40example.com
                    status: 200
                    headers:
                      content-type: application/json
                    body:
                      orders:
                        - id: A-1001
                          status: shipped
                    truncated: false
                timeout:
                  summary: Request could not be sent
                  value:
                    ok: false
                    error: timeout
                    message: The request timed out
        '401':
          description: >-
            Unauthenticated, not a member of the account, or not an account
            administrator (Flow Builder is administrator-only).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow_builder_error'
              example:
                error: You are not authorized to do this action
        '403':
          description: The Flow Builder feature is not enabled for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flow_builder_error'
              example:
                error: Flow Builder is not enabled for this account
        '422':
          description: >-
            The request configuration is invalid (unsupported method or body
            type, invalid headers, or no URL and no connection).
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                      - HTTP request node test has an unknown body type
              example:
                message: Validation failed
                attributes:
                  - name cannot be blank
      security:
        - userApiKey: []
components:
  parameters:
    account_id:
      in: path
      name: account_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the account
  schemas:
    flow_builder_http_request_test_payload:
      type: object
      required:
        - http_request
      properties:
        http_request:
          type: object
          description: A URL is required unless `connection_id` is given.
          properties:
            method:
              type: string
              enum:
                - GET
                - POST
                - PUT
                - PATCH
                - DELETE
              default: GET
              example: GET
            url:
              type: string
              description: >-
                Full http(s) URL, or a path under the connection's base URL when
                `connection_id` is given. Variables must already be replaced by
                sample values.
              example: /orders
            connection_id:
              type: integer
              description: >-
                Optional saved connection whose base URL, default headers and
                auth are used.
              example: 3
            query:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                    example: email
                  value:
                    type: string
                    example: jane@example.com
            headers:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                    example: X-Request-Source
                  value:
                    type: string
                    example: flow-builder
            body_type:
              type: string
              enum:
                - none
                - json
                - text
              default: none
              description: Body format, used with POST, PUT and PATCH.
              example: json
            body:
              type: string
              description: Request body. For `json` send the JSON text.
              example: '{"email":"jane@example.com"}'
    flow_builder_http_request_test_result:
      type: object
      description: >
        Result of a test request. On success it holds the HTTP status, a safe
        subset of the response headers and the body

        (truncated to 20,000 characters). When the request could not be sent it
        holds `ok: false`, an `error` code

        (`blocked`, `timeout`, `too_large`, `invalid_url`, `request_failed`,
        `connection`) and a `message`.

        Request headers and connection credentials are never echoed.
      required:
        - ok
      properties:
        ok:
          type: boolean
          description: True when the response status is 2xx.
          example: true
        method:
          type: string
          example: GET
        url:
          type: string
          description: Final URL that was requested, without credentials.
          example: https://api.example.com/v1/orders?email=jane%40example.com
        status:
          type: integer
          example: 200
        headers:
          type: object
          additionalProperties: true
          example:
            content-type: application/json
        body:
          description: Parsed JSON body, or text.
          example:
            orders:
              - id: A-1001
                status: shipped
        truncated:
          type: boolean
          example: false
        error:
          type: string
          description: Error code when the request could not be sent.
          example: timeout
        message:
          type: string
          description: Error message when the request could not be sent.
    flow_builder_error:
      type: object
      description: >-
        Error returned by Flow Builder endpoints when the feature is disabled,
        the user is not authorized or the resource is missing.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: Flow Builder is not enabled for this account
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        Token de acesso do usuário (Perfil → Token de acesso). Dá acesso
        conforme o papel do usuário e age em nome dele.

````

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