Skip to main content
POST
/
api
/
snoozes
Create Snooze
curl --request POST \
  --url https://dash.empirical.run/api/snoozes \
  --header 'Authorization: Bearer <token>' \
  --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
    }
  }
}
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
  }'

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Body

application/json

Snooze to create.

test_ids
string[]
required
Minimum array length: 1
snooze_until
string
required
description
string
created_by
string
scoped_to_environment_id
number

Response

Created snooze.

data
object
required