Skip to main content
POST
/
api
/
snoozes
Create Snooze
curl --request POST \
  --url https://dash.empirical.run/api/snoozes \
  --header 'Content-Type: application/json' \
  --data '
{
  "test_ids": [
    "<string>"
  ],
  "snooze_until": "<string>",
  "description": "<string>",
  "created_by": "<string>",
  "scoped_to_environment_id": 123
}
'
{
  "data": {
    "snooze": {
      "id": 13,
      "test_ids": [
        "a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee"
      ],
      "snooze_until": "2026-04-01T00:00:00.000Z",
      "description": "Known flaky test, tracking in JIRA-5678",
      "created_from_test_run_id": null,
      "created_by": null,
      "created_at": "2026-03-25T10:30:00.000Z",
      "updated_at": "2026-03-25T10:30:00.000Z",
      "scoped_to_environment_id": null
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.empirical.run/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new snooze to temporarily suppress test failures for the specified Playwright tests.

Examples

{
  "data": {
    "snooze": {
      "id": 13,
      "test_ids": [
        "a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee"
      ],
      "snooze_until": "2026-04-01T00:00:00.000Z",
      "description": "Known flaky test, tracking in JIRA-5678",
      "created_from_test_run_id": null,
      "created_by": null,
      "created_at": "2026-03-25T10:30:00.000Z",
      "updated_at": "2026-03-25T10:30:00.000Z",
      "scoped_to_environment_id": null
    }
  }
}

Basic snooze

curl -X POST \
  https://dash.empirical.run/api/snoozes \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY" \
  -d '{
    "test_ids": ["a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee"],
    "snooze_until": "2026-04-01T00:00:00.000Z",
    "description": "Known flaky test, tracking in JIRA-5678"
  }'

Scoped to environment

curl -X POST \
  https://dash.empirical.run/api/snoozes \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY" \
  -d '{
    "test_ids": [
      "a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee",
      "b41b7fca7423g7c98fb6-66f352gcf4g5c9bf72ff"
    ],
    "snooze_until": "2026-04-15T00:00:00.000Z",
    "description": "Staging environment flakiness",
    "scoped_to_environment_id": 7
  }'

Body

application/json

Request body.

test_ids
string[]
required

Array of Playwright test IDs (41-character hashes) to snooze.

Minimum array length: 1
snooze_until
string
required

ISO 8601 timestamp for when the snooze should expire.

description
string

Optional description explaining why the tests are being snoozed.

created_by
string

Optional user identifier for the snooze creator. Set automatically for dashboard users.

scoped_to_environment_id
number

Environment ID to scope the snooze to. If omitted, applies to all environments.

Response

Created snooze.

data
object
required

Created snooze.