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

- **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-04-04** (v3) `317ec51848e3` — 1 info
  - added the new optional request property `type`
- **2024-03-26** (v3) `28d285e4302c` — 4 warning, 1 info
  - removed the optional property `allOf[#/components/schemas/util.ServerResponse]/data` from the response with the `200` status
  - removed the optional property `allOf[#/components/schemas/util.ServerResponse]/data` from the response with the `400` status
  - removed the optional property `allOf[#/components/schemas/util.ServerResponse]/data` from the response with the `401` status
  - removed the optional property `allOf[#/components/schemas/util.ServerResponse]/data` from the response with the `404` status
  - …1 more
- **2023-11-17** (v3) `41d4fca4cab8` — 1 info
  - endpoint added

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