> ## Documentation Index
> Fetch the complete documentation index at: https://ai-recruiter.micro1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a webhook

> This endpoint sets up a webhook for the AI Recruiter. It allows you to receive notifications, such as interview results, when a candidate completes the interview and the report is generated.



## OpenAPI

````yaml post /webhook
openapi: 3.0.3
info:
  title: micro1 Public API
  description: micro1 ai-interview platform public API
  version: 1.0.0
  termsOfService: https://www.micro1.ai/terms-conditions
  contact:
    name: micro1 API Support
    url: https://www.micro1.ai
    email: support@micro1.ai
servers:
  - url: https://public.api.micro1.ai
    description: Production server
security:
  - apiKey: []
paths:
  /webhook:
    post:
      tags:
        - Webhook
      summary: Create a webhook
      description: >-
        This endpoint sets up a webhook for the AI Recruiter. It allows you to
        receive notifications, such as interview results, when a candidate
        completes the interview and the report is generated.
      operationId: webhookSetup
      parameters: []
      requestBody:
        description: Request body to create a webhook
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/c0a95de5-b3a3-4aa0-8ded-cf0dee370dfe'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/d618c1b5-1fab-4a85-b47a-0ba785ec3483'
          headers:
            Access-Control-Allow-Origin:
              description: >-
                The Access-Control-Allow-Origin response header indicates
                whether the response can be shared with requesting code from the
                given
                [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin).
                - [MDN
                Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin)
              schema:
                $ref: '#/components/schemas/Access-Control-Allow-Origin'
            Access-Control-Allow-Credentials:
              description: >-
                The Access-Control-Allow-Credentials response header tells
                browsers whether to expose the response to the frontend
                JavaScript code when the request's credentials mode
                ([Request.credentials](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials))
                is include. - [MDN
                Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials)
              schema:
                $ref: '#/components/schemas/Access-Control-Allow-Credentials'
        '400':
          description: Bad Request
          headers:
            Access-Control-Allow-Origin:
              description: >-
                The Access-Control-Allow-Origin response header indicates
                whether the response can be shared with requesting code from the
                given
                [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin).
                - [MDN
                Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin)
              schema:
                $ref: '#/components/schemas/Access-Control-Allow-Origin'
            Access-Control-Allow-Credentials:
              description: >-
                The Access-Control-Allow-Credentials response header tells
                browsers whether to expose the response to the frontend
                JavaScript code when the request's credentials mode
                ([Request.credentials](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials))
                is include. - [MDN
                Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials)
              schema:
                $ref: '#/components/schemas/Access-Control-Allow-Credentials'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e0593660-b263-408a-a7b3-3025866fbf2d'
          headers:
            Access-Control-Allow-Origin:
              description: >-
                The Access-Control-Allow-Origin response header indicates
                whether the response can be shared with requesting code from the
                given
                [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin).
                - [MDN
                Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin)
              schema:
                $ref: '#/components/schemas/Access-Control-Allow-Origin'
            Access-Control-Allow-Credentials:
              description: >-
                The Access-Control-Allow-Credentials response header tells
                browsers whether to expose the response to the frontend
                JavaScript code when the request's credentials mode
                ([Request.credentials](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials))
                is include. - [MDN
                Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials)
              schema:
                $ref: '#/components/schemas/Access-Control-Allow-Credentials'
      security:
        - apiKey: []
components:
  schemas:
    c0a95de5-b3a3-4aa0-8ded-cf0dee370dfe:
      title: CreateWebhookRequest
      type: object
      required:
        - url
        - event
      properties:
        url:
          type: string
          description: Destination URL for the webhook
          example: https://micro1.ai/webhook
        description:
          type: string
          description: Description of the webhook
          example: Webhook for interview reports
        event:
          type: string
          description: Event to be sent to the webhook
          enum:
            - interview_report.created
            - interview_recording.completed
            - interview_webcam_recording.completed
            - proctoring_score.completed
            - applicant.completed
            - applicant.created
            - applicant.updated
            - applicant.invited
            - interview.started
            - interview.completed
    d618c1b5-1fab-4a85-b47a-0ba785ec3483:
      title: CreateWebhookResponse
      type: object
      properties:
        id:
          type: string
          description: ID of the webhook
          example: 123e4567-e89b-12d3-a456-426614174000
    Access-Control-Allow-Origin:
      type: string
      default: '*'
      example: https://developer.mozilla.org
    Access-Control-Allow-Credentials:
      type: boolean
      default: true
    e0593660-b263-408a-a7b3-3025866fbf2d:
      title: InternalServerErrorResponse
      description: Response for internal server error
      type: object
      properties:
        status:
          type: boolean
          description: Whether the request was successful
          example: false
  securitySchemes:
    apiKey:
      description: API key to access the API
      type: apiKey
      name: x-api-key
      in: header

````