Cal.com Event Types Private Links API

The Event Types Private Links API from Cal.com — 2 operation(s) for event types private links.

OpenAPI Specification

cal-com-event-types-private-links-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Cal.diy API v2 Api Keys Event Types Private Links API
  description: ''
  version: 1.0.0
  contact: {}
servers: []
tags:
- name: Event Types Private Links
paths:
  /v2/event-types/{eventTypeId}/private-links:
    post:
      operationId: EventTypesPrivateLinksController_createPrivateLink
      summary: Create a private link for an event type
      parameters:
      - name: eventTypeId
        required: true
        in: path
        schema:
          type: number
      - name: Authorization
        in: header
        description: value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePrivateLinkInput'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePrivateLinkOutput'
      tags:
      - Event Types Private Links
    get:
      operationId: EventTypesPrivateLinksController_getPrivateLinks
      summary: Get all private links for an event type
      parameters:
      - name: eventTypeId
        required: true
        in: path
        schema:
          type: number
      - name: Authorization
        in: header
        description: value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPrivateLinksOutput'
      tags:
      - Event Types Private Links
  /v2/event-types/{eventTypeId}/private-links/{linkId}:
    patch:
      operationId: EventTypesPrivateLinksController_updatePrivateLink
      summary: Update a private link for an event type
      parameters:
      - name: eventTypeId
        required: true
        in: path
        schema:
          type: number
      - name: linkId
        required: true
        in: path
        schema:
          type: string
      - name: Authorization
        in: header
        description: value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePrivateLinkBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePrivateLinkOutput'
      tags:
      - Event Types Private Links
    delete:
      operationId: EventTypesPrivateLinksController_deletePrivateLink
      summary: Delete a private link for an event type
      parameters:
      - name: eventTypeId
        required: true
        in: path
        schema:
          type: number
      - name: linkId
        required: true
        in: path
        schema:
          type: string
      - name: Authorization
        in: header
        description: value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletePrivateLinkOutput'
      tags:
      - Event Types Private Links
components:
  schemas:
    DeletePrivateLinkOutput:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: success
        data:
          type: object
          description: Deleted link information
          properties:
            linkId:
              type: string
              example: abc123def456
            message:
              type: string
              example: Private link deleted successfully
      required:
      - status
      - data
    CreatePrivateLinkInput:
      type: object
      properties:
        expiresAt:
          type: string
          description: Expiration date for time-based links
          format: date-time
          example: '2024-12-31T23:59:59.000Z'
        maxUsageCount:
          type: number
          description: Maximum number of times the link can be used. If omitted and expiresAt is not provided, defaults to 1 (one time use).
          example: 10
          minimum: 1
          default: 1
    CreatePrivateLinkOutput:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: success
        data:
          description: Created private link data (either time-based or usage-based)
          oneOf:
          - $ref: '#/components/schemas/TimeBasedPrivateLinkOutput'
          - $ref: '#/components/schemas/UsageBasedPrivateLinkOutput'
      required:
      - status
      - data
    UsageBasedPrivateLinkOutput:
      type: object
      properties:
        linkId:
          type: string
          description: The private link ID
          example: abc123def456
        eventTypeId:
          type: number
          description: Event type ID this link belongs to
          example: 123
        isExpired:
          type: boolean
          description: Whether the link is currently expired
          example: false
        bookingUrl:
          type: string
          description: Full booking URL for this private link
          format: uri
          example: https://cal.com/d/abc123def456/30min
        maxUsageCount:
          type: number
          description: Maximum number of times this link can be used
          example: 10
        usageCount:
          type: number
          description: Current usage count for this link
          example: 3
      required:
      - linkId
      - eventTypeId
      - isExpired
      - bookingUrl
      - maxUsageCount
      - usageCount
    UpdatePrivateLinkBody:
      type: object
      properties:
        expiresAt:
          format: date-time
          type: string
          description: New expiration date for time-based links
          example: '2024-12-31T23:59:59.000Z'
        maxUsageCount:
          type: number
          description: New maximum number of times the link can be used
          example: 10
          minimum: 1
    GetPrivateLinksOutput:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: success
        data:
          type: array
          description: Array of private links for the event type (mix of time-based and usage-based)
          items:
            oneOf:
            - $ref: '#/components/schemas/TimeBasedPrivateLinkOutput'
            - $ref: '#/components/schemas/UsageBasedPrivateLinkOutput'
      required:
      - status
      - data
    UpdatePrivateLinkOutput:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: success
        data:
          description: Updated private link data (either time-based or usage-based)
          oneOf:
          - $ref: '#/components/schemas/TimeBasedPrivateLinkOutput'
          - $ref: '#/components/schemas/UsageBasedPrivateLinkOutput'
      required:
      - status
      - data
    TimeBasedPrivateLinkOutput:
      type: object
      properties:
        linkId:
          type: string
          description: The private link ID
          example: abc123def456
        eventTypeId:
          type: number
          description: Event type ID this link belongs to
          example: 123
        isExpired:
          type: boolean
          description: Whether the link is currently expired
          example: false
        bookingUrl:
          type: string
          description: Full booking URL for this private link
          format: uri
          example: https://cal.com/d/abc123def456/30min
        expiresAt:
          type: string
          description: Expiration date for this time-based link
          format: date-time
          example: '2025-12-31T23:59:59.000Z'
      required:
      - linkId
      - eventTypeId
      - isExpired
      - bookingUrl
      - expiresAt