# Authoritative response schema for Management API Test an Action

**URL:** <https://community.auth0.com/t/authoritative-response-schema-for-management-api-test-an-action/204234>\
**Category:** Get Help\
**Tags:** actions\
**Created:** [October 13, 2026, 8:38pm UTC](https://community.auth0.com/t/authoritative-response-schema-for-management-api-test-an-action/204234 "2026-10-13T20:38:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pariswolf911](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pariswolf911/32/81192_2.png) [@pariswolf911](https://community.auth0.com/u/pariswolf911)\
**Post date:** [October 13, 2026, 8:38pm UTC](https://community.auth0.com/t/authoritative-response-schema-for-management-api-test-an-action/204234/1 "2026-10-13T20:38:06Z")

</div>

Please provide the authoritative response contract and interpretation rules for the inner payload returned by Test an Action. We need evidence-backed fields proving terminal completion of the appointed Action, distinguishing expected api.access.deny from throws/timeouts/engine failures, covering the complete emitted access-token claim/effect set, and attributing console denial records to the tested deployed Action/version rather than echoed input. HTTP 200 or an empty payload cannot establish these properties. If the API cannot provide complete proof, please identify the officially supported mechanism that can.

---

<div class="post-metadata">

**Author:** ![gerald.czifra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerald.czifra/32/75301_2.png) [@gerald.czifra](https://community.auth0.com/u/gerald.czifra)\
**Post date:** [October 14, 2026, 5:44pm UTC](https://community.auth0.com/t/authoritative-response-schema-for-management-api-test-an-action/204234/3 "2026-10-14T17:44:14Z")

</div>

Hi @pariswolf911

Welcome to the Auth0 Community!

I understand that you are interested in authoritative response contract and interpretation rules for the inner payload returned by Test an Action.

The Management API’s “[Test an Action](https://auth0.com/docs/api/management/v2/actions/post-test-action)” endpoint cannot provide a rigidly versioned, evidence-backed response schema to programmatically prove terminal completion or token state. The officially supported mechanism to achieve this is [Unit Testing](https://auth0.com/docs/customize/actions/unit-test) using the `@auth0/actions` NPM package.

**Recommended Action**

Instead of using the “Test an Action” endpoint for programmatic CI/CD assertions, we can recommend using the `@auth0/actions` TypeScript definitions to mock the `event` and `api` objects in Jest (or your preferred framework). This provides a verifiable, mock-driven contract of your Action’s exact terminal behavior.

**How Unit Testing Fulfills Your Requirements**

The “Test an Action” endpoint is primarily designed to power the Auth0 Dashboard’s browser simulator. It relies on generic console outputs that cannot reliably distinguish an explicit `api.access.deny` from an unhandled throw or engine timeout. Moving to local/CI unit testing solves this:

- **Distinguishing Denials:** By mocking the `api` object (e.g., `access: { deny: jest.fn() }`), you can explicitly assert that the `deny()` method was intentionally invoked by your code, safely isolating it from unhandled exceptions or runtime timeouts.

- **Verifying Token Claims:** Instead of relying on an empty HTTP 200 payload, mock specific API interfaces like `api.accessToken.setCustomClaim`. You can then use spy assertions to inspect and verify the exact, complete set of claims and flow effects your handler emitted.

- **Proving Attribution:** Because unit tests execute directly against your version-controlled handler code, they guarantee that the test results and denial records are strictly attributed to the specific code version being tested, eliminating the ambiguity of unversioned console payloads.

We hope this helped you achieve a more robust and complete testing of your Actions, please reach out to us for any other issues or requests and we will gladly look into it.

Have a great one!  
Gerald

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 24, 2026, 5:44pm UTC](https://community.auth0.com/t/authoritative-response-schema-for-management-api-test-an-action/204234/4 "2026-10-24T17:44:56Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
