Mute a monitor for one test
Requires the Mute monitors permission.
Mutes the monitor for the test until muteUntil, at most 30 days away, or with no end, and returns the monitor’s state for the test. The monitor must be active on the test (409 MONITOR_NOT_ACTIVE otherwise). A test already muted is left as it is, with its end and reason.
Muting a monitor for a test stops it from counting toward the test’s status, and removes the labels it applied to the test, as muting it in the web app does. Unmuting puts both back. A change to a monitor that classifies reconciles the test’s status, which can send the v2.test_case.status_changed webhook.
The change is recorded as made by the person whose token made the call, and as API token for an API token, on the test’s state and in the mute history.
Idempotency-Key is not honored. The change is idempotent by state, so a request whose outcome is unknown is safe to send again: a test already in the requested state reports unchanged.
Authorizations
An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the permissions it holds. A key with none can read merge queues but change nothing in them. Permissions cover merge queues and test-result uploads, including the quarantine lookups a CI run makes before it uploads; any key can call the other Flaky Tests and Dynamic CI endpoints, including their writes.
Path Parameters
Body
How long, and why, to mute the monitor for one test.
Response
The monitor's state for the test
One test a monitor holds: one it is active on, or one whose mute on it is in force.