---
title: "Test Custom Function Webhook"
method: POST
path: "/v1/agents/{agent_id}/test-function"
tags: ["Agents"]
---

# Test Custom Function Webhook

`POST /v1/agents/{agent_id}/test-function`

## Request

- Base URL: `https://api.call2me.app`
- URL: `https://api.call2me.app/v1/agents/{agent_id}/test-function`
- Auth: HTTP bearer

Probe a custom-function webhook URL and report what came back.

Same safety rails as the voice-agent runtime path:
  - https only
  - SSRF guard
  - 8s timeout
  - body truncated to 1500 chars

## Path parameters

- `agent_id` string, required

## Request body

- TestWebhookRequest
  - `url` string, required
  - `method` string
  - `headers` object, nullable
  - `sample_args` object, nullable

## Response `200`

Successful Response

- TestWebhookResponse
  - `ok` boolean, required
  - `status_code` integer, nullable
  - `elapsed_ms` integer
  - `body_preview` string
  - `error` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/call2me/apis/call2me-api.md) · [All operations](https://skmtc.dev/call2me/apis/call2me-api/llms.txt) · [OpenAPI document](https://skmtc.dev/call2me/apis/call2me-api/revisions/3951f9b7e47d?raw)
