---
title: "Validate source function"
method: POST
path: "/v1/projects/{projectID}/sources/test_function"
tags: ["Subscriptions"]
---

# Validate source function

`POST /v1/projects/{projectID}/sources/test_function`

This endpoint validates that a filter will match a certain payload structure.

## Path parameters

- `projectID` string, required

## Request body

- ModelsFunctionRequest
  - `function` string
  - `payload` object, nullable
  - `type` string

## Response `200`

OK

- object
  - `message` string
  - `status` boolean
  - `data` ModelsFunctionResponse
    - `log` string[]
    - `payload` unknown

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

## Changes

- **2026-07-20** (v3) `bae289777c91` — 6 breaking, 4 info
  - the response property `allOf[subschema #2]/data` became nullable for the status `400`
  - the response property `allOf[subschema #2]/data` became nullable for the status `401`
  - the response property `allOf[subschema #2]/data` became nullable for the status `404`
  - the `allOf[subschema #2]/data` response's property type/format changed from `object`/`` to ``/`` for status `400`
  - …6 more
- **2024-10-23** (v3) `de665d0e2fc3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/getconvoy/apis/convoy-api-reference/changes/v1/projects/:projectID/sources/test_function/post.md)

---

[API](https://skmtc.dev/getconvoy/apis/convoy-api-reference.md) · [All operations](https://skmtc.dev/getconvoy/apis/convoy-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getconvoy/convoy-api-reference/revisions/df004d06c6c2/schema)
