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

# Test Voice Agent Webhook Tool

> Send one real request to a webhook tool's endpoint, the way an agent would during a conversation

> [!WARNING]
>
> This sends a real request to your endpoint and can have side effects, such as
> creating a record. Test against an endpoint where that is safe.

The tool's stored method, URL, headers (including credentials), body template and request signing are applied to the `arguments` you send, and the endpoint's response comes back in the result. `{{name}}` placeholders in the URL are filled in from `arguments` too, as they are during a call, with each value URL-encoded. A placeholder with no value becomes empty.

The request body is optional. Leaving it out is the same as sending `{}`.

A failure to reach your endpoint is not an HTTP error: the call returns `200` and `error` says what went wrong. The call returns `400` for a client tool, which has no server-side request, for a URL or host that isn't allowed, and for a header that doesn't render to a valid value.

Each team can make 30 calls per minute to this endpoint. The 31st call within the same minute returns `429`, and the count starts again in the next minute.

For how webhook tools are built and tested in the console, see [Webhook Tools](https://docs.fish.audio/agents/build/webhook-tools.md).


## OpenAPI

````yaml post /v1/agent/tools/{tool_id}/test
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/agent/tools/{tool_id}/test:
    post:
      tags:
        - Agent Tools
      summary: Test Tool
      description: >-
        Call a webhook tool's endpoint once, the way an agent would during a

        conversation: the stored method, URL, headers (credentials included),

        body template and request signing are applied to `arguments`, and the

        response comes back in the result. `{{name}}` placeholders in the URL
        are

        filled in from `arguments` too, with each value URI-encoded as in

        JavaScript's `encodeURIComponent`; a placeholder with no value becomes

        empty. The URL is checked again after that, so a host that is not
        allowed

        returns 400. **This is a real request to your

        endpoint and can have side effects**, such as creating a record.


        The body is optional; leaving it out is the same as sending `{}`.
        Unknown

        request fields return 422. Client tools have no server-side request and

        return 400, as does a URL or host that is not allowed or a header that
        does

        not render to a valid value.


        A failure to reach your endpoint is not an HTTP error: the call returns

        200 and `error` says what went wrong.


        Each team can make 30 of these calls per minute; the 31st within the
        same

        minute returns 429 and the count starts again the next minute.
      parameters:
        - in: path
          name: tool_id
          description: ''
          required: true
          schema:
            title: Tool Id
            type: string
          deprecated: false
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                arguments:
                  type: object
                  additionalProperties: true
                  description: >-
                    Values for the tool's arguments, as the agent would supply
                    them during a call. Omit for none.
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                description: >-
                  Result of one real request to a webhook tool's endpoint. A
                  failure to

                  reach your endpoint is reported in `error`, not as an HTTP
                  error.
                properties:
                  status_code:
                    anyOf:
                      - type: integer
                      - type: 'null'
                    default: null
                    description: >-
                      HTTP status your endpoint returned; null when it was never
                      reached.
                    title: Status Code
                  status_text:
                    default: ''
                    description: Reason phrase that came with the status, if any.
                    title: Status Text
                    type: string
                  latency_ms:
                    description: >-
                      Time from sending the request to the response, in
                      milliseconds.
                    title: Latency Ms
                    type: integer
                  response_body:
                    default: ''
                    description: >-
                      Response body as text, cut to a size limit (see
                      `response_truncated`).
                    title: Response Body
                    type: string
                  response_headers:
                    additionalProperties:
                      type: string
                    description: Response headers from your endpoint.
                    title: Response Headers
                    type: object
                  response_truncated:
                    default: false
                    description: >-
                      True when `response_body` was cut because the response was
                      larger than the limit.
                    title: Response Truncated
                    type: boolean
                  error:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      Short reason when the request could not be completed; null
                      when your endpoint answered.
                    title: Error
                required:
                  - latency_ms
                type: object
        '400':
          description: Bad request syntax or unsupported method
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '404':
          description: Nothing matches the given URI
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '422':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '429':
          description: >-
            The user has sent too many requests in a given amount of time ("rate
            limiting")
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '503':
          description: The server cannot process the request due to a high load
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: bash
          label: Test Webhook Tool
          source: |-
            curl --request POST \
              --url https://api.fish.audio/v1/agent/tools/<tool-id>/test \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
                "arguments": {"date": "2026-07-03"}
              }'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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