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": 123,
      "project_id": 123,
      "test_ids": [
        "<string>"
      ],
      "snooze_until": "<string>",
      "description": "<string>",
      "created_from_test_run_id": 123,
      "created_by": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "scoped_to_environment_id": 123
    }
  }
}

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Body

application/json

Snooze to create.

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