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

# Test screening webhook

> The **POST** method on the screening webhook test path will trigger a simulated payload to the destination URL with the webhook key in the "x-webhook-key" header. The header and payload will have the same structure as the payload in production, so it is possible to use the webhook test endpoint during development to test the service logic handling for the configured webhooks. The best use case for this test endpoint and method is to ensure that the destination server and path are properly configured and that the webhook key can be received and authenticated properly.

**Notice:** the provided fields will be echoed through as-is, so no conditional simulation is being applied on the test endpoint at this time to check that the values in the fields appropriately match the configured conditions to trigger the webhook. Therefore, it is necessary to provide the desired fields in the webhook test input to trigger the logic configured in your service implementation appropriately.




## OpenAPI

````yaml /api-reference/admin-api.json post /v2/webhooks/screening/{webhookId}/test
openapi: 3.0.0
info:
  version: 1.0.0
  title: MinervaAI Admin API
  description: Admin endpoints for the Minerva application suite
servers:
  - url: https://admin-api.gominerva.com
    description: The instance of admin-api to send the Swagger test requests to
security:
  - ApiKeyAuth: []
tags: []
paths:
  /v2/webhooks/screening/{webhookId}/test:
    post:
      tags:
        - Screening Webhooks
      summary: Test screening webhook
      description: >
        The **POST** method on the screening webhook test path will trigger a
        simulated payload to the destination URL with the webhook key in the
        "x-webhook-key" header. The header and payload will have the same
        structure as the payload in production, so it is possible to use the
        webhook test endpoint during development to test the service logic
        handling for the configured webhooks. The best use case for this test
        endpoint and method is to ensure that the destination server and path
        are properly configured and that the webhook key can be received and
        authenticated properly.


        **Notice:** the provided fields will be echoed through as-is, so no
        conditional simulation is being applied on the test endpoint at this
        time to check that the values in the fields appropriately match the
        configured conditions to trigger the webhook. Therefore, it is necessary
        to provide the desired fields in the webhook test input to trigger the
        logic configured in your service implementation appropriately.
      parameters:
        - in: path
          name: webhookId
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the webhook to test
          example: ecc9b161-e6bf-48e4-816d-b13046a42eaa
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTestRequest'
            example:
              eventKind: profile_status_updated
              eventValue: accepted
              latestFlags:
                - Sanctions
                - PEP
                - News
              profileId: minerva-profile-id-1
              externalId: user-profile-id-1
      responses:
        '200':
          description: Webhook test triggered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookTestResponse'
              example:
                status: 200
                message: Webhook test triggered successfully
                payload:
                  webhookId: ecc9b161-e6bf-48e4-816d-b13046a42eaa
                  webhookName: Test webhook
                  event:
                    kind: profile_status_updated
                    value: accepted
                    meta:
                      latestFlags:
                        - name: screeningSanctionsMatch
                          count: 1
                          label: Sanctions
                        - name: screeningPepMatch
                          count: 1
                          label: PEP
                        - name: screeningAdverseMediaMatch
                          count: 1
                          label: Adverse Media
                      profileId: minerva-profile-id-1
                      externalId: user-profile-id-1
        '400':
          description: Bad request - invalid request body or webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                status: 400
                message: Invalid event kind provided
                code: VALIDATION_ERROR
        '403':
          description: API key invalid or insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                status: 404
                message: Webhook not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WebhookTestRequest:
      type: object
      description: Request body for testing a screening webhook
      properties:
        eventKind:
          $ref: '#/components/schemas/ScreeningEventKind'
          description: >-
            The mock event kind to send in the webhook payload. This will flow
            through transparently to the mock payload that is sent through to
            the webhook destination URL.
        eventValue:
          $ref: '#/components/schemas/ScreeningEventValue'
          description: >-
            The mock event value to send in the webhook payload. This will flow
            through transparently to the mock payload that is sent through to
            the webhook destination URL.
        latestFlags:
          type: array
          items:
            type: string
            enum:
              - Sanctions
              - PEP
              - News
              - Criminal
              - Legal
              - Registries
              - Ownership
              - Offshore
              - Open Source
              - Social Media
          description: >-
            The mock flags that should be sent in the **latestFlags** webhook
            payload field. These values are interpreted and mutated into true
            object mocks in the webhook payload that is sent to the destination
            URL.
          example:
            - Sanctions
            - PEP
            - News
        profileId:
          type: string
          description: >-
            The mock profile ID that should be sent in the payload to the
            destination URL. This is an optional field that can be provided if
            testing the webhook update for a specific Minerva profile ID within
            your service logic is desired.
          example: minerva-profile-id-1
        externalId:
          type: string
          description: >-
            The mock external ID that should be sent in the payload to the
            destination URL. This is an optional field that can be provided if
            testing the webhook update for a specific external system ID within
            your service logic is desired.
          example: user-profile-id-1
      required:
        - eventKind
        - eventValue
    WebhookTestResponse:
      type: object
      description: Response from testing a screening webhook
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 200
        message:
          type: string
          description: Response message
          example: Webhook test triggered successfully
        payload:
          type: object
          description: The payload that was sent to the destination webhook
          properties:
            webhookId:
              type: string
              format: uuid
              description: The unique identifier of the webhook
              example: ecc9b161-e6bf-48e4-816d-b13046a42eaa
            webhookName:
              type: string
              description: The name of the webhook
              example: Test webhook
            event:
              type: object
              description: The event data that was sent
              properties:
                kind:
                  $ref: '#/components/schemas/ScreeningEventKind'
                value:
                  $ref: '#/components/schemas/ScreeningEventValue'
                meta:
                  type: object
                  description: Additional metadata for the event
                  properties:
                    latestFlags:
                      type: array
                      description: Array of flag objects with name, count, and label
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            description: The internal flag name
                            example: screeningSanctionsMatch
                          count:
                            type: integer
                            description: The count of matches
                            example: 1
                          label:
                            type: string
                            description: The human-readable flag label
                            example: Sanctions
                        required:
                          - name
                          - count
                          - label
                    profileId:
                      type: string
                      description: The profile ID that was sent
                      example: minerva-profile-id-1
                    externalId:
                      type: string
                      description: The external ID that was sent
                      example: user-profile-id-1
                  required:
                    - latestFlags
                    - profileId
                    - externalId
              required:
                - kind
                - value
                - meta
          required:
            - webhookId
            - webhookName
            - event
      required:
        - status
        - message
        - payload
    ApiError:
      type: object
      description: Standard API error response
      properties:
        status:
          type: number
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Error message
          example: Bad request
        code:
          type: string
          description: Error code
          example: VALIDATION_ERROR
      required:
        - status
        - message
    ScreeningEventKind:
      type: string
      enum:
        - profile_status_updated
      description: >-
        The kind of the event to subscribe to. Currently only
        "profile_status_updated" is supported. For dashboard setup guidance, see
        the API Keys documentation in the API Reference.
      example: profile_status_updated
    ScreeningEventValue:
      type: string
      enum:
        - potential_match
        - accepted
        - rejected
      description: >-
        The required values for the event that should be subscribed to. These
        should equal the desired values of the event subject for the event to
        trigger. For example for event kind "profile_status_updated", this can
        be ["accepted", "rejected"] to listen for profile status updates to
        "accepted" OR "rejected" status.
      example: potential_match
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Admin API key for authentication. Manage API keys in the Minerva
        dashboard under Administration > Developers.

````