supernormal Current User API

Operations about user

OpenAPI Specification

supernormal-current-user-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Supernormal Agent Sessions Current User API
  description: Documentation for the Supernormal API
  license:
    name: MIT
  version: 1.0.0
servers:
- url: https://api.supernormal.com/api/v1
security:
- ApiKeyAuth: []
tags:
- name: Current User
  description: Operations about user
paths:
  /user:
    get:
      tags:
      - Current User
      summary: Get user
      security:
      - ApiKeyAuth:
        - user:read
      parameters: []
      responses:
        '200':
          description: User response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /user/calendar_events:
    get:
      tags:
      - Current User
      summary: Upcoming calendar events
      security:
      - ApiKeyAuth:
        - calendar_events:read
      parameters:
      - name: from
        in: query
        description: The start date of the calendar events in ISO 8601 format
        required: false
        schema:
          type: string
      - name: to
        in: query
        description: The end date of the calendar events in ISO 8601 format
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Calendar events response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CalendarEvent'
components:
  schemas:
    User:
      type: object
      properties:
        id:
          description: The user’s ID
          type: string
        first_name:
          description: The user’s first name
          type: string
        last_name:
          description: The user’s last name
          type: string
        email:
          description: The user’s email
          type: string
        avatar_url:
          description: The user’s avatar URL
          type: string
    Error:
      required:
      - error
      - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    CalendarEvent:
      type: object
      properties:
        id:
          description: The calendar event’s ID
          type: string
        name:
          description: The calendar event’s name
          type: string
        url:
          description: The calendar event’s URL
          type: string
        post_id:
          description: The calendar event’s post ID
          type: string
        is_recurring:
          description: Whether the calendar event is recurring
          type: boolean
        is_blocked_from_capture:
          description: Whether the calendar event is blocked from capture
          type: boolean
        start:
          description: The calendar event’s start time
          type: string
        end:
          description: The calendar event’s end time
          type: string
        platform_name:
          description: The calendar event’s platform name
          type: string
          enum:
          - google_meet
          - teams
          - zoom
        scheduled_to_record:
          description: Whether the calendar event is scheduled to record
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-TOKEN
      x-scopes:
        user:read: Read user information
        calendar_events:read: Read calendar events
        calendar_events:write: Write calendar events