> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sagescreen.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Check if test invite was accessed/completed

> Returns the current state of a sage's test invite: whether the
invite link has been opened, the timestamp it was accessed, the
full test invite data, and whether the associated test screen
has reached a terminal status (`ss_completed` or `ss_closed`).

**Read-only** — no side effects.

Registered as `wp_ajax_sagescreen_check_test_invite_status` — **login required**.




## OpenAPI

````yaml /openapi/private/specs/wp/screen.yml post /wp-admin/admin-ajax.php?action=sagescreen_check_test_invite_status
openapi: 3.1.0
info:
  title: SageScreen — Screen Module
  description: |
    Screen (interview) lifecycle management. A screen represents a single
    candidate screening session — from invite creation through completion,
    results generation, and PDF download.

    **CPT:** `ss_screen`
    **Custom statuses:** `ss_draft`, `ss_invited`, `ss_accepted`, `ss_started`,
    `ss_completed`, `ss_closed`, `ss_cancelled`, `ss_expired`

    Screens are created when candidates are invited to a sage, progress through
    the interview, and conclude with AI-generated results including category
    scores, a summary, recommendation, and a hire/no-hire determination.
  version: 1.0.0
servers:
  - url: https://{domain}/wp-json/sagescreen/v1
    description: WordPress REST API
    variables:
      domain:
        default: api.sagescreen.app
security: []
tags:
  - name: Screen – Testing
    description: Test invite and temperature check endpoints
  - name: Screen – Results
    description: Results generation, checking, regeneration, feedback, and download
  - name: Screen – Workflow
    description: Workflow progression (skip testing)
paths:
  /wp-admin/admin-ajax.php?action=sagescreen_check_test_invite_status:
    post:
      tags:
        - Screen – Testing
      summary: Check if test invite was accessed/completed
      description: >
        Returns the current state of a sage's test invite: whether the

        invite link has been opened, the timestamp it was accessed, the

        full test invite data, and whether the associated test screen

        has reached a terminal status (`ss_completed` or `ss_closed`).


        **Read-only** — no side effects.


        Registered as `wp_ajax_sagescreen_check_test_invite_status` — **login
        required**.
      operationId: ajaxCheckTestInviteStatus
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CheckTestInviteStatusRequest'
      responses:
        '200':
          description: Invite status result
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CheckTestInviteStatusSuccess'
                  - $ref: '#/components/schemas/AjaxErrorResponse'
              examples:
                accessed:
                  summary: Invite accessed and test completed
                  value:
                    success: true
                    data:
                      sage_id: 1234
                      invite_accessed: true
                      accessed_at: '2026-02-19 14:30:00'
                      test_invite_data:
                        invite_key: abc123def456ghi789jkl012mno345pq
                        invite_url: >-
                          https://api.sagescreen.app/screen/invite/abc123def456ghi789jkl012mno345pq
                        test_screen_id: 5678
                        sent_to: admin@greenville.gov
                        sent_at: '2026-02-19 10:00:00'
                        expires_at: '2026-02-26'
                        sent_by: 42
                      test_completed: true
                notAccessed:
                  summary: Invite not yet accessed
                  value:
                    success: true
                    data:
                      sage_id: 1234
                      invite_accessed: false
                      accessed_at: ''
                      test_invite_data:
                        invite_key: abc123def456ghi789jkl012mno345pq
                        invite_url: >-
                          https://api.sagescreen.app/screen/invite/abc123def456ghi789jkl012mno345pq
                        test_screen_id: 5678
                        sent_to: admin@greenville.gov
                        sent_at: '2026-02-19 10:00:00'
                        expires_at: '2026-02-26'
                        sent_by: 42
                      test_completed: false
                nonceFail:
                  summary: Nonce check failed
                  value:
                    success: false
                    message: Security check failed
      security:
        - wpAjaxNonce: []
components:
  schemas:
    CheckTestInviteStatusRequest:
      type: object
      required:
        - action
        - nonce
        - sage_id
      properties:
        action:
          type: string
          const: sagescreen_check_test_invite_status
        nonce:
          type: string
          description: WP nonce for `sagescreen_frontend_nonce`
          examples:
            - abc123def456
        sage_id:
          type: integer
          description: Post ID of the `ss_council_sage`
          examples:
            - 1234
    CheckTestInviteStatusSuccess:
      type: object
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          required:
            - sage_id
            - invite_accessed
            - test_completed
          properties:
            sage_id:
              type: integer
              examples:
                - 1234
            invite_accessed:
              type: boolean
              description: Whether the invite link has been opened
              examples:
                - true
            accessed_at:
              type: string
              description: MySQL datetime when invite was accessed, or empty string
              examples:
                - '2026-02-19 14:30:00'
            test_invite_data:
              $ref: '#/components/schemas/TestInviteData'
            test_completed:
              type: boolean
              description: Whether the test screen has reached ss_completed or ss_closed
              examples:
                - false
    AjaxErrorResponse:
      type: object
      description: |
        Standard AJAX error. The `data` field is either a plain string
        or an object with a `message` field.
      properties:
        success:
          type: boolean
          const: false
        data:
          oneOf:
            - type: string
              description: Error message as plain string
              examples:
                - Security check failed
            - type: object
              properties:
                message:
                  type: string
                  examples:
                    - Screen ID is required
        message:
          type: string
          description: |
            Present on some endpoints that use `wp_send_json()` directly
            instead of `wp_send_json_error()`.
          examples:
            - Security check failed
    TestInviteData:
      type: object
      description: Test invite tracking data stored in sage meta
      properties:
        invite_key:
          type: string
          description: Random 32-char invite key
          examples:
            - abc123def456ghi789jkl012mno345pq
        invite_url:
          type: string
          format: uri
          description: Full invite URL
          examples:
            - >-
              https://api.sagescreen.app/screen/invite/abc123def456ghi789jkl012mno345pq
        test_screen_id:
          type: integer
          description: WordPress post ID of the created test screen
          examples:
            - 5678
        sent_to:
          type: string
          format: email
          description: Email address the invite was sent to
          examples:
            - admin@greenville.gov
        sent_at:
          type: string
          description: MySQL datetime when invite was sent
          examples:
            - '2026-02-19 10:00:00'
        expires_at:
          type: string
          format: date
          description: Invite expiration date
          examples:
            - '2026-02-26'
        sent_by:
          type: integer
          description: WordPress user ID who sent the invite
          examples:
            - 42
  securitySchemes:
    wpAjaxNonce:
      type: apiKey
      in: query
      name: nonce
      description: WordPress AJAX nonce (passed as form field, verified per-action)

````