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

# Subscribe to Events

> Subscribe to events with a webhook URL



## OpenAPI

````yaml POST /subscribe
openapi: 3.1.0
info:
  title: Talvin API
  description: >-
    Talvin API provides endpoints for managing interviews, responses, and
    subscriptions to events.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.talvin.ai/api/v1
security:
  - talvinApiKey: []
    talvinOrgId: []
paths:
  /subscribe:
    post:
      description: Subscribe to events with a webhook URL
      requestBody:
        description: Subscription details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionRequest'
        required: true
      responses:
        '200':
          description: Subscription created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SubscriptionRequest:
      type: object
      required:
        - hookUrl
        - eventType
      properties:
        hookUrl:
          type: string
          format: uri
          description: URL to receive webhook events
        eventType:
          $ref: '#/components/schemas/EventType'
    SubscriptionResponse:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the subscription
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    EventType:
      type: string
      enum:
        - new_interview
        - new_response
        - candidate_status_changed
      description: Type of event to subscribe to
  securitySchemes:
    talvinApiKey:
      type: apiKey
      in: header
      name: X-TALVIN-API-KEY
    talvinOrgId:
      type: apiKey
      in: header
      name: X-TALVIN-ORGANIZATION-ID

````