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

# Set a test outcome

> Test workspaces only: finishes a verification with the given status without a person going
through the widget, so an integration's handling of each outcome can be tested end to end.
A verification nobody has opened is moved through `started` and `submitted` first, as a
person's submission would move it, so the outcome is the only decision webhooks are sent for.
Works from `created`, `started`, `submitted`, `review` and `resubmission_requested`.

Answers with the verification, as Get verification status does.



## OpenAPI

````yaml /openapi.json post /verifications/{verification}/test-outcome
openapi: 3.1.0
info:
  title: API Reference
  version: 1.0.0
  description: >-
    ProofAge is an identity verification and age estimation API. Use this API to
    create verification sessions, upload media (selfies and documents), and
    receive decisions via webhooks.
servers:
  - url: https://api.proofage.net/v1
    description: API
security:
  - apiKey: []
    hmacSignature: []
paths:
  /verifications/{verification}/test-outcome:
    post:
      tags:
        - Verification
      summary: Set a test outcome
      description: >-
        Test workspaces only: finishes a verification with the given status
        without a person going

        through the widget, so an integration's handling of each outcome can be
        tested end to end.

        A verification nobody has opened is moved through `started` and
        `submitted` first, as a

        person's submission would move it, so the outcome is the only decision
        webhooks are sent for.

        Works from `created`, `started`, `submitted`, `review` and
        `resubmission_requested`.


        Answers with the verification, as Get verification status does.
      operationId: setTestVerificationOutcome
      parameters:
        - name: verification
          in: path
          required: true
          description: The verification ID
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetTestVerificationOutcomeRequest'
      responses:
        '200':
          description: The verification with its new status.
          content:
            application/json:
              schema:
                type: object
                examples:
                  - id: 550e8400-e29b-41d4-a716-446655440000
                    external_id: user-123
                    external_metadata: null
                    redirect_url: https://example.com/callback
                    status: approved
                    reason: null
                    duplicate_check:
                      checked: false
                      duplicate_count: 0
                      duplicates: []
                    erasure: null
                    consent_accepted_at: null
                    created_at: '2026-03-19T12:00:00+00:00'
                    updated_at: '2026-03-19T12:00:05+00:00'
                properties:
                  id:
                    type: string
                  external_id:
                    type:
                      - string
                      - 'null'
                  external_metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties: {}
                  redirect_url:
                    type:
                      - string
                      - 'null'
                  status:
                    type: string
                  reason:
                    type:
                      - string
                      - 'null'
                  duplicate_check:
                    type: object
                    properties:
                      checked:
                        type: boolean
                      duplicate_count:
                        type: integer
                      duplicates:
                        type: array
                        items:
                          type: object
                          properties:
                            verification_id:
                              type: string
                            external_id:
                              type:
                                - string
                                - 'null'
                            similarity_score:
                              type: number
                            verified_at:
                              type:
                                - string
                                - 'null'
                          required:
                            - verification_id
                            - external_id
                            - similarity_score
                            - verified_at
                    required:
                      - checked
                      - duplicate_count
                      - duplicates
                  erasure:
                    type:
                      - object
                      - 'null'
                    properties:
                      erased_at:
                        type: string
                      scope:
                        type: string
                      reason:
                        type:
                          - string
                          - 'null'
                      requested_via:
                        type:
                          - string
                          - 'null'
                    required:
                      - erased_at
                      - scope
                      - reason
                      - requested_via
                  consent_accepted_at:
                    type:
                      - string
                      - 'null'
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - id
                  - external_id
                  - external_metadata
                  - redirect_url
                  - status
                  - reason
                  - duplicate_check
                  - erasure
                  - consent_accepted_at
                  - created_at
                  - updated_at
        '403':
          description: >-
            The workspace is a live one (`TEST_WORKSPACE_ONLY`), or the
            verification belongs to another workspace.
          content:
            application/json:
              schema:
                examples:
                  - error:
                      code: TEST_WORKSPACE_ONLY
                      message: The outcome can only be set in a test workspace.
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                        required:
                          - code
                          - message
                    required:
                      - error
                  - type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          description: >-
            The verification is already final (`INVALID_STATUS`), or a field is
            invalid (`message` and `errors` by field).
          content:
            application/json:
              schema:
                examples:
                  - error:
                      code: INVALID_STATUS
                      message: The verification is already approved, a final status.
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                        required:
                          - code
                          - message
                    required:
                      - error
                  - type: object
                    properties:
                      message:
                        type: string
                      errors:
                        type: object
                        additionalProperties:
                          type: array
                          items:
                            type: string
                    required:
                      - message
                      - errors
components:
  schemas:
    SetTestVerificationOutcomeRequest:
      type: object
      properties:
        status:
          type: string
          description: >-
            The outcome to set: `approved`, `declined`, `review` or
            `resubmission_requested`.
          enum:
            - approved
            - declined
            - review
            - resubmission_requested
        reason:
          type:
            - string
            - 'null'
          description: >-
            A note kept with a `resubmission_requested` outcome in the
            verification's history. It is not the decision `reason` code.
          maxLength: 1000
      required:
        - status
      title: SetTestVerificationOutcomeRequest
  responses:
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    apiKey:
      type: apiKey
      description: Your workspace public key (pk_test_… or pk_live_…).
      in: header
      name: X-API-Key
    hmacSignature:
      type: apiKey
      description: >-
        HMAC-SHA256 of the request, hex-encoded, keyed with the workspace secret
        key. See API authentication.
      in: header
      name: X-HMAC-Signature

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.