---
title: "Test a subscription function"
method: POST
path: "/v1/projects/{projectID}/subscriptions/test_function"
tags: ["Subscriptions"]
---

# Test a subscription function

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

This endpoint test runs a transform function against a payload.

## 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-03-26** `2ddfad646792` — 1 info
  - api operation id `TestSubscriptionFunction` was added
- **2024-01-30** `5a219dba9f40` — 1 info
  - api operation id `TestSubscriptionFunction` removed and replaced with ``

[Change history](https://skmtc.dev/frain-dev/apis/convoy-api-reference/changes/v1/projects/:projectID/subscriptions/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)
