> ## 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.

# Create a snooze

> Creates a snooze to temporarily suppress failures for the given Playwright tests until `snooze_until`.



## OpenAPI

````yaml /api-reference/openapi.generated.json post /api/snoozes
openapi: 3.1.0
info:
  title: Empirical API
  version: 1.0.0
  description: Programmatic access to Empirical test runs, snoozes, and more.
  contact:
    name: Empirical
    url: https://empirical.run
servers:
  - url: https://api.empirical.run
security:
  - Bearer: []
tags:
  - name: Snoozes
    description: Temporarily suppress known test failures for specific Playwright tests.
paths:
  /api/snoozes:
    post:
      tags:
        - Snoozes
      summary: Create a snooze
      description: >-
        Creates a snooze to temporarily suppress failures for the given
        Playwright tests until `snooze_until`.
      operationId: createSnooze
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSnoozeRequest'
      responses:
        '200':
          description: The created snooze.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnoozeResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateSnoozeRequest:
      type: object
      properties:
        test_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: Array of Playwright test IDs (41-character hashes) to snooze.
        snooze_until:
          type: string
          description: ISO 8601 timestamp for when the snooze should expire.
        description:
          type: string
          description: Optional description explaining why the tests are being snoozed.
        created_by:
          type: string
          description: >-
            Optional user identifier for the snooze creator. Set automatically
            for dashboard users.
        scoped_to_environment_id:
          type: number
          description: >-
            Environment ID to scope the snooze to. If omitted, applies to all
            environments.
        created_from_test_run_id:
          anyOf:
            - type: string
            - type: number
          description: ID of the test run this snooze was created from, if applicable.
      required:
        - test_ids
        - snooze_until
    SnoozeResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            snooze:
              $ref: '#/components/schemas/Snooze'
          required:
            - snooze
          description: Response payload.
      required:
        - data
    ErrorResponse:
      type: object
      properties:
        data:
          nullable: true
          description: Always null for error responses.
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable error message.
          required:
            - message
          description: Error details.
      required:
        - data
        - error
    Snooze:
      type: object
      properties:
        id:
          type: number
          description: Unique identifier for the snooze.
        test_ids:
          type: array
          items:
            type: string
          description: Array of Playwright test IDs (41-character hashes) that are snoozed.
        snooze_until:
          type: string
          description: >-
            ISO 8601 timestamp for when the snooze expires. Active when in the
            future.
        description:
          type: string
          nullable: true
          description: Description of why the tests are snoozed.
        created_from_test_run_id:
          type: number
          nullable: true
          description: >-
            ID of the test run that triggered the snooze creation, if
            applicable.
        created_by:
          type: string
          nullable: true
          description: >-
            User ID of the creator. Set automatically for dashboard users;
            `null` for API-created snoozes.
        created_at:
          type: string
          description: ISO 8601 timestamp of when the snooze was created.
        updated_at:
          type: string
          description: ISO 8601 timestamp of when the snooze was last updated.
        scoped_to_environment_id:
          type: number
          nullable: true
          description: >-
            Environment ID this snooze is scoped to. `null` if it applies to all
            environments.
      required:
        - id
        - test_ids
        - snooze_until
        - description
        - created_from_test_run_id
        - created_by
        - created_at
        - updated_at
        - scoped_to_environment_id
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````