{
  "openapi": "3.1.0",
  "info": {
    "title": "User Evaluation Public API",
    "version": "1.0.0",
    "description": "Public REST API for User Evaluation. Requires a paid researcher account; generate keys at https://app.userevaluation.com/settings.\n\nAll requests are authenticated with `Authorization: Bearer ue_live_…`. Responses are always JSON envelopes — `{ data, meta? }` on success, `{ error: { code, message, details? } }` on failure.",
    "contact": {
      "name": "User Evaluation Support",
      "url": "https://docs.userevaluation.com",
      "email": "support@userevaluation.com"
    }
  },
  "servers": [
    {
      "url": "https://api.userevaluation.com/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Identity"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Project sub-resources"
    },
    {
      "name": "Tests"
    },
    {
      "name": "Files"
    },
    {
      "name": "Cards"
    },
    {
      "name": "Jobs"
    },
    {
      "name": "Engage"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Usage"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ue_live_…"
      }
    },
    "parameters": {
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Opaque pagination cursor returned as `meta.next_cursor`."
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "Replays the cached response for 24h on identical (key, user) pairs."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthorized",
                  "invalid_api_key",
                  "forbidden",
                  "plan_required",
                  "not_found",
                  "validation_failed",
                  "rate_limited",
                  "quota_exceeded",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "next_cursor": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Me": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string"
          },
          "plan": {
            "type": "string",
            "nullable": true
          },
          "workspace_id": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "file_count": {
            "type": "integer"
          },
          "is_sample": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_by": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string",
                "nullable": true
              },
              "email": {
                "type": "string",
                "format": "email",
                "nullable": true
              }
            }
          }
        }
      },
      "ProjectCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "language": {
            "type": "string",
            "maxLength": 20
          }
        }
      },
      "Test": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "ai-curated-interview",
              "ai-curated-survey",
              "ai-generated-survey",
              "live-interview"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "Draft",
              "Live",
              "Completed",
              "Stopped"
            ]
          },
          "duration_min": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "test_id": {
            "type": "string"
          },
          "participant_id": {
            "type": "string",
            "nullable": true
          },
          "answers": {
            "type": "object",
            "additionalProperties": true
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "File": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "duration_seconds": {
            "type": "integer",
            "nullable": true
          },
          "asset_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "VIDEO",
              "AUDIO",
              "TEXT",
              "CSV",
              "PDF",
              "DOC"
            ]
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Signed URL, ~1h TTL. Detail endpoint only."
          }
        }
      },
      "Transcript": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "string"
          },
          "segments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "speaker": {
                  "type": "string",
                  "nullable": true
                },
                "start_seconds": {
                  "type": "number",
                  "nullable": true
                },
                "end_seconds": {
                  "type": "number",
                  "nullable": true
                },
                "text": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "Tag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "highlight_color": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Note": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "emoji": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "array",
            "items": {}
          }
        }
      },
      "Card": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "insight": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Lane": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "card_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Report": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "prompt": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "file_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Clip": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "asset_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "start_seconds": {
            "type": "number"
          },
          "end_seconds": {
            "type": "number"
          }
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "chat",
              "report",
              "transcribe",
              "auto-tag",
              "sentiment"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "result": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "secret": {
            "type": "string",
            "description": "Returned only on creation."
          },
          "last_status": {
            "type": "integer",
            "nullable": true
          },
          "disabled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "WebhookCreate": {
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "project.created",
                "project.updated",
                "project.deleted",
                "test.published",
                "test.response.submitted",
                "file.transcribed",
                "report.generated",
                "chat.completed",
                "engage.session.completed",
                "tag.created"
              ]
            }
          },
          "description": {
            "type": "string"
          }
        }
      },
      "Usage": {
        "type": "object",
        "properties": {
          "totals": {
            "type": "object",
            "properties": {
              "last_24h": {
                "type": "integer"
              },
              "last_7d": {
                "type": "integer"
              }
            }
          },
          "status": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "top_paths": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          },
          "recent": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "status": {
                  "type": "integer"
                },
                "duration_ms": {
                  "type": "integer"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PlanRequired": {
        "description": "Free plan or participant role",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Caller does not own the resource",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "Body or query validation failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Per-minute rate limit exceeded",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/me": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get the authenticated researcher",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Me"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          }
        }
      }
    },
    "/workspace": {
      "get": {
        "tags": [
          "Identity"
        ],
        "summary": "Get the caller's workspace",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workspace"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List projects",
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Project"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Project"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          }
        }
      }
    },
    "/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Project"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/projects/{projectId}/tests": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List tests in a project",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/projects/{projectId}/files": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List files in a project",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Finalize an uploaded file and attach it to a project",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/projects/{projectId}/tags": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List tags",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Create a tag",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/projects/{projectId}/notes": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List notes",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Create a note",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/projects/{projectId}/cards": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List cards",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Create a card",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/projects/{projectId}/lanes": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List lanes",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Create a lane",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/projects/{projectId}/reports": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List reports",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Trigger a report-generation job",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{projectId}/clips": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "List clips",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Create a clip",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/projects/{projectId}/tag-applications": {
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Apply a tag to a transcript span",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/projects/{projectId}/chat": {
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Trigger a chat job",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    },
    "/projects/{projectId}/chat/{threadId}": {
      "get": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Read a chat thread",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/projects/{projectId}/auto-tag": {
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Trigger an auto-tag job",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    },
    "/projects/{projectId}/sentiment": {
      "post": {
        "tags": [
          "Project sub-resources"
        ],
        "summary": "Trigger a sentiment job",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    },
    "/tests/{id}": {
      "get": {
        "tags": [
          "Tests"
        ],
        "summary": "Get a test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/tests/{id}/responses": {
      "get": {
        "tags": [
          "Tests"
        ],
        "summary": "List responses for a test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/responses/{id}": {
      "get": {
        "tags": [
          "Tests"
        ],
        "summary": "Get a single response",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/files/{id}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get a file",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/files/{id}/transcript": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get a file's transcript",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/files/{id}/transcribe": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Trigger a transcription job",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    },
    "/cards/{id}": {
      "get": {
        "tags": [
          "Cards"
        ],
        "summary": "Get a card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "tags": [
          "Cards"
        ],
        "summary": "Update a card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Cards"
        ],
        "summary": "Delete a card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/jobs/{id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get a job",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/engage/tests": {
      "get": {
        "tags": [
          "Engage"
        ],
        "summary": "List engage (interview) tests",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Engage"
        ],
        "summary": "Create an engage test",
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/engage/tests/{id}": {
      "get": {
        "tags": [
          "Engage"
        ],
        "summary": "Get an engage test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/engage/tests/{id}/sessions": {
      "get": {
        "tags": [
          "Engage"
        ],
        "summary": "List call sessions for an engage test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/engage/tests/{id}/publish": {
      "post": {
        "tags": [
          "Engage"
        ],
        "summary": "Publish (Draft → Live)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/engage/tests/{id}/invitations": {
      "get": {
        "tags": [
          "Engage"
        ],
        "summary": "List invitations",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Engage"
        ],
        "summary": "Create an external invitation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhooks",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook (returns secret once)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Webhook"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/webhooks/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List recent delivery attempts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/usage": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Get usage stats for the calling user",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Usage"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}