Cal.com Api Keys API

The Api Keys API from Cal.com — 1 operation(s) for api keys.

OpenAPI Specification

cal-com-api-keys-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Cal.diy API v2 Api Keys API
  description: ''
  version: 1.0.0
  contact: {}
servers: []
tags:
- name: Api Keys
paths:
  /v2/api-keys/refresh:
    post:
      operationId: ApiKeysController_refresh
      summary: Refresh API Key
      description: 'Generate a new API key and delete the current one. Provide API key to refresh as a Bearer token in the Authorization header (e.g. "Authorization: Bearer <apiKey>").'
      parameters:
      - name: Authorization
        in: header
        description: value must be `Bearer <token>` where `<token>` is api key prefixed with cal_
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshApiKeyInput'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefreshApiKeyOutput'
      tags:
      - Api Keys
components:
  schemas:
    RefreshApiKeyOutput:
      type: object
      properties:
        status:
          type: string
          example: success
          enum:
          - success
          - error
        data:
          $ref: '#/components/schemas/ApiKeyOutput'
      required:
      - status
      - data
    RefreshApiKeyInput:
      type: object
      properties:
        apiKeyDaysValid:
          type: number
          minimum: 1
          description: For how many days is managed organization api key valid. Defaults to 30 days.
          example: 60
          default: 30
        apiKeyNeverExpires:
          type: boolean
          description: If true, organization api key never expires.
          example: true
    ApiKeyOutput:
      type: object
      properties:
        apiKey:
          type: string
      required:
      - apiKey