{
  "openapi": "3.1.0",
  "info": {
    "title": "Tabfleet Browser API",
    "version": "0.1.0",
    "description": "Workspace-scoped cloud browsers. API keys are provisioned by a signed-in owner in the dashboard. This API does not currently implement OAuth. Signed URLs are credentials and must be kept private. API versioning and deprecation policy: https://tabfleet.com/docs/versioning. Quota reporting: https://tabfleet.com/docs/rate-limits.",
    "contact": {
      "name": "Tabfleet support — Dalton Solutions, LLC.",
      "email": "support@tabfleet.com",
      "url": "https://tabfleet.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://api.tabfleet.com"
    }
  ],
  "externalDocs": {
    "url": "https://tabfleet.com/docs/api"
  },
  "security": [
    {
      "workspaceKey": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Process health (does not test browser provisioning)",
        "description": "Public process-health check. Does not provision a browser or validate provider capacity.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    }
                  },
                  "required": [
                    "status"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/sessions": {
      "get": {
        "operationId": "listSessions",
        "summary": "List workspace sessions newest first with cursor pagination",
        "description": "List workspace sessions newest first with cursor pagination. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Session"
                      }
                    },
                    "retainedHistoryLimit": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "hasMore": {
                      "type": "boolean"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass as cursor on the next request; null means the end of retained history."
                    }
                  },
                  "required": [
                    "sessions",
                    "retainedHistoryLimit",
                    "limit",
                    "hasMore",
                    "nextCursor"
                  ]
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Page size. Defaults to 100 for existing clients.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque nextCursor from this workspace. Do not edit. Newer arrivals are excluded when continuing a page; retained history can expire.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ]
      },
      "post": {
        "operationId": "createSession",
        "summary": "Launch a cloud browser and reserve its lease allowance",
        "description": "Launch a cloud browser and reserve its lease allowance. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Idempotent replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionConnection"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionConnection"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{8,128}$"
            },
            "description": "Reuse this key and identical options when retrying the same creation."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "durationSeconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 3600,
                    "default": 300
                  },
                  "idleTimeoutSeconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 600,
                    "default": 60
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "getSession",
        "summary": "Inspect a session",
        "description": "Inspect a session. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "closeSession",
        "summary": "Close a browser and return confirmed unused allowance",
        "description": "Close a browser and return confirmed unused allowance. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Cleanup is still pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{id}/connection": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "operationId": "refreshConnection",
        "summary": "Mint a temporary CDP connection URL (browser-control key required)",
        "description": "Mint a temporary CDP connection URL (browser-control key required). Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionConnection"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{id}/viewer": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "operationId": "createViewerConnection",
        "summary": "Mint a temporary viewer WebSocket URL",
        "description": "Mint a temporary viewer WebSocket URL. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "viewerUrl": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "viewerUrl"
                  ]
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{id}/share": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "operationId": "createLiveView",
        "summary": "Create a signed standalone browser viewer link",
        "description": "Create a signed standalone browser viewer link. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveView"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "view",
                      "control"
                    ],
                    "default": "view"
                  },
                  "ttlSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 900,
                    "default": 300
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "revokeLiveViews",
        "summary": "Revoke all signed viewer links for this session",
        "description": "Revoke all signed viewer links for this session. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revoked": {
                      "type": "boolean",
                      "const": true
                    },
                    "sessionId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "revoked",
                    "sessionId"
                  ]
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        }
      }
    },
    "/v1/viewer-settings": {
      "get": {
        "operationId": "getViewerSettings",
        "summary": "Read workspace embedding policy",
        "description": "Read workspace embedding policy. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewerPolicy"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "setViewerSettings",
        "summary": "Replace allowed iframe origins and revoke existing workspace viewer grants",
        "description": "Replace allowed iframe origins and revoke existing workspace viewer grants. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewerPolicy"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "origins"
                ],
                "additionalProperties": false,
                "properties": {
                  "origins": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "description": "Exact HTTPS origins without paths, wildcards, or trailing slashes. Empty array disables embedding."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Read workspace usage and remaining allowance",
        "description": "Read workspace usage and remaining allowance. Authenticate with a workspace API key. See the linked API documentation for permissions and error recovery.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "completedSessions": {
                      "type": "integer"
                    },
                    "failedSessions": {
                      "type": "integer"
                    },
                    "allocatedMilliseconds": {
                      "type": "integer"
                    },
                    "activeSessions": {
                      "type": "integer"
                    },
                    "inProgressAllocatedMilliseconds": {
                      "type": "integer"
                    },
                    "budget": {
                      "$ref": "#/components/schemas/Budget"
                    },
                    "measurement": {
                      "type": "string",
                      "const": "service_allocation_not_provider_billing"
                    }
                  },
                  "required": [
                    "completedSessions",
                    "failedSessions",
                    "allocatedMilliseconds",
                    "activeSessions",
                    "inProgressAllocatedMilliseconds",
                    "budget",
                    "measurement"
                  ]
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Throttled or temporarily capacity constrained. Honor Retry-After and inspect the JSON error code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before retrying this operation.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error. Respect Retry-After when supplied; do not blindly retry mutations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "Links to the API versioning/deprecation policy and rate-limit documentation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "description": "On authenticated requests, named quota policy: q is quota, w is seconds; draft-ietf-httpapi-ratelimit-headers-11.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";q=1;w=20"
              },
              "RateLimit": {
                "description": "Named quota snapshot: r is remaining, t is reset delay in seconds. This does not represent reserved capacity.",
                "schema": {
                  "type": "string"
                },
                "example": "\"browser-launch\";r=0;t=20"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "workspaceKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Tabfleet API key",
        "description": "Owner-provisioned API key, not an OAuth token. See https://tabfleet.com/auth.md."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Session": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "creating",
              "active",
              "closing",
              "closed",
              "failed"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "idleTimeoutSeconds": {
            "type": "integer"
          },
          "closeReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "allocatedSeconds": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "status",
          "createdAt",
          "expiresAt",
          "endedAt",
          "idleTimeoutSeconds",
          "closeReason",
          "allocatedSeconds"
        ]
      },
      "SessionConnection": {
        "type": "object",
        "description": "Public session state plus a temporary connection only while the session is active.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Session"
          },
          {
            "type": "object",
            "properties": {
              "cdpUrl": {
                "type": "string",
                "format": "uri",
                "description": "Temporary signed WSS endpoint, present only while active. At most 300 seconds validity."
              },
              "connectionTokenTtlSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 300,
                "description": "Remaining signed connection lifetime in seconds."
              }
            }
          }
        ]
      },
      "Budget": {
        "type": "object",
        "properties": {
          "allowanceSeconds": {
            "type": "integer",
            "minimum": 0,
            "description": "Total browser seconds granted to this workspace."
          },
          "chargedSeconds": {
            "type": "integer",
            "minimum": 0,
            "description": "Settled browser seconds consumed."
          },
          "reservedSeconds": {
            "type": "integer",
            "minimum": 0,
            "description": "Browser seconds reserved for active or pending cleanup sessions."
          },
          "availableSeconds": {
            "type": "integer",
            "minimum": 0,
            "description": "Allowance less charges and reservations, clamped at zero."
          },
          "suspended": {
            "type": "boolean",
            "description": "Whether workspace operations are suspended."
          }
        },
        "required": [
          "allowanceSeconds",
          "chargedSeconds",
          "reservedSeconds",
          "availableSeconds",
          "suspended"
        ]
      },
      "ViewerPolicy": {
        "type": "object",
        "properties": {
          "origins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "origins",
          "version"
        ]
      },
      "LiveView": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "mode": {
            "type": "string",
            "enum": [
              "view",
              "control"
            ]
          },
          "allowedEmbeddingOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dashboardUrl": {
            "type": "string",
            "format": "uri"
          },
          "notice": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "expiresAt",
          "mode",
          "allowedEmbeddingOrigins",
          "dashboardUrl",
          "notice"
        ]
      }
    }
  }
}
