{
  "openapi": "3.0.3",
  "info": {
    "title": "Recordings API",
    "version": "3.0",
    "contact": {
      "email": "admin@vsee.com"
    },
    "description": "\n\nThe Recordings API uses the Visit API endpoints with special parameters to access visit recordings.\n\n**Key:** Include `recordings` in the `fields` parameter of GET /visits to receive recording objects. Use `with_recordings_only=1` to filter out visits without recordings.\n\nRecording download URLs (`path.url`) are pre-signed S3 URLs with a time-limited expiry (`path.expiry`)."
  },
  "servers": [
    {
      "url": "https://api.vseepreview.com/api_v3",
      "description": "Staging"
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "javascript",
      "java"
    ]
  },
  "tags": [
    {
      "name": "Visits",
      "description": "Visit and recording management"
    }
  ],
  "paths": {
    "/visits": {
      "get": {
        "tags": [
          "Visits"
        ],
        "summary": "List visits with recordings",
        "description": "Retrieve a list of visits with recordings within a specified time range",
        "operationId": "listVisitsWithRecordings",
        "parameters": [
          {
            "name": "X-ApiToken",
            "in": "header",
            "description": "API token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "your_api_token"
          },
          {
            "name": "X-AccountCode",
            "in": "header",
            "description": "Account code",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "vclinic"
          },
          {
            "name": "room_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Room's code to filter visits"
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "UNIX timestamp \u2014 filter visits starting after this time"
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "UNIX timestamp \u2014 filter visits ending before this time"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of field names to include in response. Use 'recordings' to include recording objects"
          },
          {
            "name": "with_recordings_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            },
            "description": "Set to `1` to only return visits that have recordings."
          }
        ],
        "responses": {
          "200": {
            "description": "List of visits with recordings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Visit"
                      }
                    }
                  }
                },
                "examples": {
                  "withRecordings": {
                    "value": {
                      "data": [
                        {
                          "id": "82828",
                          "start": 1631628616,
                          "end": 1631628916,
                          "actual_start": 1631628211,
                          "actual_end": null,
                          "hosts": [],
                          "type": 2,
                          "status": 30,
                          "meeting": {
                            "recording_auto_start": false,
                            "phone_numbers": {
                              "US": [
                                "+1.650.758.0255"
                              ]
                            },
                            "hosts": [
                              "anton+providersa@vseelab.com",
                              "chau+provider@vseelab.com"
                            ],
                            "expiry": 1633643316,
                            "conference_pin": 838759,
                            "meeting_id": "1633627695040_2cc263f4-3d07-49fa-97b1-b2955ff40dfa__jitsi"
                          },
                          "recordings": {
                            "count": 1,
                            "data": [
                              {
                                "id": 111,
                                "visit_id": "82828",
                                "end": 1633966813,
                                "start": 1633966696,
                                "version": 3,
                                "participants": [
                                  {
                                    "first_name": "Keven2",
                                    "last_name": "Teodoro2",
                                    "vseeid": "conciergedev+user575"
                                  },
                                  {
                                    "first_name": "Keven2",
                                    "last_name": "Teodoro2",
                                    "vseeid": "provider.w@vclinic.com"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-auth-type": "admin-token"
      }
    },
    "/visits/{id}/recordings/{recording_id}": {
      "get": {
        "tags": [
          "Visits"
        ],
        "summary": "Get recording",
        "description": "Retrieve a specific recording with download URL",
        "operationId": "getRecording",
        "parameters": [
          {
            "name": "X-ApiToken",
            "in": "header",
            "description": "API token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "your_api_token"
          },
          {
            "name": "X-AccountCode",
            "in": "header",
            "description": "Account code",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "vclinic"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Visit ID"
          },
          {
            "name": "recording_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Recording ID from visits.data.recordings.id"
          }
        ],
        "responses": {
          "200": {
            "description": "Recording details with download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recording"
                },
                "examples": {
                  "success": {
                    "value": {
                      "id": 111,
                      "visit_id": 82828,
                      "end": 1633966813,
                      "start": 1633966696,
                      "version": 3,
                      "participants": [
                        {
                          "first_name": "Keven2",
                          "last_name": "Teodoro2",
                          "vseeid": "conciergedev+user575"
                        },
                        {
                          "first_name": "Keven2",
                          "last_name": "Teodoro2",
                          "vseeid": "provider.w@vclinic.com"
                        }
                      ],
                      "path": {
                        "url": "https://recordings-bucket.example-s3.amazonaws.com/EXAMPLE_CLINIC/1636431607681_recording__example.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20211112T151817Z&X-Amz-SignedHeaders=host&X-Amz-Expires=14400&X-Amz-Credential=EXAMPLEACCESSKEYID123%2F20211112%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=EXAMPLESIGNATUREdonotusethisvalueitisaplaceholder00000000",
                        "expiry": 1634966813
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-auth-type": "admin-token"
      }
    }
  },
  "components": {
    "schemas": {
      "Visit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "format": "int64"
          },
          "end": {
            "type": "integer",
            "format": "int64"
          },
          "actual_start": {
            "type": "integer",
            "format": "int64"
          },
          "actual_end": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "hosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "type": "integer"
          },
          "status": {
            "type": "integer"
          },
          "meeting": {
            "$ref": "#/components/schemas/Meeting"
          },
          "recordings": {
            "$ref": "#/components/schemas/RecordingsList"
          }
        }
      },
      "Meeting": {
        "type": "object",
        "properties": {
          "recording_auto_start": {
            "type": "boolean"
          },
          "phone_numbers": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "hosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expiry": {
            "type": "integer",
            "format": "int64"
          },
          "conference_pin": {
            "type": "integer"
          },
          "meeting_id": {
            "type": "string"
          }
        }
      },
      "RecordingsList": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecordingListItem"
            }
          }
        }
      },
      "RecordingListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "visit_id": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "format": "int64"
          },
          "end": {
            "type": "integer",
            "format": "int64"
          },
          "version": {
            "type": "integer"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Participant"
            }
          }
        }
      },
      "Recording": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "visit_id": {
            "type": "integer"
          },
          "start": {
            "type": "integer",
            "format": "int64"
          },
          "end": {
            "type": "integer",
            "format": "int64"
          },
          "version": {
            "type": "integer"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Participant"
            }
          },
          "path": {
            "$ref": "#/components/schemas/RecordingPath"
          }
        }
      },
      "Participant": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "vseeid": {
            "type": "string"
          }
        }
      },
      "RecordingPath": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expiry": {
            "type": "integer",
            "format": "int64"
          }
        }
      }
    }
  }
}