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

---

[API](https://skmtc.net/frain-dev/apis/convoy-api-reference.md) · [All operations](https://skmtc.net/frain-dev/apis/convoy-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/frain-dev/convoy-api-reference/versions/dbd5b4f9cf13/schema)
