---
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

> 60 revisions in range; 4 could not be searched.

- **2024-10-23** `01e1b4141daa` — 1 info
  - endpoint added
- **2024-01-30** `5a219dba9f40` — 1 breaking
  - api path removed without deprecation

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

---

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