{
  "info": {
    "_postman_id": "teamcast-tenant-admin-001",
    "name": "Teamcast Maya - Tenant Admin APIs",
    "description": "Tenant-scoped API endpoints for Teamcast Maya AI Interview Platform.\n\nIncludes: Authentication, Users, Roles & Permissions, Interviews (CRUD + conduct + invite), Workflow state machine, MCP Skills, API Keys, OAuth Clients, Invitations, Webhook DLQ, and Recording.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{jwt_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://localhost:3009/api/v1"
    }
  ],
  "item": [
    {
      "name": "Authentication",
      "item": [
        {
          "name": "Tenant Admin Login",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "  const json = pm.response.json();",
                  "  pm.environment.set('jwt_token', json.accessToken);",
                  "  if (json.user && json.user.tenantId) {",
                  "    pm.environment.set('tenantId', json.user.tenantId);",
                  "  }",
                  "  pm.test('Login successful', () => pm.expect(json.accessToken).to.be.a('string'));",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{adminEmail}}\",\n  \"password\": \"{{adminPassword}}\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "auth",
                "login"
              ]
            },
            "description": "Login as tenant admin. Auto-saves JWT and tenantId to environment."
          },
          "response": []
        },
        {
          "name": "OAuth Token (Client Credentials)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "  const json = pm.response.json();",
                  "  pm.environment.set('jwt_token', json.access_token || json.accessToken);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"grant_type\": \"client_credentials\",\n  \"client_id\": \"{{oauthClientId}}\",\n  \"client_secret\": \"{{oauthClientSecret}}\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/oauth/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "oauth",
                "token"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Forgot Password",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"admin@demo.ai-interview.com\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/auth/forgot-password",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "auth",
                "forgot-password"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Reset Password",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"token\": \"reset-token-from-email\",\n  \"password\": \"NewPassword123!\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/auth/reset-password",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "auth",
                "reset-password"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Users",
      "item": [
        {
          "name": "Create User",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const json = pm.response.json();",
                  "  pm.environment.set('userId', json.id);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"recruiter@company.com\",\n  \"name\": \"Jane Recruiter\",\n  \"password\": \"Recruiter123!\",\n  \"role\": \"RECRUITER\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "users"
              ]
            }
          },
          "response": []
        },
        {
          "name": "List Users",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "users"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get User by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/users/{{userId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "users",
                "{{userId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update User",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Jane Recruiter (Updated)\",\n  \"role\": \"ADMIN\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/users/{{userId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "users",
                "{{userId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete User",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/users/{{userId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "users",
                "{{userId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Change Password",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"currentPassword\": \"Admin123!\",\n  \"newPassword\": \"NewAdmin123!\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/users/{{userId}}/change-password",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "users",
                "{{userId}}",
                "change-password"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Roles & Permissions",
      "item": [
        {
          "name": "List Roles",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/roles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "roles"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Role by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/roles/{{roleId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "roles",
                "{{roleId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create Custom Role",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const json = pm.response.json();",
                  "  pm.environment.set('roleId', json.id);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Senior Recruiter\",\n  \"description\": \"Can create, read, and approve interviews\",\n  \"permissions\": [\n    \"interview:create\",\n    \"interview:read\",\n    \"interview:update\",\n    \"interview:approve\",\n    \"interview:conduct\",\n    \"user:read\"\n  ]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/roles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "roles"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update Role",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Senior Recruiter (Updated)\",\n  \"permissions\": [\n    \"interview:create\",\n    \"interview:read\",\n    \"interview:update\",\n    \"interview:approve\",\n    \"interview:conduct\",\n    \"interview:assess\",\n    \"user:read\"\n  ]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/roles/{{roleId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "roles",
                "{{roleId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Role",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/roles/{{roleId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "roles",
                "{{roleId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "List All Permissions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/permissions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "permissions"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Interviews",
      "item": [
        {
          "name": "Create Interview",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const json = pm.response.json();",
                  "  pm.environment.set('interviewId', json.id);",
                  "  if (json.runId) pm.environment.set('runId', json.runId);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"candidateName\": \"John Doe\",\n  \"candidateEmail\": \"john.doe@example.com\",\n  \"position\": \"Senior Backend Engineer\",\n  \"level\": \"SENIOR\",\n  \"jobDescription\": \"We are looking for a senior backend engineer with experience in distributed systems, microservices architecture, and cloud-native development. The ideal candidate has 5+ years of experience with Node.js or Go.\",\n  \"skills\": [\"TypeScript\", \"Node.js\", \"PostgreSQL\", \"Kafka\", \"Docker\"],\n  \"companyName\": \"Acme Corp\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/interviews",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews"
              ]
            }
          },
          "response": []
        },
        {
          "name": "List Interviews",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/interviews?page=1&limit=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "20"
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Interview Counts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/interviews/counts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "counts"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Interview by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/interviews/{{interviewId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "{{interviewId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update Interview",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"position\": \"Senior Backend Engineer (Updated)\",\n  \"skills\": [\"TypeScript\", \"Node.js\", \"PostgreSQL\", \"Kafka\", \"Docker\", \"Kubernetes\"]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/interviews/{{interviewId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "{{interviewId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Interview",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/interviews/{{interviewId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "{{interviewId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Parse Resume",
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": ""
                }
              ]
            },
            "url": {
              "raw": "{{baseUrl}}/interviews/resume/parse",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "resume",
                "parse"
              ]
            },
            "description": "Upload a resume file (PDF/DOCX/TXT) and extract structured text."
          },
          "response": []
        },
        {
          "name": "Conduct Interview",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/interviews/{{interviewId}}/conduct",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "{{interviewId}}",
                "conduct"
              ]
            },
            "description": "Start a live interview session. Returns sessionId and wsUrl."
          },
          "response": []
        },
        {
          "name": "Send Interview Invite",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/interviews/{{interviewId}}/invite",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "{{interviewId}}",
                "invite"
              ]
            },
            "description": "Generate candidate token and send invite email."
          },
          "response": []
        },
        {
          "name": "Apply Recruiter Override",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"skills\": [\"React\", \"TypeScript\", \"GraphQL\"],\n  \"level\": \"MID\",\n  \"reason\": \"Adjusting for team needs\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/interviews/{{interviewId}}/override",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "{{interviewId}}",
                "override"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Interview Overrides",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/interviews/{{interviewId}}/overrides",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "interviews",
                "{{interviewId}}",
                "overrides"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Workflow",
      "item": [
        {
          "name": "Get Current State",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/workflow/interviews/{{interviewId}}/state",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "workflow",
                "interviews",
                "{{interviewId}}",
                "state"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Available Transitions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/workflow/interviews/{{interviewId}}/available-transitions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "workflow",
                "interviews",
                "{{interviewId}}",
                "available-transitions"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Check If Transition Valid",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/workflow/interviews/{{interviewId}}/can-transition?action=APPROVE",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "workflow",
                "interviews",
                "{{interviewId}}",
                "can-transition"
              ],
              "query": [
                {
                  "key": "action",
                  "value": "APPROVE"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Transition State (Approve)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"transition\": \"APPROVE\",\n  \"userId\": \"{{userId}}\",\n  \"reason\": \"Plan looks good, proceed with interview\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/workflow/interviews/{{interviewId}}/transition",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "workflow",
                "interviews",
                "{{interviewId}}",
                "transition"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Transition State (Reject)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"transition\": \"REJECT\",\n  \"userId\": \"{{userId}}\",\n  \"reason\": \"Skills don't match the job requirements\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/workflow/interviews/{{interviewId}}/transition",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "workflow",
                "interviews",
                "{{interviewId}}",
                "transition"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Workflow History",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/workflow/interviews/{{interviewId}}/history",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "workflow",
                "interviews",
                "{{interviewId}}",
                "history"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "MCP Skills",
      "item": [
        {
          "name": "List All Skills",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/mcp/skills",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "skills"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Validate Skills (pgvector)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"skills\": [\"React\", \"TypeScript\", \"Node.js\", \"GraphQL\"]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp/skills/validate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "skills",
                "validate"
              ]
            },
            "description": "Validate skills against the knowledge base using pgvector similarity search (threshold 0.6)."
          },
          "response": []
        },
        {
          "name": "Add Skill",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Rust\",\n  \"category\": \"Backend\",\n  \"description\": \"Systems programming language focused on safety and performance\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp/skills",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "skills"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Generate Skills (Gemini AI)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"topic\": \"Cloud Native Development\",\n  \"count\": 5\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/mcp/skills/generate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "skills",
                "generate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Skill",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/mcp/skills/{{skillId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "mcp",
                "skills",
                "{{skillId}}"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "API Keys",
      "item": [
        {
          "name": "Create API Key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"My Integration Key\",\n  \"permissions\": [\n    \"interview:create\",\n    \"interview:read\"\n  ]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api-keys",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api-keys"
              ]
            }
          },
          "response": []
        },
        {
          "name": "List API Keys",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api-keys",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api-keys"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Revoke API Key",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api-keys/{{apiKeyId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api-keys",
                "{{apiKeyId}}"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "OAuth Clients",
      "item": [
        {
          "name": "Create OAuth Client",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"My ATS Integration\",\n  \"redirectUris\": [\"https://myapp.com/callback\"],\n  \"scopes\": [\"interview:create\", \"interview:read\"]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/oauth-clients",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "oauth-clients"
              ]
            }
          },
          "response": []
        },
        {
          "name": "List OAuth Clients",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/oauth-clients",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "oauth-clients"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get OAuth Client",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/oauth-clients/{{oauthClientId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "oauth-clients",
                "{{oauthClientId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete OAuth Client",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/oauth-clients/{{oauthClientId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "oauth-clients",
                "{{oauthClientId}}"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Tenants",
      "item": [
        {
          "name": "List Tenants",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/tenants",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenants"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Tenant by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/tenants/{{tenantId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenants",
                "{{tenantId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update Tenant",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Updated Tenant Name\",\n  \"settings\": {\n    \"autoApprovePlans\": true\n  }\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/tenants/{{tenantId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenants",
                "{{tenantId}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Webhook Config",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/tenants/{{tenantId}}/webhook-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenants",
                "{{tenantId}}",
                "webhook-config"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Set Webhook Config",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"callbackUrl\": \"https://myapp.com/webhooks/teamcast\",\n  \"secret\": \"my-webhook-secret-min-32-characters-long\",\n  \"events\": [\n    \"interview.info_needed\",\n    \"interview.plan_generated\",\n    \"interview.approved\",\n    \"interview.assessment_pending\"\n  ]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/tenants/{{tenantId}}/webhook-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenants",
                "{{tenantId}}",
                "webhook-config"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Webhook Config",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/tenants/{{tenantId}}/webhook-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenants",
                "{{tenantId}}",
                "webhook-config"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhook DLQ",
      "item": [
        {
          "name": "List Dead Letter Queue",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/admin/webhook-dlq",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "admin",
                "webhook-dlq"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Retry DLQ Entry",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/admin/webhook-dlq/{{dlqEntryId}}/retry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "admin",
                "webhook-dlq",
                "{{dlqEntryId}}",
                "retry"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Recording",
      "item": [
        {
          "name": "List Recording Chunks",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/recording/{{sessionId}}/chunks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "recording",
                "{{sessionId}}",
                "chunks"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Stream Full Recording",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/recording/{{sessionId}}/stream",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "recording",
                "{{sessionId}}",
                "stream"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Invitations",
      "item": [
        {
          "name": "Invite Tenant User",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"newuser@example.com\",\n  \"firstName\": \"Jane\",\n  \"lastName\": \"Smith\",\n  \"role\": \"recruiter\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/invitations/tenants/{{tenantId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "invitations",
                "tenants",
                "{{tenantId}}"
              ]
            },
            "description": "Invite a user to join a tenant. Requires Platform Admin JWT."
          }
        },
        {
          "name": "Invite Platform User",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"admin@partner.com\",\n  \"firstName\": \"Platform\",\n  \"lastName\": \"Admin\",\n  \"role\": \"admin\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/invitations/platforms/{{platformId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "invitations",
                "platforms",
                "{{platformId}}"
              ]
            },
            "description": "Invite a user to a platform. Requires Super Admin JWT."
          }
        },
        {
          "name": "Get Invitation by Token",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/invitations/{{invitationToken}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "invitations",
                "{{invitationToken}}"
              ]
            },
            "description": "Get invitation details. Public endpoint (no auth required)."
          }
        },
        {
          "name": "Accept Invitation",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"password\": \"SecurePassword123!\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/invitations/{{invitationToken}}/accept",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "invitations",
                "{{invitationToken}}",
                "accept"
              ]
            },
            "description": "Accept an invitation and set the account password. Public endpoint."
          }
        }
      ]
    }
  ]
}
