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

# Create screening webhook

> The **POST** method on the resource group can be used to create a new screening webhook. This will automatically generate a webhook key and unique ID for the new webhook. The response payload will contain both the unique ID and the newly generated webhook key which should be stored in a vault or secrets manager for the receiving service to authenticate the request via the "x-webhook-key" header. The webhook key will also be present on any GET requests for the webhooks so it is possible to retrieve the webhook key again in the future.

Screening webhooks currently support profile status update events for Screening Workflow Profiles.

**Notice:** each tenant is allowed a maximum of 10 webhooks by default. More webhooks are available for enterprise customers upon request. If the maximum for the tenant has been reached, consider reviewing the existing webhooks and deleting un-used webhooks using the **Delete Screening Webhook** method.




## OpenAPI

````yaml /api-reference/admin-api.json post /v2/webhooks/screening
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:
    post:
      tags:
        - Screening Webhooks
      summary: Create screening webhook
      description: >
        The **POST** method on the resource group can be used to create a new
        screening webhook. This will automatically generate a webhook key and
        unique ID for the new webhook. The response payload will contain both
        the unique ID and the newly generated webhook key which should be stored
        in a vault or secrets manager for the receiving service to authenticate
        the request via the "x-webhook-key" header. The webhook key will also be
        present on any GET requests for the webhooks so it is possible to
        retrieve the webhook key again in the future.


        Screening webhooks currently support profile status update events for
        Screening Workflow Profiles.


        **Notice:** each tenant is allowed a maximum of 10 webhooks by default.
        More webhooks are available for enterprise customers upon request. If
        the maximum for the tenant has been reached, consider reviewing the
        existing webhooks and deleting un-used webhooks using the **Delete
        Screening Webhook** method.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequest'
            example:
              webhookName: Test webhook
              events:
                - kind: profile_status_updated
                  values:
                    - potential_match
                    - accepted
                    - rejected
              url: https://your.web.site/path
      responses:
        '200':
          description: Webhook created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
              example:
                status: 200
                message: Webhook created successfully
                result:
                  id: ecc9b161-e6bf-48e4-816d-b13046a42eaa
                  webhookName: Test webhook
                  webhookKey: e7b3b2f0-8e17-40a5-a083-2234c6bc9dab
                  events:
                    - kind: profile_status_updated
                      values:
                        - potential_match
                        - accepted
                        - rejected
                  url: https://your.web.site/path
        '400':
          description: Bad request or max allowed webhooks reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                status: 400
                message: >-
                  Max allowed screening event webhooks reached. Other screening
                  event webhooks must be deleted first to create any new ones.
        '403':
          description: API key invalid or insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateWebhookRequest:
      type: object
      description: Request body for creating a new screening webhook
      properties:
        webhookName:
          type: string
          description: >-
            The name that should be assigned to the webhook. This is for
            reference purposes, and will be echoed back in the webhook payload
            together with the webhook unique ID. It can be helpful to assign a
            system reference ID or other reference code. It can also be used to
            identify different webhooks as dev vs prod, or by purpose.
          example: Test webhook
        events:
          type: array
          description: >-
            The list of events that the webhook should subscribe to. If more
            than one event is provided, it is treated as an OR gate where if any
            of the conditions in the events of the array are applicable, the
            webhook will trigger. At least one event must be provided.
          items:
            type: object
            properties:
              kind:
                $ref: '#/components/schemas/ScreeningEventKind'
              values:
                type: array
                items:
                  $ref: '#/components/schemas/ScreeningEventValue'
            required:
              - kind
              - values
        url:
          type: string
          format: uri
          description: >-
            The URL that the webhook should POST to when event conditions are
            met
          example: https://your.web.site/path
      required:
        - webhookName
        - events
        - url
    WebhookResponse:
      type: object
      description: Standard webhook response
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 200
        message:
          type: string
          description: Response message
          example: Webhook created successfully
        result:
          $ref: '#/components/schemas/ScreeningEventWebhook'
      required:
        - status
        - message
        - result
    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
    ScreeningEventWebhook:
      type: object
      description: A webhook configuration for screening events
      properties:
        id:
          type: string
          format: uuid
          description: The unique internal identifier for the webhook
          example: ecc9b161-e6bf-48e4-816d-b13046a42eaa
        webhookName:
          type: string
          description: The name of the webhook as assigned by the creator
          example: Test webhook
        webhookKey:
          type: string
          format: uuid
          description: >-
            The unique key for the webhook which the receiver uses to
            authenticate
          example: e7b3b2f0-8e17-40a5-a083-2234c6bc9dab
        events:
          type: array
          description: An array of event configurations
          items:
            type: object
            properties:
              kind:
                $ref: '#/components/schemas/ScreeningEventKind'
              values:
                type: array
                items:
                  $ref: '#/components/schemas/ScreeningEventValue'
            required:
              - kind
              - values
        url:
          type: string
          format: uri
          description: >-
            The URL that the webhook should POST to when the event conditions
            are met. This should be a url that includes the full protocol,
            hostname, and path. For best security, ensure that you are using an
            HTTPS-secured endpoint on your server to receive the webhook POST
            requests.
          example: https://your.web.site/path
      required:
        - id
        - webhookName
        - webhookKey
        - events
        - url
  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.

````