components:
  schemas:
    APIKey:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        expires_at:
          format: date-time
          type: string
        identifier:
          type: string
        last_used_at:
          format: date-time
          type:
            - string
            - "null"
        name:
          type: string
        owner:
          $ref: "#/components/schemas/APIKeyOwner"
          description: The principal this API key authenticates as. Omitted on legacy user-key responses that do not yet resolve the owner.
        scopes:
          type: string
      required:
        - name
        - identifier
        - last_used_at
        - created_at
      type: object
    APIKeyOwner:
      additionalProperties: false
      properties:
        name:
          description: "The owner's name: a user's full name (or email) or a service account's name."
          readOnly: true
          type: string
        type:
          description: The kind of principal this API key authenticates as.
          enum:
            - user
            - service_account
          type: string
      required:
        - type
        - name
      type: object
    Account:
      additionalProperties: false
      properties:
        execution_region:
          type: string
        is_self_hosted_only:
          type: boolean
        name:
          type: string
        slug:
          deprecated: true
          description: This property is deprecated. Use name instead.
          type: string
      required:
        - name
        - is_self_hosted_only
        - execution_region
      type: object
    AcknowledgeAlertResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/AcknowledgeAlertResponse.json
          format: uri
          readOnly: true
          type: string
        status:
          type: string
      required:
        - status
      type: object
    AcknowledgeAllAlertsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/AcknowledgeAllAlertsResponse.json
          format: uri
          readOnly: true
          type: string
        count:
          description: Number of alerts that were acknowledged
          format: int64
          type: integer
        status:
          type: string
      required:
        - status
        - count
      type: object
    Alert:
      additionalProperties: false
      properties:
        acked:
          type: boolean
        alert_type:
          type: string
        created_at:
          format: date-time
          type: string
        detail:
          oneOf:
            - $ref: "#/components/schemas/RunFailureAlert"
          type: object
        seq:
          format: int64
          type: integer
        status:
          type: string
      required:
        - alert_type
        - seq
        - detail
        - created_at
        - status
        - acked
      type: object
    App:
      additionalProperties: false
      properties:
        created_at:
          description: The date and time this app was created.
          format: date-time
          type: string
        health_status:
          deprecated: true
          description: This property is deprecated. It will always be 'healthy'.
          enum:
            - healthy
            - warning
          type: string
        is_externally_accessible:
          type: boolean
        last_run:
          $ref: "#/components/schemas/Run"
          deprecated: true
          description: "Deprecated: always null, previously latest run of this app. Use \"runs\" in app summary instead."
        name:
          description: The name of the app.
          type: string
        next_run_at:
          description: The next time this app will run as part of it's schedule, null if none.
          format: date-time
          type:
            - string
            - "null"
        owner:
          description: The account slug that owns this app.
          type: string
        pending_timeout:
          default: 600
          description: The maximum time in seconds that a run can stay in the pending state before being marked as cancelled.
          format: int64
          type: integer
        retry_policy:
          $ref: "#/components/schemas/RunRetryPolicy"
          description: The retry policy for failed runs of this app.
        run_results:
          $ref: "#/components/schemas/RunResults"
          description: The stats of all the runs of this app.
        running_timeout:
          default: 0
          description: The number of seconds that a run can stay running before it gets cancelled. Value of 0 (default) means no timeout.
          format: int64
          type: integer
        schedule:
          deprecated: true
          description: The schedule associated with this app, null if none.
          type:
            - string
            - "null"
        short_description:
          description: A short description of the app. Can be empty.
          type: string
        slug:
          deprecated: true
          description: This property is deprecated. Use name instead.
          type: string
        status:
          description: The status of the app.
          enum:
            - active
            - disabled
          type: string
        subdomain:
          description: The subdomain that this app is accessible via. Must be externally accessible first.
          type: string
        tags:
          description: The tags applied to the app.
          items:
            $ref: "#/components/schemas/AppTag"
          type: array
        version:
          description: The current version of this app, null if none.
          type:
            - string
            - "null"
      required:
        - name
        - owner
        - short_description
        - version
        - schedule
        - created_at
        - next_run_at
        - health_status
        - is_externally_accessible
        - pending_timeout
        - running_timeout
      type: object
    AppStatistics:
      additionalProperties: false
      properties:
        all_apps:
          format: int64
          type: integer
        disabled_apps:
          format: int64
          type: integer
        healthy_apps:
          format: int64
          type: integer
        running_apps:
          format: int64
          type: integer
      required:
        - all_apps
        - healthy_apps
        - running_apps
        - disabled_apps
      type: object
    AppSummary:
      additionalProperties: false
      properties:
        app:
          $ref: "#/components/schemas/App"
        runs:
          items:
            $ref: "#/components/schemas/Run"
          type: array
      required:
        - app
        - runs
      type: object
    AppTag:
      additionalProperties: false
      properties:
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      type: object
    AppVersion:
      additionalProperties: false
      properties:
        content_checksum:
          description: Server-computed SHA256 of the bundle contents for this version.
          type: string
        created_at:
          format: date-time
          type: string
        idempotency_key:
          description: Client-supplied key (e.g. git SHA) that produced this version, or empty if none was supplied at deploy time.
          type: string
        parameters:
          items:
            $ref: "#/components/schemas/Parameter"
          type: array
        towerfile:
          description: The Towerfile that this version was created from.
          type: string
        version:
          type: string
      required:
        - version
        - parameters
        - created_at
        - towerfile
      type: object
    AuthenticationContext:
      additionalProperties: false
      properties:
        work_os_access_token:
          description: The WorkOS access token for SSO authentication.
          type: string
      required:
        - work_os_access_token
      type: object
    BatchDescribeRunsParams:
      additionalProperties: false
      properties:
        name:
          description: The name of the app to describe the run for.
          type: string
        seq:
          description: The number of the run to describe.
          format: int64
          type: integer
      required:
        - name
        - seq
      type: object
    BatchDescribeRunsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/BatchDescribeRunsResponse.json
          format: uri
          readOnly: true
          type: string
        runs:
          items:
            $ref: "#/components/schemas/BatchErrableRunAndLinks"
          type: array
      required:
        - runs
      type: object
    BatchErrableRunAndLinks:
      additionalProperties: false
      properties:
        data:
          $ref: "#/components/schemas/RunAndLinks"
        error:
          $ref: "#/components/schemas/BatchError"
      type: object
    BatchError:
      additionalProperties: false
      properties:
        message:
          type: string
      required:
        - message
      type: object
    BatchScheduleParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/BatchScheduleParams.json
          format: uri
          readOnly: true
          type: string
        ids:
          description: The IDs of the schedules to modify
          items:
            type: string
          minItems: 1
          type: array
      required:
        - ids
      type: object
    BatchScheduleResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/BatchScheduleResponse.json
          format: uri
          readOnly: true
          type: string
        schedules:
          items:
            $ref: "#/components/schemas/Schedule"
          type: array
      required:
        - schedules
      type: object
    CancelRunResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CancelRunResponse.json
          format: uri
          readOnly: true
          type: string
        cancelled_child_runs:
          description: Number of descendant runs that were also cancelled as part of this cascade.
          format: int64
          type: integer
        run:
          $ref: "#/components/schemas/Run"
      required:
        - run
        - cancelled_child_runs
      type: object
    Catalog:
      additionalProperties: false
      properties:
        CreatedAt:
          format: date-time
          type: string
        environment:
          type: string
        name:
          type: string
        properties:
          items:
            $ref: "#/components/schemas/CatalogProperty"
          type: array
        slug:
          deprecated: true
          description: This property is deprecated. Use name instead.
          type: string
        type:
          type: string
      required:
        - type
        - name
        - environment
        - properties
        - CreatedAt
      type: object
    CatalogCredentials:
      additionalProperties: false
      properties:
        catalog_uri:
          description: The Iceberg REST catalog endpoint.
          type: string
        expires_at:
          description: When the OAuth token expires.
          format: date-time
          type: string
        mode:
          description: Access level the token is bound to.
          type: string
        oauth_token:
          description: Short-lived OAuth bearer token.
          type: string
        warehouse:
          description: The Polaris catalog identifier (REST prefix).
          type: string
      required:
        - catalog_uri
        - warehouse
        - oauth_token
        - expires_at
        - mode
      type: object
    CatalogFact:
      additionalProperties: false
      properties:
        body:
          description: Optional structured payload (SQL, unit, enum values).
        confidence:
          description: How trustworthy the fact is.
          enum:
            - confirmed
            - heuristic
            - inferred
          type: string
        created_at:
          format: date-time
          type: string
        name:
          description: The natural key of the fact within the catalog.
          type: string
        object:
          description: Descriptive path to what the fact is about, e.g. "bronze.runs.deleted_at". Empty for catalog-scoped facts.
          type: string
        scope:
          description: What kind of object the fact is about.
          enum:
            - catalog
            - namespace
            - table
            - column
            - metric
          type: string
        source:
          description: Where the fact came from (agent id, user, ...).
          type: string
        statement:
          description: The human-readable meaning of the fact.
          type: string
        updated_at:
          format: date-time
          type: string
      required:
        - name
        - scope
        - object
        - statement
        - confidence
        - created_at
        - updated_at
      type: object
    CatalogProperty:
      additionalProperties: false
      properties:
        environment_variable:
          description: The environment variable name this property is injected as at runtime.
          type: string
        name:
          type: string
        preview:
          type: string
      required:
        - name
        - preview
      type: object
    ClaimDeviceLoginTicketParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ClaimDeviceLoginTicketParams.json
          format: uri
          readOnly: true
          type: string
        refresh_token:
          description: The refresh token for the session to delegate to the device.
          type: string
        user_code:
          description: The user code to claim.
          type: string
      required:
        - user_code
        - refresh_token
      type: object
    ClaimDeviceLoginTicketResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ClaimDeviceLoginTicketResponse.json
          format: uri
          readOnly: true
          type: string
        claimed:
          description: Whether the code was successfully claimed.
          type: boolean
      required:
        - claimed
      type: object
    CreateAPIKeyParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateAPIKeyParams.json
          format: uri
          readOnly: true
          type: string
        expires_at:
          description: When this API key expires.
          format: date-time
          type:
            - string
            - "null"
        name:
          type: string
        scopes:
          description: Space separated scopes that this API key is valid for.
          type:
            - string
            - "null"
        team:
          description: The team this API key is associated with. This field is optional. You must be a member of the team that you're creating the API key for, and if you're using an API key to create a new API key, the API key you use to authenticate this request must be a personal API key.
          type:
            - string
            - "null"
      required:
        - name
      type: object
    CreateAPIKeyResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateAPIKeyResponse.json
          format: uri
          readOnly: true
          type: string
        api_key:
          $ref: "#/components/schemas/APIKey"
          description: Created API key
      required:
        - api_key
      type: object
    CreateAccountParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateAccountParams.json
          format: uri
          readOnly: true
          type: string
        email:
          type: string
        password:
          type: string
      required:
        - email
        - password
      type: object
    CreateAccountParamsFlagsStruct:
      additionalProperties: false
      properties:
        is_test_account:
          type: boolean
      required:
        - is_test_account
      type: object
    CreateAccountResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateAccountResponse.json
          format: uri
          readOnly: true
          type: string
        session:
          $ref: "#/components/schemas/Session"
      required:
        - session
      type: object
    CreateAppParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateAppParams.json
          format: uri
          readOnly: true
          type: string
        is_externally_accessible:
          default: false
          description: Indicates that web traffic should be routed to this app and that its runs should get a hostname assigned to it.
          type: boolean
        name:
          description: The name of the app.
          maxLength: 100
          minLength: 1
          type: string
        pending_timeout:
          description: The amount of time in seconds that runs of this app can stay in pending state before being marked as failed.
          format: int64
          type:
            - integer
            - "null"
        retry_policy:
          $ref: "#/components/schemas/RunRetryPolicy"
          description: The retry policy for failed runs of this app. Defines different retry behavior for infrastructure (errored) vs application (crashed) failures.
        running_timeout:
          description: The amount of time in seconds that runs of this app can stay in running state before being marked as failed.
          format: int64
          type:
            - integer
            - "null"
        short_description:
          description: A description of the app.
          type: string
        slug:
          deprecated: true
          description: The slug of the app. Legacy CLI will send it but we don't need it.
          type: string
        subdomain:
          description: The subdomain this app is accessible under. Requires is_externally_accessible to be true.
          type:
            - string
            - "null"
        tags:
          description: The tags for this app.
          items:
            $ref: "#/components/schemas/AppTag"
          type: array
      required:
        - name
      type: object
    CreateAppResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateAppResponse.json
          format: uri
          readOnly: true
          type: string
        app:
          $ref: "#/components/schemas/App"
      required:
        - app
      type: object
    CreateCatalogParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateCatalogParams.json
          format: uri
          readOnly: true
          type: string
        environment:
          type: string
        name:
          type: string
        properties:
          items:
            $ref: "#/components/schemas/EncryptedCatalogProperty"
          type: array
        type:
          enum:
            - snowflake-open-catalog
            - apache-polaris
            - cloudflare-r2-catalog
            - lakekeeper
            - tower-catalog
            - s3-tables
          type: string
      required:
        - name
        - type
        - environment
        - properties
      type: object
    CreateCatalogResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateCatalogResponse.json
          format: uri
          readOnly: true
          type: string
        catalog:
          $ref: "#/components/schemas/Catalog"
      required:
        - catalog
      type: object
    CreateDeviceLoginTicketResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateDeviceLoginTicketResponse.json
          format: uri
          readOnly: true
          type: string
        device_code:
          description: The unique code identifying this device login request.
          type: string
        expires_in:
          description: Number of seconds until this request expires.
          format: int64
          type: integer
        generated_at:
          description: When this device login request was created.
          format: date-time
          type: string
        interval:
          description: Number of seconds to wait between polling attempts.
          format: int64
          type: integer
        login_url:
          description: The URL where the user should go to enter the user code.
          type: string
        user_code:
          description: The code that the user needs to enter to authenticate.
          type: string
        verification_url:
          description: The URL that the device should poll to check authentication status.
          type: string
      required:
        - device_code
        - user_code
        - login_url
        - verification_url
        - generated_at
        - expires_in
        - interval
      type: object
    CreateEnvironmentParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateEnvironmentParams.json
          format: uri
          readOnly: true
          type: string
        name:
          description: The name of the environment
          maxLength: 100
          minLength: 1
          type: string
      required:
        - name
      type: object
    CreateEnvironmentResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateEnvironmentResponse.json
          format: uri
          readOnly: true
          type: string
        environment:
          $ref: "#/components/schemas/Environment"
      required:
        - environment
      type: object
    CreateGuestParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateGuestParams.json
          format: uri
          readOnly: true
          type: string
        app:
          description: The name of the externally accessible app this guest can access.
          type: string
        expires_in:
          default: 259200
          description: The number of seconds the guest session should last. Defaults to 72 hours.
          format: int64
          type: integer
        name:
          description: Optional display name for the guest.
          type: string
        redirect_url:
          description: Where to redirect the guest after they log in. Defaults to the app's subdomain.
          type: string
      required:
        - app
      type: object
    CreateGuestResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateGuestResponse.json
          format: uri
          readOnly: true
          type: string
        guest:
          $ref: "#/components/schemas/Guest"
          description: The created guest.
        login_url:
          description: The URL to share with the guest for logging in.
          type: string
        login_url_expires_at:
          description: When the login URL expires.
          format: date-time
          type: string
      required:
        - guest
        - login_url
        - login_url_expires_at
      type: object
    CreateSandboxSecretsParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateSandboxSecretsParams.json
          format: uri
          readOnly: true
          type: string
        environment:
          description: Environment to create secrets in
          type: string
        secret_keys:
          description: List of secret keys to create with Tower defaults
          items:
            type: string
          type: array
      required:
        - environment
        - secret_keys
      type: object
    CreateSandboxSecretsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateSandboxSecretsResponse.json
          format: uri
          readOnly: true
          type: string
        created:
          description: List of secret keys that were created
          items:
            type: string
          type: array
      required:
        - created
      type: object
    CreateScheduleParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateScheduleParams.json
          format: uri
          readOnly: true
          type: string
        app_name:
          description: The name of the app to create a schedule for
          minLength: 1
          type: string
        app_version:
          deprecated: true
          description: This property is deprecated and ignored. Schedules inherit the version from their environment.
          type:
            - string
            - "null"
        cron:
          description: The cron expression defining when the app should run
          minLength: 1
          type: string
        environment:
          default: default
          description: The environment to run the app in
          type: string
        name:
          description: The name for this schedule. Must be unique per environment. If not set, one will be generated for you.
          type:
            - string
            - "null"
        overlap_policy:
          default: allow
          description: The overlap policy for the schedule
          enum:
            - skip
            - allow
          type:
            - string
            - "null"
        parameters:
          description: Parameters to pass when running the app
          items:
            $ref: "#/components/schemas/RunParameter"
          type: array
        status:
          description: The status of the schedule (defaults to active)
          enum:
            - active
            - disabled
          type:
            - string
            - "null"
        timezone:
          default: UTC
          description: The IANA timezone identifier that the cron expression should be evaluated in (e.g., 'America/New_York', 'Europe/London'). Defaults to 'UTC'.
          type:
            - string
            - "null"
      required:
        - app_name
        - cron
      type: object
    CreateScheduleResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateScheduleResponse.json
          format: uri
          readOnly: true
          type: string
        schedule:
          $ref: "#/components/schemas/Schedule"
      required:
        - schedule
      type: object
    CreateSecretParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateSecretParams.json
          format: uri
          readOnly: true
          type: string
        encrypted_value:
          type: string
        environment:
          type: string
        name:
          type: string
        preview:
          type: string
      required:
        - name
        - environment
        - encrypted_value
        - preview
      type: object
    CreateSecretResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateSecretResponse.json
          format: uri
          readOnly: true
          type: string
        secret:
          $ref: "#/components/schemas/Secret"
      required:
        - secret
      type: object
    CreateServiceAccountAPIKeyParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateServiceAccountAPIKeyParams.json
          format: uri
          readOnly: true
          type: string
        expires_at:
          description: When the API key expires.
          format: date-time
          type: string
        name:
          description: Human-readable name for the API key.
          minLength: 1
          type: string
        scopes:
          description: Space-separated scopes for the key. Defaults to the SA's role scopes when omitted.
          type: string
      required:
        - name
      type: object
    CreateServiceAccountAPIKeyResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateServiceAccountAPIKeyResponse.json
          format: uri
          readOnly: true
          type: string
        api_key:
          $ref: "#/components/schemas/APIKey"
      required:
        - api_key
      type: object
    CreateServiceAccountParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateServiceAccountParams.json
          format: uri
          readOnly: true
          type: string
        metadata:
          description: Optional, customer-supplied JSON metadata.
          type: string
        name:
          description: Human-readable name for the service account. Must be unique within the account.
          minLength: 1
          type: string
        role:
          description: The team role this service account acts as.
          enum:
            - admin
            - developer
          type: string
      required:
        - name
        - role
      type: object
    CreateServiceAccountResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateServiceAccountResponse.json
          format: uri
          readOnly: true
          type: string
        service_account:
          $ref: "#/components/schemas/ServiceAccount"
      required:
        - service_account
      type: object
    CreateSessionParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateSessionParams.json
          format: uri
          readOnly: true
          type: string
        code:
          description: One-time password verification code for two-factor authentication. If the user has two-factor authentication enabled, this code is required to log in.
          type: string
        password:
          type: string
        username:
          type: string
      required:
        - username
        - password
      type: object
    CreateSessionResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateSessionResponse.json
          format: uri
          readOnly: true
          type: string
        session:
          $ref: "#/components/schemas/Session"
          description: The new session information.
      required:
        - session
      type: object
    CreateTeamParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateTeamParams.json
          format: uri
          readOnly: true
          type: string
        name:
          description: The name of the team to create
          type: string
      required:
        - name
      type: object
    CreateTeamResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateTeamResponse.json
          format: uri
          readOnly: true
          type: string
        team:
          $ref: "#/components/schemas/Team"
          description: The team that was just created
      required:
        - team
      type: object
    CreateWebhookParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateWebhookParams.json
          format: uri
          readOnly: true
          type: string
        name:
          description: The name of the webhook.
          type: string
        url:
          description: The webhook URL.
          type: string
      required:
        - name
        - url
      type: object
    CreateWebhookResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/CreateWebhookResponse.json
          format: uri
          readOnly: true
          type: string
        signing_key:
          type: string
        webhook:
          $ref: "#/components/schemas/Webhook"
      required:
        - webhook
        - signing_key
      type: object
    DeleteAPIKeyParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteAPIKeyParams.json
          format: uri
          readOnly: true
          type: string
        identifier:
          type: string
      required:
        - identifier
      type: object
    DeleteAPIKeyResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteAPIKeyResponse.json
          format: uri
          readOnly: true
          type: string
        api_key:
          $ref: "#/components/schemas/APIKey"
          description: Created API key
      required:
        - api_key
      type: object
    DeleteAppResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteAppResponse.json
          format: uri
          readOnly: true
          type: string
        app:
          $ref: "#/components/schemas/App"
      required:
        - app
      type: object
    DeleteCatalogResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteCatalogResponse.json
          format: uri
          readOnly: true
          type: string
        catalog:
          $ref: "#/components/schemas/Catalog"
      required:
        - catalog
      type: object
    DeleteEnvironmentResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteEnvironmentResponse.json
          format: uri
          readOnly: true
          type: string
        environment:
          $ref: "#/components/schemas/Environment"
      required:
        - environment
      type: object
    DeleteGuestOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteGuestOutputBody.json
          format: uri
          readOnly: true
          type: string
      type: object
    DeleteScheduleParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteScheduleParams.json
          format: uri
          readOnly: true
          type: string
        ids:
          description: The IDs of the schedules to delete.
          items:
            type: string
          type: array
      required:
        - ids
      type: object
    DeleteScheduleResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteScheduleResponse.json
          format: uri
          readOnly: true
          type: string
        schedules:
          description: the schedules successfully deleted
          items:
            $ref: "#/components/schemas/Schedule"
          type: array
      required:
        - schedules
      type: object
    DeleteSecretResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteSecretResponse.json
          format: uri
          readOnly: true
          type: string
        secret:
          $ref: "#/components/schemas/Secret"
      required:
        - secret
      type: object
    DeleteServiceAccountAPIKeyParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteServiceAccountAPIKeyParams.json
          format: uri
          readOnly: true
          type: string
        identifier:
          description: The API key identifier (with or without the 'sk-' prefix).
          type: string
      required:
        - identifier
      type: object
    DeleteSessionParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteSessionParams.json
          format: uri
          readOnly: true
          type: string
        session_id:
          description: The ID of the session to delete. If not provided, the current session will be deleted.
          type: string
      type: object
    DeleteSessionResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteSessionResponse.json
          format: uri
          readOnly: true
          type: string
        session:
          $ref: "#/components/schemas/Session"
          description: The session that was deleted.
      required:
        - session
      type: object
    DeleteTeamInvitationParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteTeamInvitationParams.json
          format: uri
          readOnly: true
          type: string
        email:
          description: The email address of the team member to remove
          type: string
      required:
        - email
      type: object
    DeleteTeamInvitationResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteTeamInvitationResponse.json
          format: uri
          readOnly: true
          type: string
        invitation:
          $ref: "#/components/schemas/TeamInvitation"
          description: The team invitation that was just removed
      required:
        - invitation
      type: object
    DeleteTeamParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteTeamParams.json
          format: uri
          readOnly: true
          type: string
        name:
          description: The name of the team to delete
          type: string
      required:
        - name
      type: object
    DeleteTeamResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteTeamResponse.json
          format: uri
          readOnly: true
          type: string
        team:
          $ref: "#/components/schemas/Team"
          description: The team that was just created
      required:
        - team
      type: object
    DeleteWebhookResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeleteWebhookResponse.json
          format: uri
          readOnly: true
          type: string
        webhook:
          $ref: "#/components/schemas/Webhook"
      required:
        - webhook
      type: object
    DeployAppResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DeployAppResponse.json
          format: uri
          readOnly: true
          type: string
        version:
          $ref: "#/components/schemas/AppVersion"
      required:
        - version
      type: object
    DescribeAccountBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeAccountBody.json
          format: uri
          readOnly: true
          type: string
        account:
          $ref: "#/components/schemas/Account"
      required:
        - account
      type: object
    DescribeAppResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeAppResponse.json
          format: uri
          readOnly: true
          type: string
        app:
          $ref: "#/components/schemas/App"
        runs:
          items:
            $ref: "#/components/schemas/Run"
          type: array
      required:
        - app
        - runs
      type: object
    DescribeAppVersionResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeAppVersionResponse.json
          format: uri
          readOnly: true
          type: string
        version:
          $ref: "#/components/schemas/AppVersion"
      required:
        - version
      type: object
    DescribeAuthenticationContextBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeAuthenticationContextBody.json
          format: uri
          readOnly: true
          type: string
        authentication_context:
          $ref: "#/components/schemas/AuthenticationContext"
      required:
        - authentication_context
      type: object
    DescribeCatalogFactResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeCatalogFactResponse.json
          format: uri
          readOnly: true
          type: string
        fact:
          $ref: "#/components/schemas/CatalogFact"
      required:
        - fact
      type: object
    DescribeCatalogResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeCatalogResponse.json
          format: uri
          readOnly: true
          type: string
        catalog:
          $ref: "#/components/schemas/Catalog"
      required:
        - catalog
      type: object
    DescribeDeviceLoginSessionResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeDeviceLoginSessionResponse.json
          format: uri
          readOnly: true
          type: string
        session:
          $ref: "#/components/schemas/Session"
          description: The current session associated with your authentication method.
      required:
        - session
      type: object
    DescribeEmailPreferencesBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeEmailPreferencesBody.json
          format: uri
          readOnly: true
          type: string
        subscriptions:
          $ref: "#/components/schemas/EmailSubscriptions"
      required:
        - subscriptions
      type: object
    DescribeEnvironmentResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeEnvironmentResponse.json
          format: uri
          readOnly: true
          type: string
        environment:
          $ref: "#/components/schemas/Environment"
        number_catalogs:
          format: int64
          type: integer
        number_schedules:
          format: int64
          type: integer
        number_secrets:
          format: int64
          type: integer
      required:
        - environment
        - number_secrets
        - number_schedules
        - number_catalogs
      type: object
    DescribePlanResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribePlanResponse.json
          format: uri
          readOnly: true
          type: string
        plan:
          $ref: "#/components/schemas/Plan"
      required:
        - plan
      type: object
    DescribeRunGraphResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeRunGraphResponse.json
          format: uri
          readOnly: true
          type: string
        runs:
          items:
            $ref: "#/components/schemas/RunGraphNode"
          type: array
      required:
        - runs
      type: object
    DescribeRunLinks:
      additionalProperties: false
      properties:
        next:
          deprecated: true
          description: The URL of the next run, if any.
          type:
            - string
            - "null"
        next_number:
          description: The number of the next run, if any.
          format: int64
          type:
            - integer
            - "null"
        prev:
          deprecated: true
          description: The URL of the previous run, if any.
          type:
            - string
            - "null"
        prev_number:
          description: The number of the previous run, if any.
          format: int64
          type:
            - integer
            - "null"
        self:
          deprecated: true
          description: The URL of this run.
          type: string
      required:
        - self
        - next
        - prev
        - next_number
        - prev_number
      type: object
    DescribeRunLogsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeRunLogsResponse.json
          format: uri
          readOnly: true
          type: string
        log_lines:
          items:
            $ref: "#/components/schemas/RunLogLine"
          type: array
      required:
        - log_lines
      type: object
    DescribeRunResponse:
      additionalProperties: false
      properties:
        $links:
          $ref: "#/components/schemas/DescribeRunLinks"
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeRunResponse.json
          format: uri
          readOnly: true
          type: string
        run:
          $ref: "#/components/schemas/Run"
      required:
        - run
        - $links
      type: object
    DescribeSecretsKeyResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeSecretsKeyResponse.json
          format: uri
          readOnly: true
          type: string
        public_key:
          type: string
      required:
        - public_key
      type: object
    DescribeServiceAccountResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeServiceAccountResponse.json
          format: uri
          readOnly: true
          type: string
        service_account:
          $ref: "#/components/schemas/ServiceAccount"
      required:
        - service_account
      type: object
    DescribeSessionResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeSessionResponse.json
          format: uri
          readOnly: true
          type: string
        session:
          $ref: "#/components/schemas/Session"
          description: The current session associated with your authentication method.
      required:
        - session
      type: object
    DescribeTeamResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeTeamResponse.json
          format: uri
          readOnly: true
          type: string
        invitations:
          description: Pending team invitations
          items:
            $ref: "#/components/schemas/TeamInvitation"
          type: array
        members:
          description: The members of the team
          items:
            $ref: "#/components/schemas/User"
          type: array
        team:
          $ref: "#/components/schemas/Team"
          description: The team details
      required:
        - team
        - members
        - invitations
      type: object
    DescribeWebhookResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeWebhookResponse.json
          format: uri
          readOnly: true
          type: string
        webhook:
          $ref: "#/components/schemas/Webhook"
      required:
        - webhook
      type: object
    DescribeWhoamiResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/DescribeWhoamiResponse.json
          format: uri
          readOnly: true
          type: string
        expires_at:
          description: Absolute time at which the token expires.
          format: date-time
          type: string
        token:
          description: RS256-signed identity JWT scoped to the authenticated user. Verify against the public keys at /.well-known/jwks.json.
          type: string
      required:
        - token
        - expires_at
      type: object
    EmailSubscriptions:
      additionalProperties: false
      properties:
        feature_updates:
          type: boolean
        marketing_emails:
          type: boolean
        tower_newsletter:
          type: boolean
      type: object
    EncryptedCatalogProperty:
      additionalProperties: false
      properties:
        encrypted_value:
          type: string
        name:
          type: string
        preview:
          type: string
      required:
        - name
        - encrypted_value
        - preview
      type: object
    Environment:
      additionalProperties: false
      properties:
        is_deletable:
          description: If this environment is able to be deleted.
          type: boolean
        name:
          description: The human readable name for the environment
          type: string
      required:
        - name
        - is_deletable
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence of the problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: "#/components/schemas/ErrorDetail"
          type: array
        instance:
          description: A URI reference that identifies the specific occurrence of the problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    ExportCatalogsParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ExportCatalogsParams.json
          format: uri
          readOnly: true
          type: string
        all:
          default: false
          description: Whether to fetch all catalogs or only the ones in the supplied environment.
          type: boolean
        environment:
          default: default
          description: The environment to filter by.
          type: string
        page:
          default: 1
          description: The page number to fetch.
          format: int64
          type: integer
        page_size:
          default: 20
          description: The number of records to fetch on each page.
          format: int64
          type: integer
        public_key:
          description: The PEM-encoded public key you want to use to encrypt sensitive catalog properties.
          type: string
      required:
        - public_key
        - environment
        - all
        - page
        - page_size
      type: object
    ExportCatalogsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ExportCatalogsResponse.json
          format: uri
          readOnly: true
          type: string
        catalogs:
          items:
            $ref: "#/components/schemas/ExportedCatalog"
          type: array
        pages:
          $ref: "#/components/schemas/Pagination"
      required:
        - pages
        - catalogs
      type: object
    ExportSecretsParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ExportSecretsParams.json
          format: uri
          readOnly: true
          type: string
        all:
          default: false
          description: Whether to fetch all secrets or only the ones that are not marked as deleted.
          type: boolean
        environment:
          default: default
          description: The environment to filter by.
          type: string
        page:
          default: 1
          description: The page number to fetch.
          format: int64
          type: integer
        page_size:
          default: 20
          description: The number of records to fetch on each page.
          format: int64
          type: integer
        public_key:
          description: The PEM-encoded public key you want to use to encrypt sensitive secret values.
          type: string
      required:
        - public_key
        - environment
        - all
        - page
        - page_size
      type: object
    ExportSecretsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ExportSecretsResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
        secrets:
          items:
            $ref: "#/components/schemas/ExportedSecret"
          type: array
      required:
        - pages
        - secrets
      type: object
    ExportedCatalog:
      additionalProperties: false
      properties:
        CreatedAt:
          format: date-time
          type: string
        environment:
          type: string
        name:
          type: string
        properties:
          items:
            $ref: "#/components/schemas/ExportedCatalogProperty"
          type: array
        slug:
          deprecated: true
          description: This property is deprecated. Use name instead.
          type: string
        type:
          type: string
      required:
        - type
        - name
        - environment
        - properties
        - CreatedAt
      type: object
    ExportedCatalogProperty:
      additionalProperties: false
      properties:
        encrypted_value:
          type: string
        environment_variable:
          description: The environment variable name this property is injected as at runtime.
          type: string
        name:
          type: string
        preview:
          type: string
      required:
        - name
        - encrypted_value
        - preview
      type: object
    ExportedSecret:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        encrypted_value:
          type: string
        environment:
          type: string
        name:
          type: string
      required:
        - name
        - environment
        - encrypted_value
        - created_at
      type: object
    Feature:
      additionalProperties: false
      properties:
        code:
          type: string
        name:
          type: string
        type:
          type: string
        value:
          format: int64
          type: integer
      required:
        - code
        - name
        - type
        - value
      type: object
    FeaturebaseIdentity:
      additionalProperties: false
      properties:
        company_hash:
          type: string
        user_hash:
          type: string
      required:
        - user_hash
        - company_hash
      type: object
    GenerateAppStatisticsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/GenerateAppStatisticsResponse.json
          format: uri
          readOnly: true
          type: string
        statistics:
          $ref: "#/components/schemas/AppStatistics"
      required:
        - statistics
      type: object
    GenerateOrganizationUsageTimeSeriesResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/GenerateOrganizationUsageTimeSeriesResponse.json
          format: uri
          readOnly: true
          type: string
        series:
          items:
            $ref: "#/components/schemas/UsageMetricTimeSeriesPoint"
          type: array
      required:
        - series
      type: object
    GenerateRunStatisticsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/GenerateRunStatisticsResponse.json
          format: uri
          readOnly: true
          type: string
        series:
          items:
            $ref: "#/components/schemas/RunTimeseriesPoint"
          type: array
        settings:
          $ref: "#/components/schemas/StatisticsSettings"
        stats:
          $ref: "#/components/schemas/RunStatistics"
      required:
        - settings
        - stats
        - series
      type: object
    GenerateRunnerCredentialsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/GenerateRunnerCredentialsResponse.json
          format: uri
          readOnly: true
          type: string
        credentials:
          $ref: "#/components/schemas/RunnerCredentials"
      required:
        - credentials
      type: object
    GetFeatureFlagResponseBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/GetFeatureFlagResponseBody.json
          format: uri
          readOnly: true
          type: string
        enabled:
          description: Whether the flag is enabled
          type: boolean
        key:
          description: The feature flag key
          type: string
        value:
          description: The flag value (type depends on value_type)
        value_type:
          description: The type of the value
          enum:
            - boolean
            - string
            - number
            - object
          type: string
      required:
        - key
        - enabled
        - value_type
        - value
      type: object
    Guest:
      additionalProperties: false
      properties:
        app:
          description: The name of the app this guest can access.
          type: string
        created_at:
          description: When the guest was created.
          format: date-time
          type: string
        id:
          description: The unique identifier for the guest.
          type: string
        name:
          description: Optional display name for the guest.
          type: string
      required:
        - id
        - app
        - created_at
      type: object
    InviteTeamMemberParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/InviteTeamMemberParams.json
          format: uri
          readOnly: true
          type: string
        emails:
          description: The email addresses of the people to invite. It can be a list in any format (comma separated, newline separated, etc.) and it will be parsed into individual addresses
          type: string
        message:
          description: Optional message to include in the invite email
          type: string
        role:
          default: developer
          description: The role to assign to the invitations
          enum:
            - admin
            - developer
          type:
            - string
            - "null"
      required:
        - emails
        - role
      type: object
    InviteTeamMemberResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/InviteTeamMemberResponse.json
          format: uri
          readOnly: true
          type: string
        team_invitations:
          description: The team invitation that you created
          items:
            $ref: "#/components/schemas/TeamInvitation"
          type: array
      required:
        - team_invitations
      type: object
    LeaveTeamResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/LeaveTeamResponse.json
          format: uri
          readOnly: true
          type: string
        team:
          $ref: "#/components/schemas/Team"
          description: The team that you just left
      required:
        - team
      type: object
    ListAPIKeysResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListAPIKeysResponse.json
          format: uri
          readOnly: true
          type: string
        api_keys:
          description: List of API keys
          items:
            $ref: "#/components/schemas/APIKey"
          type: array
        pages:
          $ref: "#/components/schemas/Pagination"
          description: Pagination information
      required:
        - api_keys
        - pages
      type: object
    ListAlertsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListAlertsResponse.json
          format: uri
          readOnly: true
          type: string
        alerts:
          description: List of alerts
          items:
            $ref: "#/components/schemas/Alert"
          type: array
        pages:
          $ref: "#/components/schemas/Pagination"
          description: Pagination information
      required:
        - alerts
        - pages
      type: object
    ListAppEnvironmentsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListAppEnvironmentsResponse.json
          format: uri
          readOnly: true
          type: string
        environments:
          items:
            type: string
          type: array
      required:
        - environments
      type: object
    ListAppVersionsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListAppVersionsResponse.json
          format: uri
          readOnly: true
          type: string
        versions:
          items:
            $ref: "#/components/schemas/AppVersion"
          type: array
      required:
        - versions
      type: object
    ListAppsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListAppsResponse.json
          format: uri
          readOnly: true
          type: string
        apps:
          items:
            $ref: "#/components/schemas/AppSummary"
          type: array
        pages:
          $ref: "#/components/schemas/Pagination"
      required:
        - apps
        - pages
      type: object
    ListCatalogFactsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListCatalogFactsResponse.json
          format: uri
          readOnly: true
          type: string
        facts:
          items:
            $ref: "#/components/schemas/CatalogFact"
          type: array
      required:
        - facts
      type: object
    ListCatalogsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListCatalogsResponse.json
          format: uri
          readOnly: true
          type: string
        catalogs:
          items:
            $ref: "#/components/schemas/Catalog"
          type: array
        pages:
          $ref: "#/components/schemas/Pagination"
      required:
        - pages
        - catalogs
      type: object
    ListEnvironmentsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListEnvironmentsResponse.json
          format: uri
          readOnly: true
          type: string
        environments:
          items:
            $ref: "#/components/schemas/Environment"
          type: array
        pages:
          $ref: "#/components/schemas/Pagination"
      required:
        - environments
        - pages
      type: object
    ListGuestsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListGuestsResponse.json
          format: uri
          readOnly: true
          type: string
        guests:
          description: List of guests.
          items:
            $ref: "#/components/schemas/Guest"
          type: array
      required:
        - guests
      type: object
    ListMyTeamInvitationsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListMyTeamInvitationsResponse.json
          format: uri
          readOnly: true
          type: string
        team_invitations:
          description: All of team invitations
          items:
            $ref: "#/components/schemas/TeamInvitation"
          type: array
      required:
        - team_invitations
      type: object
    ListRunnersResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListRunnersResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
          description: Pagination information
        runners:
          items:
            $ref: "#/components/schemas/Runner"
          type: array
      required:
        - runners
        - pages
      type: object
    ListRunsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListRunsResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
        runs:
          items:
            $ref: "#/components/schemas/Run"
          type: array
      required:
        - pages
        - runs
      type: object
    ListSchedulesResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListSchedulesResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
        schedules:
          items:
            $ref: "#/components/schemas/Schedule"
          type: array
      required:
        - schedules
        - pages
      type: object
    ListSecretEnvironmentsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListSecretEnvironmentsResponse.json
          format: uri
          readOnly: true
          type: string
        environments:
          items:
            type: string
          type: array
      required:
        - environments
      type: object
    ListSecretsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListSecretsResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
        secrets:
          items:
            $ref: "#/components/schemas/Secret"
          type: array
      required:
        - pages
        - secrets
      type: object
    ListServiceAccountAPIKeysResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListServiceAccountAPIKeysResponse.json
          format: uri
          readOnly: true
          type: string
        api_keys:
          items:
            $ref: "#/components/schemas/APIKey"
          type: array
        pages:
          $ref: "#/components/schemas/Pagination"
      required:
        - api_keys
        - pages
      type: object
    ListServiceAccountsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListServiceAccountsResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
        service_accounts:
          items:
            $ref: "#/components/schemas/ServiceAccount"
          type: array
      required:
        - service_accounts
        - pages
      type: object
    ListTeamInvitationsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListTeamInvitationsResponse.json
          format: uri
          readOnly: true
          type: string
        team_invitations:
          description: All of team invitations
          items:
            $ref: "#/components/schemas/TeamInvitation"
          type: array
      required:
        - team_invitations
      type: object
    ListTeamMembersResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListTeamMembersResponse.json
          format: uri
          readOnly: true
          type: string
        team_members:
          description: All of the members of a team
          items:
            $ref: "#/components/schemas/TeamMembership"
          type: array
      required:
        - team_members
      type: object
    ListTeamsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListTeamsResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
          description: Pagination information
        teams:
          description: List of teams
          items:
            $ref: "#/components/schemas/Team"
          type: array
      required:
        - teams
        - pages
      type: object
    ListWebhooksResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ListWebhooksResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
        webhooks:
          items:
            $ref: "#/components/schemas/Webhook"
          type: array
      required:
        - webhooks
        - pages
      type: object
    Organization:
      additionalProperties: false
      properties:
        name:
          description: The name of the organization
          type: string
        owner:
          $ref: "#/components/schemas/User"
          description: The user of the organization owner
      required:
        - name
        - owner
      type: object
    OrganizationUsage:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/OrganizationUsage.json
          format: uri
          readOnly: true
          type: string
        active_schedules:
          $ref: "#/components/schemas/UsageLimit"
          description: Number of active schedules in the organization.
        apps:
          $ref: "#/components/schemas/UsageLimit"
          description: Number of applications in the organization.
        base_plan_name:
          description: The name of the organization's base plan.
          type: string
        compute_minutes:
          $ref: "#/components/schemas/UsageLimit"
          description: Number of compute minutes used in the current billing cycle.
        members:
          $ref: "#/components/schemas/UsageLimit"
          description: Number of users in the organization.
        organization_name:
          description: The name of the organization.
          type: string
        self_hosted_runners:
          $ref: "#/components/schemas/UsageLimit"
          description: Whether the organization has the ability to use self-hosted runners.
      required:
        - organization_name
        - base_plan_name
        - members
        - apps
        - active_schedules
        - compute_minutes
        - self_hosted_runners
      type: object
    Pagination:
      additionalProperties: false
      properties:
        num_pages:
          format: int64
          type: integer
        page:
          format: int64
          type: integer
        page_size:
          format: int64
          type: integer
        total:
          format: int64
          type: integer
      required:
        - page
        - total
        - num_pages
        - page_size
      type: object
    Parameter:
      additionalProperties: false
      properties:
        default:
          type: string
        description:
          type: string
        hidden:
          default: false
          description: Whether this parameter is hidden/secret. Defaults to false.
          type: boolean
        name:
          type: string
      required:
        - name
        - default
        - description
      type: object
    Plan:
      additionalProperties: false
      properties:
        base_plan_name:
          type: string
        created_at:
          format: date-time
          type: string
        end_at:
          format: date-time
          type: string
        extras:
          items:
            $ref: "#/components/schemas/Feature"
          type: array
        features:
          items:
            $ref: "#/components/schemas/Feature"
          type: array
        id:
          type: string
        start_at:
          format: date-time
          type: string
      required:
        - id
        - base_plan_name
        - start_at
        - created_at
        - features
      type: object
    RefreshSessionParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RefreshSessionParams.json
          format: uri
          readOnly: true
          type: string
        refresh_token:
          description: The refresh token associated with the session to refresh.
          type: string
      type: object
    RefreshSessionResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RefreshSessionResponse.json
          format: uri
          readOnly: true
          type: string
        refreshed_at:
          description: A timestamp that indicates the last time the session data was refreshed.
          format: date-time
          type: string
        session:
          $ref: "#/components/schemas/Session"
          description: Refresh the current session and return the updated session information.
      required:
        - refreshed_at
        - session
      type: object
    RegenerateGuestLoginURLParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RegenerateGuestLoginURLParams.json
          format: uri
          readOnly: true
          type: string
        expires_in:
          default: 259200
          description: The number of seconds the guest session should last. Defaults to 72 hours.
          format: int64
          type: integer
        redirect_url:
          description: Where to redirect the guest after they log in.
          type: string
      type: object
    RegenerateGuestLoginURLResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RegenerateGuestLoginURLResponse.json
          format: uri
          readOnly: true
          type: string
        login_url:
          description: The new login URL to share with the guest.
          type: string
        login_url_expires_at:
          description: When the login URL expires.
          format: date-time
          type: string
      required:
        - login_url
        - login_url_expires_at
      type: object
    RemoveTeamMemberParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RemoveTeamMemberParams.json
          format: uri
          readOnly: true
          type: string
        email:
          description: The email address of the team member to remove
          type: string
      required:
        - email
      type: object
    RemoveTeamMemberResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RemoveTeamMemberResponse.json
          format: uri
          readOnly: true
          type: string
        team_member:
          $ref: "#/components/schemas/User"
          description: The team member that was just removed
      required:
        - team_member
      type: object
    ResendTeamInvitationParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ResendTeamInvitationParams.json
          format: uri
          readOnly: true
          type: string
        email:
          description: The email address of team invitation to resend
          type: string
        message:
          description: Optional message to include in the invite email
          type: string
      required:
        - email
      type: object
    ResendTeamInvitationResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/ResendTeamInvitationResponse.json
          format: uri
          readOnly: true
          type: string
        team_invitation:
          $ref: "#/components/schemas/TeamInvitation"
          description: The team invitations that were resent
      required:
        - team_invitation
      type: object
    Run:
      additionalProperties: false
      properties:
        $link:
          deprecated: true
          description: $link is deprecated. Individual responses include links.
          type: string
        app_name:
          type: string
        app_slug:
          deprecated: true
          description: This property is deprecated. Use app_name instead.
          type: string
        app_version:
          type: string
        attempts:
          description: Previous attempt details. Populated on describe, omitted on list.
          items:
            $ref: "#/components/schemas/RunAttempt"
          type: array
        cancelled_at:
          format: date-time
          type:
            - string
            - "null"
        created_at:
          format: date-time
          type: string
        created_by:
          $ref: "#/components/schemas/RunCreator"
          description: The principal that created this run. Null on legacy rows that predate principal tracking.
        ended_at:
          format: date-time
          type:
            - string
            - "null"
        environment:
          type: string
        exit_code:
          description: Exit code of the run, if the run is completed. Null if there is no exit code
          format: int64
          type:
            - integer
            - "null"
        hostname:
          deprecated: true
          description: hostname is deprecated, use subdomain
          type: string
        initiator:
          $ref: "#/components/schemas/RunInitiator"
          description: Run initiator information
        is_scheduled:
          description: Whether this run was triggered by a schedule (true) or on-demand (false). Historical records default to false.
          type: boolean
        num_attempts:
          description: Number of attempts for this run (1 = original, 2+ = retries).
          format: int64
          type: integer
        number:
          format: int64
          type: integer
        parameters:
          description: Parameters used to invoke this run.
          items:
            $ref: "#/components/schemas/RunParameter"
          type: array
        retry_policy:
          $ref: "#/components/schemas/RunRetryPolicy"
          description: Retry policy configured for this run.
        run_id:
          type: string
        scheduled_at:
          format: date-time
          type: string
        started_at:
          description: When the run started executing your code.
          format: date-time
          type:
            - string
            - "null"
        starting_at:
          description: When the runner environment started to get setup.
          format: date-time
          type:
            - string
            - "null"
        status:
          enum:
            - scheduled
            - retrying
            - pending
            - starting
            - running
            - crashed
            - errored
            - exited
            - cancelled
          type: string
        status_group:
          enum:
            - successful
            - failed
            - ""
          type: string
        subdomain:
          description: If app is externally accessible, then you can access this run with this hostname.
          type:
            - string
            - "null"
      required:
        - run_id
        - number
        - app_name
        - status
        - status_group
        - is_scheduled
        - parameters
        - environment
        - exit_code
        - created_at
        - scheduled_at
        - cancelled_at
        - starting_at
        - started_at
        - ended_at
        - app_version
        - initiator
        - num_attempts
        - $link
      type: object
    RunAndLinks:
      additionalProperties: false
      properties:
        $links:
          $ref: "#/components/schemas/RunLinks"
        run:
          $ref: "#/components/schemas/Run"
      required:
        - run
        - $links
      type: object
    RunAppInitiatorData:
      additionalProperties: false
      properties:
        type:
          description: The type of the initiator for this run.
          enum:
            - tower_run
            - tower_cli
            - tower_ui
          type: string
      required:
        - type
      type: object
    RunAppParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RunAppParams.json
          format: uri
          readOnly: true
          type: string
        environment:
          description: The environment to run this app in.
          type: string
        initiator:
          $ref: "#/components/schemas/RunAppInitiatorData"
          description: Initiator information for this run
        parameters:
          additionalProperties:
            type: string
          description: The parameters to pass into this app.
          type: object
        parent_run_id:
          description: The ID of the run that invoked this run, if relevant. Should be null, if none.
          type:
            - string
            - "null"
        retry_policy:
          $ref: "#/components/schemas/RunRetryPolicy"
          description: Override the retry policy for this specific run. If not provided, inherits from the app's retry policy.
      required:
        - environment
        - parameters
      type: object
    RunAppResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/RunAppResponse.json
          format: uri
          readOnly: true
          type: string
        run:
          $ref: "#/components/schemas/Run"
      required:
        - run
      type: object
    RunAttempt:
      additionalProperties: false
      properties:
        ended_at:
          description: When this attempt ended.
          format: date-time
          type:
            - string
            - "null"
        exit_code:
          description: Exit code for this attempt.
          format: int64
          type:
            - integer
            - "null"
        seq:
          description: 1-based attempt number.
          format: int64
          type: integer
        started_at:
          description: When the run started executing your code.
          format: date-time
          type:
            - string
            - "null"
        starting_at:
          description: When the runner environment started to get setup.
          format: date-time
          type:
            - string
            - "null"
        status:
          description: Terminal status of this attempt.
          type: string
      required:
        - seq
        - status
        - starting_at
        - started_at
        - ended_at
        - exit_code
      type: object
    RunCreator:
      additionalProperties: false
      properties:
        name:
          description: "The creator's name: a user's full name (or email) or a service account's name."
          readOnly: true
          type: string
        type:
          description: The kind of principal that created the run.
          enum:
            - user
            - service_account
          type: string
      required:
        - type
        - name
      type: object
    RunFailureAlert:
      additionalProperties: false
      properties:
        app:
          $ref: "#/components/schemas/App"
          description: App that the failed Run belongs to
        environment:
          description: Environment this run was in
          type: string
        run:
          $ref: "#/components/schemas/Run"
          description: Run that failed
      required:
        - run
        - app
        - environment
      type: object
    RunGraphNode:
      additionalProperties: false
      properties:
        id:
          $ref: "#/components/schemas/RunGraphRunID"
        parent_id:
          $ref: "#/components/schemas/RunGraphRunID"
      required:
        - id
        - parent_id
      type: object
    RunGraphRunID:
      additionalProperties: false
      properties:
        app_name:
          type: string
        number:
          format: int64
          type: integer
      required:
        - app_name
        - number
      type: object
    RunInitiator:
      additionalProperties: false
      properties:
        details:
          description: Additional information about the initiator of a run.
          oneOf:
            - $ref: "#/components/schemas/ScheduleRunInitiatorDetails"
            - $ref: "#/components/schemas/RunRunInitiatorDetails"
          type: object
        type:
          description: The type of initiator for this run. Null if none or unknown.
          type:
            - string
            - "null"
      required:
        - type
        - details
      type: object
    RunLinks:
      additionalProperties: false
      properties:
        next_number:
          description: The number of the next run, if any.
          format: int64
          type:
            - integer
            - "null"
        prev_number:
          description: The number of the previous run, if any.
          format: int64
          type:
            - integer
            - "null"
      required:
        - next_number
        - prev_number
      type: object
    RunLogLine:
      additionalProperties: false
      properties:
        attempt_seq:
          description: The attempt number this log line belongs to (1-based). Attempt 1 is the original execution; 2+ are retries.
          format: int64
          type: integer
        channel:
          description: The channel this log line belongs to.
          enum:
            - program
            - setup
          type: string
        content:
          description: Contents of the log message.
          type: string
        line_num:
          description: Line number.
          format: int64
          type: integer
        message:
          deprecated: true
          description: This property is deprecated. Use content instead.
          type: string
        reported_at:
          description: Timestamp of the log line.
          format: date-time
          type: string
        run_id:
          description: The uuid of the Run.
          type: string
        timestamp:
          deprecated: true
          description: This property is deprecated. Use reported_at instead.
          format: date-time
          type: string
      required:
        - run_id
        - channel
        - reported_at
        - line_num
        - content
        - attempt_seq
      type: object
    RunParameter:
      additionalProperties: false
      properties:
        hidden:
          default: false
          description: Whether this parameter is hidden/secret. Defaults to false.
          type: boolean
        is_override:
          description: Whether this parameter's value was supplied as an override at run/schedule creation time (true) or comes from the app version's default (false).
          type:
            - boolean
            - "null"
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      type: object
    RunResults:
      additionalProperties: false
      properties:
        cancelled:
          format: int64
          type: integer
        crashed:
          format: int64
          type: integer
        errored:
          format: int64
          type: integer
        exited:
          format: int64
          type: integer
        pending:
          format: int64
          type: integer
        retrying:
          format: int64
          type: integer
        running:
          format: int64
          type: integer
        starting:
          format: int64
          type: integer
      required:
        - pending
        - starting
        - running
        - exited
        - errored
        - crashed
        - cancelled
        - retrying
      type: object
    RunRetryPolicy:
      additionalProperties: false
      properties:
        max_retries:
          format: int64
          type: integer
        retry_delay_seconds:
          format: int64
          type: integer
        use_exponential_backoff:
          type: boolean
      required:
        - max_retries
        - retry_delay_seconds
        - use_exponential_backoff
      type: object
    RunRunInitiatorDetails:
      additionalProperties: false
      properties:
        run_app_name:
          description: The name of the app that initiated this run, if type is 'tower_run'
          type: string
        run_number:
          description: The number of the run that initaited this run, if type is 'tower_run'
          format: int64
          type: integer
      type: object
    RunStatistics:
      additionalProperties: false
      properties:
        cancelled_runs:
          format: int64
          type: integer
        crashed_runs:
          format: int64
          type: integer
        errored_runs:
          format: int64
          type: integer
        exited_runs:
          format: int64
          type: integer
        running_runs:
          format: int64
          type: integer
        total_runs:
          format: int64
          type: integer
      required:
        - running_runs
        - exited_runs
        - errored_runs
        - crashed_runs
        - cancelled_runs
        - total_runs
      type: object
    RunTimeseriesPoint:
      additionalProperties: false
      properties:
        cancelled:
          format: int64
          type: integer
        crashed:
          format: int64
          type: integer
        errored:
          format: int64
          type: integer
        exited:
          format: int64
          type: integer
        pending:
          format: int64
          type: integer
        period:
          description: The period of the timeseries point, typically the start of the period.
          format: date-time
          type: string
        retrying:
          format: int64
          type: integer
        running:
          format: int64
          type: integer
        scheduled:
          format: int64
          type: integer
        starting:
          format: int64
          type: integer
      required:
        - period
        - scheduled
        - retrying
        - pending
        - starting
        - running
        - exited
        - errored
        - crashed
        - cancelled
      type: object
    Runner:
      additionalProperties: false
      properties:
        active_runs:
          items:
            $ref: "#/components/schemas/Run"
          type: array
        created_at:
          type: string
        id:
          type: string
        last_health_check_at:
          type: string
        max_concurrent_apps:
          format: int64
          type: integer
        name:
          description: Optional human-readable name for the runner
          type: string
        num_runs:
          format: int64
          type: integer
        status:
          type: string
      required:
        - id
        - status
        - created_at
        - max_concurrent_apps
        - active_runs
        - num_runs
      type: object
    RunnerCredentials:
      additionalProperties: false
      properties:
        certificate:
          description: The signed certificate used by the runner to authenticate itself to Tower.
          type: string
        private_key:
          description: The private key used by the runner to authenticate itself to Tower.
          type: string
        root_ca:
          description: The PEM encoded root CA certificate that is used to verify the runner's certificate when Tower is responsible for signing server certs.
          type:
            - string
            - "null"
        runner_service_url:
          description: The host of the runner service that this runner will connect to. This is typically the Tower service host.
          type: string
      required:
        - runner_service_url
        - root_ca
        - private_key
        - certificate
      type: object
    SSEWarning:
      additionalProperties: false
      properties:
        content:
          description: Contents of the warning.
          type: string
        end_of_stream:
          description: When true, the server has delivered every log line and is closing the stream; clients should stop and not reconnect.
          type: boolean
        reported_at:
          description: Timestamp of the event.
          format: date-time
          type: string
      required:
        - reported_at
        - content
      type: object
    Schedule:
      additionalProperties: false
      properties:
        app_name:
          description: The name of the app that will be executed
          type: string
        app_status:
          description: The status of the app
          enum:
            - active
            - disabled
          type: string
        app_version:
          deprecated: true
          description: This property is deprecated. Schedules inherit the version from their environment. This field returns the environment's current version.
          type: string
        created_at:
          description: The timestamp when the schedule was created
          format: date-time
          type: string
        cron:
          description: The cron expression defining when the app should run
          type: string
        environment:
          description: The environment to run the app in
          type: string
        id:
          description: The unique identifier for the schedule
          type: string
        name:
          description: The name of this schedule
          type: string
        overlap_policy:
          description: The policy for handling overlapping runs
          enum:
            - allow
            - skip
          type: string
        owner:
          $ref: "#/components/schemas/ScheduleOwner"
          description: The schedule's runtime owner — the user or service account whose identity its scheduled runs execute under.
        parameters:
          description: The parameters to pass when running the app
          items:
            $ref: "#/components/schemas/RunParameter"
          type: array
        status:
          description: The status of the schedule
          enum:
            - active
            - disabled
          type: string
        timezone:
          description: The IANA timezone identifier that the cron expression is evaluated in (e.g., 'America/New_York', 'Europe/London'). Defaults to 'UTC'.
          type: string
        updated_at:
          description: The timestamp when the schedule was last updated
          format: date-time
          type: string
      required:
        - id
        - name
        - cron
        - timezone
        - environment
        - app_name
        - app_status
        - status
        - overlap_policy
        - created_at
        - updated_at
      type: object
    ScheduleOwner:
      additionalProperties: false
      properties:
        name:
          description: "The owner's name: a user's full name (first + last) or a service account's name. Must identify exactly one member of the account."
          minLength: 1
          type: string
        type:
          description: "The kind of owner: 'user' or 'service_account'"
          enum:
            - user
            - service_account
          type: string
      required:
        - type
        - name
      type: object
    ScheduleRunInitiatorDetails:
      additionalProperties: false
      properties:
        schedule_name:
          description: The name of the schedule that initiated this run, if type is 'tower_schedule'
          type: string
      type: object
    SearchRunsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/SearchRunsResponse.json
          format: uri
          readOnly: true
          type: string
        pages:
          $ref: "#/components/schemas/Pagination"
        runs:
          items:
            $ref: "#/components/schemas/Run"
          type: array
      required:
        - pages
        - runs
      type: object
    Secret:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        environment:
          type: string
        name:
          type: string
        preview:
          type: string
      required:
        - name
        - environment
        - preview
        - created_at
      type: object
    ServiceAccount:
      additionalProperties: false
      properties:
        created_at:
          description: When the service account was created.
          format: date-time
          type: string
        creator:
          $ref: "#/components/schemas/ServiceAccountCreator"
          description: The user who created this service account.
        id:
          description: The unique identifier for the service account.
          type: string
        metadata:
          description: Customer-supplied JSON metadata associated with the service account.
        name:
          description: The human-readable name of the service account.
          type: string
        role:
          description: The team role this service account acts as.
          enum:
            - admin
            - developer
          type: string
        updated_at:
          description: When the service account was last updated.
          format: date-time
          type: string
      required:
        - id
        - name
        - role
        - created_at
        - updated_at
      type: object
    ServiceAccountCreator:
      additionalProperties: false
      properties:
        name:
          description: "The creator's name: a user's full name (or email) or a service account's name."
          readOnly: true
          type: string
        type:
          description: The kind of principal that created the service account. Always 'user'.
          enum:
            - user
            - service_account
          type: string
      required:
        - type
        - name
      type: object
    Session:
      additionalProperties: false
      properties:
        featurebase_identity:
          $ref: "#/components/schemas/FeaturebaseIdentity"
          deprecated: true
          description: This property is deprecated. It will be removed in a future version.
        teams:
          items:
            $ref: "#/components/schemas/Team"
          type: array
        token:
          $ref: "#/components/schemas/Token"
        user:
          $ref: "#/components/schemas/User"
      required:
        - user
        - token
        - teams
        - featurebase_identity
      type: object
    ShoulderTap:
      additionalProperties: false
      properties:
        account_id:
          description: Account ID that owns the resource.
          type: string
        event_type:
          description: Event type in format resource.changed (e.g., apps.changed, runs.changed).
          type: string
        resource_id:
          description: Unique identifier of the resource.
          type: string
        resource_type:
          description: Type of resource (apps, runs, schedules, secrets, environments, catalogs).
          type: string
        timestamp:
          description: Timestamp when the event occurred.
          format: date-time
          type: string
      required:
        - event_type
        - resource_type
        - resource_id
        - timestamp
        - account_id
      type: object
    StatisticsSettings:
      additionalProperties: false
      properties:
        end_at:
          description: The end time for the statistics period.
          format: date-time
          type: string
        environment:
          description: The environment to get statistics for.
          type: string
        interval:
          description: The interval for the statistics period.
          enum:
            - daily
            - hourly
          type: string
        start_at:
          description: The start time for the statistics period.
          format: date-time
          type: string
        timezone:
          description: The time zone for the statistics period.
          type: string
      required:
        - interval
        - timezone
        - start_at
        - end_at
        - environment
      type: object
    TagFilter:
      additionalProperties: false
      properties:
        name:
          description: The tag name to search.
          type: string
        op:
          enum:
            - eq
            - in
            - notIn
          type: string
        value:
          description: Required if operator is eq
          type: string
        values:
          description: Required if operator is in or notIn
          items:
            type: string
          type: array
      required:
        - op
        - name
      type: object
    Team:
      additionalProperties: false
      properties:
        execution_region:
          type: string
        name:
          type: string
        organization:
          description: The name of the organization this team belongs to.
          type: string
        slug:
          deprecated: true
          description: This property is deprecated. Use name instead.
          type: string
        token:
          $ref: "#/components/schemas/Token"
        type:
          description: The type of team, either 'personal' or 'team'.
          type: string
      required:
        - name
        - type
        - organization
        - execution_region
      type: object
    TeamInvitation:
      additionalProperties: false
      properties:
        email:
          type: string
        invitation_sent_at:
          format: date-time
          type: string
        role:
          type: string
        team:
          $ref: "#/components/schemas/Team"
      required:
        - team
        - email
        - invitation_sent_at
        - role
      type: object
    TeamMembership:
      additionalProperties: false
      properties:
        role:
          enum:
            - admin
            - developer
          type: string
        team:
          $ref: "#/components/schemas/Team"
        user:
          $ref: "#/components/schemas/User"
      required:
        - team
        - user
        - role
      type: object
    TestWebhookResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/TestWebhookResponse.json
          format: uri
          readOnly: true
          type: string
        webhook:
          $ref: "#/components/schemas/Webhook"
      required:
        - webhook
      type: object
    Token:
      additionalProperties: false
      properties:
        access_token:
          description: The access token to use when authenticating API requests with Tower.
          type: string
        jwt:
          deprecated: true
          description: This property is deprecated. Use access_token instead.
          type: string
        refresh_token:
          description: The refresh token to use when refreshing an expired access token. For security reasons, refresh tokens should only be transmitted over secure channels and never logged or stored in plaintext. It will only be returned upon initial authentication or when explicitly refreshing the access token.
          type: string
      required:
        - access_token
        - jwt
      type: object
    UpdateAccountParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateAccountParams.json
          format: uri
          readOnly: true
          type: string
        execution_region:
          description: The execution region for runs
          enum:
            - eu-central-1
            - us-east-1
            - us-west-2
            - eu-west-1
          type: string
        is_self_hosted_only:
          description: Whether the account is for self-hosted use only
          type: boolean
        name:
          description: The new name for the account, if any
          type: string
      type: object
    UpdateAccountResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateAccountResponse.json
          format: uri
          readOnly: true
          type: string
        account:
          $ref: "#/components/schemas/Account"
      required:
        - account
      type: object
    UpdateAppEnvironmentParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateAppEnvironmentParams.json
          format: uri
          readOnly: true
          type: string
        version:
          description: The version to deploy to this environment, e.g. 'v1', 'v2'.
          minLength: 2
          type: string
      required:
        - version
      type: object
    UpdateAppEnvironmentResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateAppEnvironmentResponse.json
          format: uri
          readOnly: true
          type: string
        environment:
          type: string
        version:
          type: string
      required:
        - environment
        - version
      type: object
    UpdateAppParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateAppParams.json
          format: uri
          readOnly: true
          type: string
        description:
          deprecated: true
          description: "Deprecated: use short_description instead."
          type:
            - string
            - "null"
        is_externally_accessible:
          description: Indicates that web traffic should be routed to this app and that its runs should get a hostname assigned to it.
          type:
            - boolean
            - "null"
        pending_timeout:
          description: The amount of time in seconds that runs of this app can stay in pending state before being marked as failed.
          format: int64
          type:
            - integer
            - "null"
        retry_policy:
          $ref: "#/components/schemas/RunRetryPolicy"
          description: The retry policy for failed runs of this app. Defines different retry behavior for infrastructure (errored) vs application (crashed) failures.
        running_timeout:
          description: The amount of time in seconds that runs of this app can stay in running state before being marked as failed.
          format: int64
          type:
            - integer
            - "null"
        short_description:
          description: New description for the app.
          type:
            - string
            - "null"
        status:
          description: New status for the App
          type:
            - string
            - "null"
        subdomain:
          description: The subdomain this app is accessible under. Requires is_externally_accessible to be true.
          type:
            - string
            - "null"
        tags:
          description: The tags for this app.
          items:
            $ref: "#/components/schemas/AppTag"
          type: array
      type: object
    UpdateAppResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateAppResponse.json
          format: uri
          readOnly: true
          type: string
        App:
          $ref: "#/components/schemas/App"
          deprecated: true
          description: Deprecated field. Use 'app' instead.
        app:
          $ref: "#/components/schemas/App"
      required:
        - app
        - App
      type: object
    UpdateCatalogFactBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateCatalogFactBody.json
          format: uri
          readOnly: true
          type: string
        body:
          description: Optional structured payload (SQL, unit, enum values) as a JSON string.
          type: string
        confidence:
          description: How trustworthy the fact is.
          enum:
            - confirmed
            - heuristic
            - inferred
          type: string
        object:
          description: Descriptive path to what the fact is about, e.g. "bronze.runs.deleted_at". Empty for catalog-scoped facts.
          type: string
        scope:
          description: What kind of object the fact is about.
          enum:
            - catalog
            - namespace
            - table
            - column
            - metric
          type: string
        source:
          description: Where the fact came from (agent id, user, ...).
          type: string
        statement:
          description: The human-readable meaning of the fact.
          type: string
      required:
        - scope
        - statement
        - confidence
      type: object
    UpdateCatalogFactResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateCatalogFactResponse.json
          format: uri
          readOnly: true
          type: string
        fact:
          $ref: "#/components/schemas/CatalogFact"
      required:
        - fact
      type: object
    UpdateCatalogParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateCatalogParams.json
          format: uri
          readOnly: true
          type: string
        environment:
          description: New environment for the catalog
          type: string
        properties:
          items:
            $ref: "#/components/schemas/EncryptedCatalogProperty"
          type: array
      required:
        - environment
        - properties
      type: object
    UpdateCatalogResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateCatalogResponse.json
          format: uri
          readOnly: true
          type: string
        catalog:
          $ref: "#/components/schemas/Catalog"
      required:
        - catalog
      type: object
    UpdateEmailPreferencesBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateEmailPreferencesBody.json
          format: uri
          readOnly: true
          type: string
        subscriptions:
          $ref: "#/components/schemas/EmailSubscriptions"
      required:
        - subscriptions
      type: object
    UpdateEnvironmentParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateEnvironmentParams.json
          format: uri
          readOnly: true
          type: string
        new_name:
          description: The desired new name of the environment
          type: string
      required:
        - new_name
      type: object
    UpdateEnvironmentResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateEnvironmentResponse.json
          format: uri
          readOnly: true
          type: string
        environment:
          $ref: "#/components/schemas/Environment"
      required:
        - environment
      type: object
    UpdateMyTeamInvitationParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateMyTeamInvitationParams.json
          format: uri
          readOnly: true
          type: string
        accepted:
          description: Whether or not the invitation was accepted. If false, it's considered rejected.
          type: boolean
        name:
          description: The name of the team invitation to update
          type: string
      required:
        - name
        - accepted
      type: object
    UpdateMyTeamInvitationResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateMyTeamInvitationResponse.json
          format: uri
          readOnly: true
          type: string
      type: object
    UpdateOrganizationParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateOrganizationParams.json
          format: uri
          readOnly: true
          type: string
        name:
          description: The name of the organization to update. This is optional, if you supply null it will not update the organization name.
          type: string
      type: object
    UpdateOrganizationResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateOrganizationResponse.json
          format: uri
          readOnly: true
          type: string
        organization:
          $ref: "#/components/schemas/Organization"
          description: The organization that was just updated
      required:
        - organization
      type: object
    UpdatePlanParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdatePlanParams.json
          format: uri
          readOnly: true
          type: string
        base_plan_name:
          description: The name of the base plan to use.
          type: string
      required:
        - base_plan_name
      type: object
    UpdatePlanResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdatePlanResponse.json
          format: uri
          readOnly: true
          type: string
        plan:
          $ref: "#/components/schemas/Plan"
      required:
        - plan
      type: object
    UpdateScheduleParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateScheduleParams.json
          format: uri
          readOnly: true
          type: string
        app_version:
          deprecated: true
          description: This property is deprecated and ignored. Schedules inherit the version from their environment.
          type:
            - string
            - "null"
        cron:
          description: The cron expression defining when the app should run
          type: string
        environment:
          default: default
          description: The environment to run the app in
          type: string
        name:
          description: The name for this schedule. Must be unique per environment.
          type:
            - string
            - "null"
        overlap_policy:
          description: The overlap policy for the schedule
          enum:
            - skip
            - allow
          type:
            - string
            - "null"
        owner:
          $ref: "#/components/schemas/ScheduleOwner"
          description: Reassign the schedule's runtime owner. Requires team admin scope. Setting this field does NOT change the schedule's status — disabled schedules must be re-activated separately.
        parameters:
          description: Parameters to pass when running the app
          items:
            $ref: "#/components/schemas/RunParameter"
          type: array
        status:
          description: The status of the schedule
          enum:
            - active
            - disabled
          type:
            - string
            - "null"
        timezone:
          description: The IANA timezone identifier that the cron expression should be evaluated in (e.g., 'America/New_York', 'Europe/London').
          type:
            - string
            - "null"
      type: object
    UpdateScheduleResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateScheduleResponse.json
          format: uri
          readOnly: true
          type: string
        schedule:
          $ref: "#/components/schemas/Schedule"
      required:
        - schedule
      type: object
    UpdateSecretParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateSecretParams.json
          format: uri
          readOnly: true
          type: string
        encrypted_value:
          type: string
        environment:
          type: string
        preview:
          type: string
      required:
        - environment
        - encrypted_value
        - preview
      type: object
    UpdateSecretResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateSecretResponse.json
          format: uri
          readOnly: true
          type: string
        secret:
          $ref: "#/components/schemas/Secret"
      required:
        - secret
      type: object
    UpdateServiceAccountParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateServiceAccountParams.json
          format: uri
          readOnly: true
          type: string
        metadata:
          description: Replacement JSON metadata for the service account.
          type: string
        name:
          description: The new human-readable name for the service account.
          type: string
        role:
          description: The new team role this service account acts as.
          enum:
            - admin
            - developer
          type: string
      type: object
    UpdateServiceAccountResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateServiceAccountResponse.json
          format: uri
          readOnly: true
          type: string
        service_account:
          $ref: "#/components/schemas/ServiceAccount"
      required:
        - service_account
      type: object
    UpdateTeamMemberParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateTeamMemberParams.json
          format: uri
          readOnly: true
          type: string
        email:
          description: The email address of the team member to update
          type: string
        role:
          description: The role to update the team member to
          enum:
            - admin
            - developer
          type:
            - string
            - "null"
      required:
        - email
      type: object
    UpdateTeamMemberResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateTeamMemberResponse.json
          format: uri
          readOnly: true
          type: string
        team_member:
          $ref: "#/components/schemas/TeamMembership"
          description: The team member that was updated
      required:
        - team_member
      type: object
    UpdateTeamParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateTeamParams.json
          format: uri
          readOnly: true
          type: string
        execution_region:
          description: The execution region for runs
          enum:
            - eu-central-1
            - us-east-1
            - us-west-2
            - eu-west-1
          type: string
        name:
          description: The name of the team to update. This is optional, if you supply null it will not update the team name.
          type:
            - string
            - "null"
      required:
        - name
      type: object
    UpdateTeamResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateTeamResponse.json
          format: uri
          readOnly: true
          type: string
        team:
          $ref: "#/components/schemas/Team"
          description: The team that was just created
      required:
        - team
      type: object
    UpdateUserParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateUserParams.json
          format: uri
          readOnly: true
          type: string
        company:
          type:
            - string
            - "null"
        country:
          type:
            - string
            - "null"
        first_name:
          type:
            - string
            - "null"
        is_alerts_enabled:
          type:
            - boolean
            - "null"
        is_subscribed_to_changelog:
          description: If true, the user will receive changelog updates via email.
          type:
            - boolean
            - "null"
        is_subscribed_to_marketing_emails:
          description: If true, the user will receive marketing emails from Tower.
          type:
            - boolean
            - "null"
        is_subscribed_to_newsletter:
          description: If true, the user will receive the Tower newsletter.
          type:
            - boolean
            - "null"
        last_name:
          type:
            - string
            - "null"
        password:
          type:
            - string
            - "null"
        promo_code:
          type:
            - string
            - "null"
      type: object
    UpdateUserResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateUserResponse.json
          format: uri
          readOnly: true
          type: string
        user:
          $ref: "#/components/schemas/User"
      required:
        - user
      type: object
    UpdateWebhookParams:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateWebhookParams.json
          format: uri
          readOnly: true
          type: string
        name:
          description: The new name of the webhook.
          type: string
      required:
        - name
      type: object
    UpdateWebhookResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/UpdateWebhookResponse.json
          format: uri
          readOnly: true
          type: string
        webhook:
          $ref: "#/components/schemas/Webhook"
      required:
        - webhook
      type: object
    UsageLimit:
      additionalProperties: false
      properties:
        limit:
          description: "For numeric quotas: the maximum number of units allowed (-1 means unlimited). For boolean entitlements (e.g. self_hosted_runners): 0 = disabled, 1 = enabled."
          format: int64
          type: integer
        used:
          description: The number of units used for this resource.
          format: int64
          type: integer
      required:
        - used
        - limit
      type: object
    UsageMetricTimeSeriesPoint:
      additionalProperties: false
      properties:
        date:
          format: date-time
          type: string
        name:
          enum:
            - run_seconds
          type: string
        value:
          format: int64
          type: integer
      required:
        - date
        - value
        - name
      type: object
    User:
      additionalProperties: false
      properties:
        company:
          type: string
        country:
          type: string
        created_at:
          format: date-time
          type: string
        email:
          type: string
        first_name:
          type: string
        is_alerts_enabled:
          type: boolean
        is_confirmed:
          type: boolean
        is_invitation_claimed:
          deprecated: true
          description: This property is deprecated. It will be removed in a future version.
          type: boolean
        is_subscribed_to_changelog:
          type: boolean
        last_name:
          type: string
        profile_photo_url:
          type: string
        promo_code:
          type: string
      required:
        - first_name
        - last_name
        - company
        - country
        - promo_code
        - email
        - profile_photo_url
        - created_at
        - is_alerts_enabled
        - is_confirmed
        - is_subscribed_to_changelog
      type: object
    VendCatalogCredentialsBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/VendCatalogCredentialsBody.json
          format: uri
          readOnly: true
          type: string
        mode:
          default: read
          description: Access level for the vended token. "read" (default) binds the token to the catalog's read-only principal; "read-write" requires the catalogs:data:write scope and binds it to the read-write principal.
          enum:
            - read
            - read-write
          type: string
      type: object
    VendCatalogCredentialsResponse:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.tower.dev/v1/schemas/VendCatalogCredentialsResponse.json
          format: uri
          readOnly: true
          type: string
        credentials:
          $ref: "#/components/schemas/CatalogCredentials"
      required:
        - credentials
      type: object
    Webhook:
      additionalProperties: false
      properties:
        account_id:
          contentEncoding: base64
          type: string
        created_at:
          format: date-time
          type: string
        created_by_id:
          contentEncoding: base64
          type: string
        deleted_at:
          format: date-time
          type: string
        last_checked_at:
          format: date-time
          type:
            - string
            - "null"
        name:
          type: string
        state:
          enum:
            - healthy
            - unhealthy
            - unknown
          type: string
        url:
          type: string
      required:
        - name
        - url
        - created_at
        - created_by_id
        - account_id
        - state
        - last_checked_at
      type: object
  securitySchemes:
    APIKeyAuth:
      description: API key created by a Tower user or Tower service account to authenticate an API request.
      in: header
      name: X-API-Key
      type: apiKey
    AccessTokenAuth:
      description: Access token authentication scheme which uses an access token provided by the Tower API as part of a Tower session (see documentation about creating sessions).
      scheme: Bearer
      type: http
info:
  contact:
    email: hello@tower.dev
    name: Tower Computing GmbH
    url: https://tower.dev
  description: REST API to interact with Tower Services.
  termsOfService: https://tower.dev/terms
  title: Tower API
  version: development
openapi: 3.1.0
paths:
  /accounts:
    post:
      description: This is the primary way that users register new accounts with Tower.
      operationId: create-account
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAccountParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateAccountResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create account
  /accounts/{name}:
    get:
      description: Get information about a specific account by name.
      operationId: describe-account
      parameters:
        - description: The name of the account to describe
          in: path
          name: name
          required: true
          schema:
            description: The name of the account to describe
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeAccountBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:read
        - APIKeyAuth:
            - teams:read
      summary: Describe account
    put:
      description: Update the properties of an account
      operationId: update-account
      parameters:
        - description: The name of the account to update
          in: path
          name: name
          required: true
          schema:
            description: The name of the account to update
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAccountParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateAccountResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:update
        - APIKeyAuth:
            - teams:update
      summary: Update account
  /alerts:
    get:
      description: List alerts for the current account with optional filtering
      operationId: list-alerts
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
        - description: Filter alerts by alert type
          explode: false
          in: query
          name: alert_type
          schema:
            description: Filter alerts by alert type
            type: string
        - description: Filter alerts created after or at this datetime (inclusive)
          explode: false
          in: query
          name: start_at
          schema:
            description: Filter alerts created after or at this datetime (inclusive)
            format: date-time
            type: string
        - description: Filter alerts created before or at this datetime (inclusive)
          explode: false
          in: query
          name: end_at
          schema:
            description: Filter alerts created before or at this datetime (inclusive)
            format: date-time
            type: string
        - description: Filter alerts by acknowledged status.
          explode: false
          in: query
          name: acked
          schema:
            description: Filter alerts by acknowledged status.
            type: string
        - description: Filter alerts by environment (e.g., production, staging)
          explode: false
          in: query
          name: environment
          schema:
            description: Filter alerts by environment (e.g., production, staging)
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAlertsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - notifications:read
        - APIKeyAuth:
            - notifications:read
      summary: List alerts
  /alerts/acknowledge-all:
    post:
      description: Mark all unacknowledged alerts as acknowledged for the current user in the current account
      operationId: acknowledge-all-alerts
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AcknowledgeAllAlertsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - notifications:update
        - APIKeyAuth:
            - notifications:update
      summary: Acknowledge all alerts
  /alerts/stream:
    get:
      description: Streams alert notifications in real-time
      operationId: stream-alerts
      responses:
        "200":
          content:
            text/event-stream:
              schema:
                description: Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
                items:
                  oneOf:
                    - properties:
                        data:
                          $ref: "#/components/schemas/Alert"
                        event:
                          const: alert
                          description: The event name.
                          type: string
                        id:
                          description: The event ID.
                          type: integer
                        retry:
                          description: The retry time in milliseconds.
                          type: integer
                      required:
                        - data
                        - event
                      title: Event alert
                      type: object
                    - properties:
                        data:
                          $ref: "#/components/schemas/SSEWarning"
                        event:
                          const: error
                          description: The event name.
                          type: string
                        id:
                          description: The event ID.
                          type: integer
                        retry:
                          description: The retry time in milliseconds.
                          type: integer
                      required:
                        - data
                        - event
                      title: Event error
                      type: object
                title: Server Sent Events
                type: array
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - notifications:read
        - APIKeyAuth:
            - notifications:read
      summary: Stream alert notifications
  /alerts/{alert_id}:
    delete:
      description: Permanently delete an alert
      operationId: delete-alert
      parameters:
        - description: ID of the alert to delete
          in: path
          name: alert_id
          required: true
          schema:
            description: ID of the alert to delete
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - notifications:delete
        - APIKeyAuth:
            - notifications:delete
      summary: Delete alert
  /alerts/{alert_seq}/acknowledge:
    post:
      description: Mark an alert as acknowledged
      operationId: acknowledge-alert
      parameters:
        - description: Seq of the alert to acknowledge
          in: path
          name: alert_seq
          required: true
          schema:
            description: Seq of the alert to acknowledge
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AcknowledgeAlertResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - notifications:update
        - APIKeyAuth:
            - notifications:update
      summary: Acknowledge alert
  /api-keys:
    delete:
      operationId: delete-api-key
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteAPIKeyParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteAPIKeyResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - api_keys:delete
        - APIKeyAuth:
            - api_keys:delete
      summary: Delete API key
    get:
      description: List all the API keys associated with your current account.
      operationId: list-api-keys
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAPIKeysResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - api_keys:read
        - APIKeyAuth:
            - api_keys:read
      summary: List API keys
    post:
      operationId: create-api-key
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAPIKeyParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateAPIKeyResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - api_keys:create
        - APIKeyAuth:
            - api_keys:create
      summary: Create API Key
  /apps:
    get:
      description: Get all the apps for the current account.
      operationId: list-apps
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
        - description: The tag query to filter apps by. Provide a serialized TagFilter as the value for the parameter.
          example: tag_filter={"op":"eq","name":"foo","value":"bar"}
          explode: false
          in: query
          name: tag_filter
          schema:
            description: The tag query to filter apps by. Provide a serialized TagFilter as the value for the parameter.
            examples:
              - tag_filter={"op":"eq","name":"foo","value":"bar"}
            type: string
        - description: The search query to filter apps by.
          explode: false
          in: query
          name: query
          schema:
            description: The search query to filter apps by.
            type: string
        - description: Number of recent runs to fetch (-1 for all runs, defaults to 20)
          explode: false
          in: query
          name: num_runs
          schema:
            default: 20
            description: Number of recent runs to fetch (-1 for all runs, defaults to 20)
            format: int64
            type: integer
        - description: Sort order for the results.
          explode: false
          in: query
          name: sort
          schema:
            default: created_at
            description: Sort order for the results.
            enum:
              - most_recent_run
              - a_to_z
              - created_at
              - updated_at
            type: string
        - description: Filter to see apps with certain statuses.
          explode: false
          in: query
          name: filter
          schema:
            description: Filter to see apps with certain statuses.
            enum:
              - disabled
              - running
              - withWarning
              - healthy
              - scheduled
            type: string
        - description: The environment to filter the apps by. If not provided, apps for all environments will be returned.
          explode: false
          in: query
          name: environment
          schema:
            description: The environment to filter the apps by. If not provided, apps for all environments will be returned.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAppsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:read
        - APIKeyAuth:
            - apps:read
      summary: List apps
      x-shoulder-tap-events:
        - apps.*
        - runs.*
    post:
      description: Create a new app in the current account.
      operationId: create-app
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAppParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateAppResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:create
        - APIKeyAuth:
            - apps:create
      summary: Create app
  /apps/{name}:
    delete:
      description: Delete one of your apps, the associated code, and all the runs as well.
      operationId: delete-app
      parameters:
        - description: The name of the app to delete.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to delete.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteAppResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:delete
        - APIKeyAuth:
            - apps:delete
      summary: Delete app
    get:
      description: Get all the runs for the current account.
      operationId: describe-app
      parameters:
        - description: The name of the app to fetch.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to fetch.
            type: string
        - description: The number of recent runs to fetch for the app.
          explode: false
          in: query
          name: runs
          schema:
            description: The number of recent runs to fetch for the app.
            format: int64
            type: integer
        - description: Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format.
          explode: false
          in: query
          name: start_at
          schema:
            description: Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format.
            format: date-time
            type: string
        - description: Filter runs scheduled before or at this datetime (inclusive). Provide timestamps in ISO-8601 format.
          explode: false
          in: query
          name: end_at
          schema:
            description: Filter runs scheduled before or at this datetime (inclusive). Provide timestamps in ISO-8601 format.
            format: date-time
            type: string
        - description: Timezone for the statistics (e.g., 'Europe/Berlin'). Defaults to UTC.
          explode: false
          in: query
          name: timezone
          schema:
            default: UTC
            description: Timezone for the statistics (e.g., 'Europe/Berlin'). Defaults to UTC.
            type: string
        - description: The environment to resolve the app version against. Defaults to 'default'.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment to resolve the app version against. Defaults to 'default'.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeAppResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:read
        - APIKeyAuth:
            - apps:read
      summary: Describe app
      x-shoulder-tap-events:
        - apps.{name}.*
        - runs.{name}.*
    put:
      description: Update an app in the currently authenticated account.
      operationId: update-app
      parameters:
        - description: The name of the App to update.
          in: path
          name: name
          required: true
          schema:
            description: The name of the App to update.
            type: string
        - description: Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.
          in: header
          name: X-Tower-Request-Number
          schema:
            description: Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAppParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateAppResponse"
          description: OK
          headers:
            X-Tower-Request-Number:
              schema:
                description: Echoes the accepted account fence sequence when the request supplied a token.
                format: int64
                type:
                  - integer
                  - "null"
        "412":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Precondition Failed
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Internal Server Error
      security:
        - AccessTokenAuth:
            - apps:update
        - APIKeyAuth:
            - apps:update
      summary: Update app
  /apps/{name}/deploy:
    post:
      description: Deploy a new version of an app. Accepts either a TAR file upload (application/tar) or a JSON body with source_uri (application/json) for deploying from a GitHub repository.
      operationId: deploy-app
      parameters:
        - description: The name of the app to deploy.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to deploy.
            type: string
        - description: The SHA256 hash of the content, used to verify integrity.
          in: header
          name: X-Tower-Checksum-SHA256
          schema:
            description: The SHA256 hash of the content, used to verify integrity.
            type: string
        - description: Optional opaque key (typically a git commit SHA or CI build ID). If a prior deploy for this app supplied the same value, the server reuses that AppVersion instead of creating a new one — letting consecutive deploys to different environments share a single version when the source hasn't changed.
          in: header
          name: X-Tower-Idempotency-Key
          schema:
            description: Optional opaque key (typically a git commit SHA or CI build ID). If a prior deploy for this app supplied the same value, the server reuses that AppVersion instead of creating a new one — letting consecutive deploys to different environments share a single version when the source hasn't changed.
            type: string
        - description: Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.
          in: header
          name: X-Tower-Request-Number
          schema:
            description: Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.
            format: int64
            type: integer
        - description: Size of the uploaded bundle in bytes.
          in: header
          name: Content-Length
          schema:
            description: Size of the uploaded bundle in bytes.
            format: int64
            type: integer
        - description: The environment to deploy to.
          explode: false
          in: query
          name: environment
          schema:
            description: The environment to deploy to.
            type: string
        - description: Whether to deploy to all environments for this app. If true, the 'environment' query parameter is ignored.
          explode: false
          in: query
          name: all_environments
          schema:
            default: false
            description: Whether to deploy to all environments for this app. If true, the 'environment' query parameter is ignored.
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              examples:
                - source_uri: https://github.com/tower/tower-examples/tree/main/01-hello-world
              properties:
                source_uri:
                  description: GitHub repository URL for deploying from source
                  format: uri
                  type: string
              required:
                - source_uri
              type: object
          application/octet-stream:
            schema:
              contentMediaType: application/octet-stream
              description: A .tar or .tar.gz file containing the code to deploy and MANIFEST
              examples:
                - <binary tar file stream>
              format: binary
              type: string
        description: Deploy app using either a tar file upload or GitHub source URL
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeployAppResponse"
          description: Created
          headers:
            X-Tower-Request-Number:
              schema:
                description: Echoes the accepted account fence sequence when the request supplied a token.
                format: int64
                type:
                  - integer
                  - "null"
        "400":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Bad Request
        "412":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Precondition Failed
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Internal Server Error
      security:
        - AccessTokenAuth:
            - apps:deploy
        - APIKeyAuth:
            - apps:deploy
      summary: Deploy app
  /apps/{name}/environments:
    get:
      description: Generates a list of all the known environments for a given app in the current account.
      operationId: list-app-environments
      parameters:
        - description: The name of the app to get the version for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to get the version for.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAppEnvironmentsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:read
        - APIKeyAuth:
            - apps:read
      summary: List app environments
      x-shoulder-tap-events:
        - apps.{name}.*
  /apps/{name}/environments/{environment}:
    put:
      description: Update the configuration of an app in a specific environment, such as which version is deployed.
      operationId: update-app-environment
      parameters:
        - description: The name of the app.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app.
            type: string
        - description: The name of the environment.
          in: path
          name: environment
          required: true
          schema:
            description: The name of the environment.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAppEnvironmentParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateAppEnvironmentResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:deploy
        - APIKeyAuth:
            - apps:deploy
      summary: Update app environment
  /apps/{name}/runs:
    get:
      description: Generates a list of all the runs for a given app. The list is paginated based on the query string parameters passed in.
      operationId: list-runs
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
        - description: The name of the app to fetch runs for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to fetch runs for.
            type: string
        - description: Filter runs by status(es). Define multiple with a comma-separated list. Supplying none will return all statuses.
          explode: false
          in: query
          name: status
          schema:
            default:
              - pending
              - starting
              - running
              - crashed
              - errored
              - exited
              - cancelled
              - retrying
            description: Filter runs by status(es). Define multiple with a comma-separated list. Supplying none will return all statuses.
            items:
              enum:
                - pending
                - starting
                - running
                - crashed
                - errored
                - exited
                - cancelled
                - retrying
              type: string
            type: array
        - description: Filter runs scheduled after or at this datetime (inclusive)
          explode: false
          in: query
          name: start_at
          schema:
            description: Filter runs scheduled after or at this datetime (inclusive)
            format: date-time
            type: string
        - description: Filter runs scheduled before or at this datetime (inclusive)
          explode: false
          in: query
          name: end_at
          schema:
            description: Filter runs scheduled before or at this datetime (inclusive)
            format: date-time
            type: string
        - description: Filter runs by environment. If not provided, all environments will be included.
          explode: false
          in: query
          name: environment
          schema:
            description: Filter runs by environment. If not provided, all environments will be included.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListRunsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: List runs
      x-shoulder-tap-events:
        - runs.*
    post:
      description: Runs an app with the supplied parameters.
      operationId: run-app
      parameters:
        - description: The name of the app to fetch runs for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to fetch runs for.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RunAppParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RunAppResponse"
                type: object
          description: Created
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
                type: object
          description: Unauthorized
      security:
        - AccessTokenAuth:
            - apps:run
        - APIKeyAuth:
            - apps:run
      summary: Run app
  /apps/{name}/runs/{seq}:
    get:
      description: Describe a run of an app.
      operationId: describe-run
      parameters:
        - description: The name of the app to fetch runs for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to fetch runs for.
            type: string
        - description: The number of the run to fetch.
          in: path
          name: seq
          required: true
          schema:
            description: The number of the run to fetch.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeRunResponse"
          description: OK
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
                type: object
          description: Unauthorized
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
                type: object
          description: Not found
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: Describe run
      x-shoulder-tap-events:
        - runs.{name}.{seq}.*
    post:
      description: Cancel a run
      operationId: cancel-run
      parameters:
        - description: The name of the app to fetch runs for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to fetch runs for.
            type: string
        - description: The number of the run to fetch.
          in: path
          name: seq
          required: true
          schema:
            description: The number of the run to fetch.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CancelRunResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runs:cancel
        - APIKeyAuth:
            - runs:cancel
      summary: Cancel run
  /apps/{name}/runs/{seq}/graph:
    get:
      description: Describe the graph that a run belongs to.
      operationId: describe-run-graph
      parameters:
        - description: The name of the app.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app.
            type: string
        - description: The number of the run to fetch.
          in: path
          name: seq
          required: true
          schema:
            description: The number of the run to fetch.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeRunGraphResponse"
          description: OK
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
                type: object
          description: Unauthorized
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
                type: object
          description: Not found
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: Describe run graph
      x-shoulder-tap-events:
        - run-graph.{name}.{seq}.updated
  /apps/{name}/runs/{seq}/logs:
    get:
      description: Retrieves the logs associated with a particular run of an app.
      operationId: describe-run-logs
      parameters:
        - description: The name of the app to get logs for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to get logs for.
            type: string
        - description: The sequence number of the run to get logs for.
          in: path
          name: seq
          required: true
          schema:
            description: The sequence number of the run to get logs for.
            format: int64
            type: integer
        - description: Fetch logs from this timestamp onwards (inclusive).
          explode: false
          in: query
          name: start_at
          schema:
            description: Fetch logs from this timestamp onwards (inclusive).
            format: date-time
            type: string
        - description: Return only the first N log lines. Cannot be combined with tail.
          explode: false
          in: query
          name: head
          schema:
            description: Return only the first N log lines. Cannot be combined with tail.
            format: int64
            minimum: 1
            type: integer
        - description: Return only the last N log lines. Cannot be combined with head.
          explode: false
          in: query
          name: tail
          schema:
            description: Return only the last N log lines. Cannot be combined with head.
            format: int64
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeRunLogsResponse"
          description: OK
          headers:
            ContentType:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: Describe run logs
  /apps/{name}/runs/{seq}/logs/stream:
    get:
      description: Streams the logs associated with a particular run of an app in real-time.
      operationId: stream-run-logs
      parameters:
        - description: The name of the app to get logs for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to get logs for.
            type: string
        - description: The sequence number of the run to get logs for.
          in: path
          name: seq
          required: true
          schema:
            description: The sequence number of the run to get logs for.
            format: int64
            type: integer
      responses:
        "200":
          content:
            text/event-stream:
              schema:
                description: Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
                items:
                  oneOf:
                    - properties:
                        data:
                          $ref: "#/components/schemas/RunLogLine"
                        event:
                          const: log
                          description: The event name.
                          type: string
                        id:
                          description: The event ID.
                          type: integer
                        retry:
                          description: The retry time in milliseconds.
                          type: integer
                      required:
                        - data
                        - event
                      title: Event log
                      type: object
                    - properties:
                        data:
                          $ref: "#/components/schemas/SSEWarning"
                        event:
                          const: warning
                          description: The event name.
                          type: string
                        id:
                          description: The event ID.
                          type: integer
                        retry:
                          description: The retry time in milliseconds.
                          type: integer
                      required:
                        - data
                        - event
                      title: Event warning
                      type: object
                title: Server Sent Events
                type: array
          description: SSE log stream
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: Stream run logs
  /apps/{name}/versions:
    get:
      description: List all versions of an app in the current account, sorted with the most recent first.
      operationId: list-app-versions
      parameters:
        - description: The name of the app to list versions for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to list versions for.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAppVersionsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:read
        - APIKeyAuth:
            - apps:read
      summary: List app versions
      x-shoulder-tap-events:
        - apps.{name}.*
  /apps/{name}/versions/{num}:
    get:
      description: Describe an app version for an app in the current account.
      operationId: describe-app-version
      parameters:
        - description: The name of the app to get the version for.
          in: path
          name: name
          required: true
          schema:
            description: The name of the app to get the version for.
            type: string
        - description: The version string to get the version for.
          in: path
          name: num
          required: true
          schema:
            description: The version string to get the version for.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeAppVersionResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:read
        - APIKeyAuth:
            - apps:read
      summary: Describe app version
  /batch/describe-runs:
    post:
      description: Describe multiple runs in a single request.
      operationId: batch-describe-runs
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: "#/components/schemas/BatchDescribeRunsParams"
              type: array
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchDescribeRunsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: Batch describe runs
  /catalogs:
    get:
      description: Lists all the catalogs associated with your current account.
      operationId: list-catalogs
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
        - description: The environment to filter by. When omitted, catalogs across all environments are returned.
          explode: false
          in: query
          name: environment
          schema:
            description: The environment to filter by. When omitted, catalogs across all environments are returned.
            type: string
        - description: Whether to fetch all catalogs across all environments or only for the current environment.
          explode: false
          in: query
          name: all
          schema:
            description: Whether to fetch all catalogs across all environments or only for the current environment.
            type: boolean
        - description: Filter catalogs by type, e.g. "tower-catalog". When omitted, all catalog types are returned.
          explode: false
          in: query
          name: type
          schema:
            description: Filter catalogs by type, e.g. "tower-catalog". When omitted, all catalog types are returned.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListCatalogsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:read
        - APIKeyAuth:
            - catalogs:read
      summary: List catalogs
    post:
      description: Create a new catalog object in the currently authenticated account.
      operationId: create-catalog
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCatalogParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateCatalogResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:read
        - APIKeyAuth:
            - catalogs:read
      summary: Create catalog
  /catalogs/export:
    post:
      description: Lists all the catalogs in your current account and re-encrypt them with the public key you supplied.
      operationId: export-catalogs
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExportCatalogsParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExportCatalogsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:export
        - APIKeyAuth:
            - catalogs:export
      summary: Export catalogs
  /catalogs/{catalog}/facts:
    get:
      description: Lists the semantic metadata facts attached to a catalog, optionally filtered by scope and/or object path.
      operationId: list-catalog-facts
      parameters:
        - description: The name of the catalog.
          in: path
          name: catalog
          required: true
          schema:
            description: The name of the catalog.
            type: string
        - description: The environment of the catalog.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment of the catalog.
            type: string
        - description: Filter facts by scope. When omitted, facts of every scope are returned.
          explode: false
          in: query
          name: scope
          schema:
            description: Filter facts by scope. When omitted, facts of every scope are returned.
            type: string
        - description: Filter facts by object path (exact match). When omitted, facts about any object are returned.
          explode: false
          in: query
          name: object
          schema:
            description: Filter facts by object path (exact match). When omitted, facts about any object are returned.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListCatalogFactsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:facts:read
        - APIKeyAuth:
            - catalogs:facts:read
      summary: List catalog facts
  /catalogs/{catalog}/facts/{name}:
    delete:
      description: Deletes a semantic metadata fact addressed by its name within a catalog.
      operationId: delete-catalog-fact
      parameters:
        - description: The name of the catalog.
          in: path
          name: catalog
          required: true
          schema:
            description: The name of the catalog.
            type: string
        - description: The name of the fact.
          in: path
          name: name
          required: true
          schema:
            description: The name of the fact.
            type: string
        - description: The environment of the catalog.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment of the catalog.
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:facts:write
        - APIKeyAuth:
            - catalogs:facts:write
      summary: Delete a catalog fact
    get:
      description: Returns a single semantic metadata fact addressed by its name within a catalog.
      operationId: describe-catalog-fact
      parameters:
        - description: The name of the catalog.
          in: path
          name: catalog
          required: true
          schema:
            description: The name of the catalog.
            type: string
        - description: The name of the fact.
          in: path
          name: name
          required: true
          schema:
            description: The name of the fact.
            type: string
        - description: The environment of the catalog.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment of the catalog.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeCatalogFactResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:facts:read
        - APIKeyAuth:
            - catalogs:facts:read
      summary: Describe a catalog fact
    put:
      description: "Idempotently sets a semantic metadata fact by name: creates it when the name is new, updates it when it already exists. An inferred write cannot overwrite an existing confirmed fact."
      operationId: update-catalog-fact
      parameters:
        - description: The name of the catalog.
          in: path
          name: catalog
          required: true
          schema:
            description: The name of the catalog.
            type: string
        - description: The name of the fact.
          in: path
          name: name
          required: true
          schema:
            description: The name of the fact.
            type: string
        - description: The environment of the catalog.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment of the catalog.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCatalogFactBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateCatalogFactResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:facts:write
        - APIKeyAuth:
            - catalogs:facts:write
      summary: Update a catalog fact
  /catalogs/{name}:
    delete:
      description: Delete a new catalog object in the currently authenticated account.
      operationId: delete-catalog
      parameters:
        - description: The name of the catalog to update.
          in: path
          name: name
          required: true
          schema:
            description: The name of the catalog to update.
            type: string
        - description: The environment of the catalog to delete.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment of the catalog to delete.
            type: string
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteCatalogResponse"
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:delete
        - APIKeyAuth:
            - catalogs:delete
      summary: Delete catalog
    get:
      description: Returns details for a specific catalog, including its property names and previews.
      operationId: describe-catalog
      parameters:
        - description: The name of the catalog.
          in: path
          name: name
          required: true
          schema:
            description: The name of the catalog.
            type: string
        - description: The environment of the catalog.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment of the catalog.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeCatalogResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:read
        - APIKeyAuth:
            - catalogs:read
      summary: Describe catalog
    put:
      description: Update a new catalog object in the currently authenticated account.
      operationId: update-catalog
      parameters:
        - description: The name of the catalog to update.
          in: path
          name: name
          required: true
          schema:
            description: The name of the catalog to update.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCatalogParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateCatalogResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - catalogs:update
        - APIKeyAuth:
            - catalogs:update
      summary: Update catalog
  /catalogs/{name}/credentials:
    post:
      description: "Mints a short-lived OAuth bearer token for browser or SDK access to a managed (tower-catalog) catalog. Defaults to read-only (`mode: \"read\"`); pass `mode: \"read-write\"` in the body (requires the catalogs:data:write scope) for a token bound to the read-write principal. Team membership is enforced before vending; the master Polaris credentials never leave Tower."
      operationId: vend-catalog-credentials
      parameters:
        - description: The name of the catalog.
          in: path
          name: name
          required: true
          schema:
            description: The name of the catalog.
            type: string
        - description: The environment of the catalog.
          explode: false
          in: query
          name: environment
          schema:
            default: default
            description: The environment of the catalog.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VendCatalogCredentialsBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VendCatalogCredentialsResponse"
          description: OK
        "401":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unauthorized
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Internal Server Error
      security:
        - AccessTokenAuth:
            - catalogs:read
        - APIKeyAuth:
            - catalogs:read
      summary: Vend catalog credentials
  /environments:
    get:
      description: List all environments in your account.
      operationId: list-environments
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListEnvironmentsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - envs:read
        - APIKeyAuth:
            - envs:read
      summary: List environments
    post:
      description: Create a new environment for an app.
      operationId: create-environment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEnvironmentParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateEnvironmentResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - envs:create
        - APIKeyAuth:
            - envs:create
      summary: Create environment
  /environments/{name}:
    delete:
      description: Delete an environment by name
      operationId: delete-environment
      parameters:
        - description: The name of the environment to delete.
          in: path
          name: name
          required: true
          schema:
            description: The name of the environment to delete.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteEnvironmentResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - envs:delete
        - APIKeyAuth:
            - envs:delete
      summary: Delete environment
    get:
      description: Describe an environment and counts of its resources
      operationId: describe-environment
      parameters:
        - description: The name of the environment.
          in: path
          name: name
          required: true
          schema:
            description: The name of the environment.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeEnvironmentResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - envs:read
        - APIKeyAuth:
            - envs:read
      summary: Describe environment
    put:
      description: Rename your environment
      operationId: update-environment
      parameters:
        - description: The current name of the environment to update.
          in: path
          name: name
          required: true
          schema:
            description: The current name of the environment to update.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateEnvironmentParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateEnvironmentResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - envs:update
        - APIKeyAuth:
            - envs:update
      summary: Update environment
  /feature-flags/{key}:
    get:
      description: Get the current value of a feature flag. Returns the flag value if enabled, or a default falsey value if disabled.
      operationId: get-feature-flag-value
      parameters:
        - description: The feature flag key
          example: webhooks
          in: path
          name: key
          required: true
          schema:
            description: The feature flag key
            examples:
              - webhooks
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetFeatureFlagResponseBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get feature flag value
      tags:
        - Feature Flags
  /guests:
    get:
      description: Lists all guests for the current account, optionally filtered by app.
      operationId: list-guests
      parameters:
        - description: Filter guests by app name.
          explode: false
          in: query
          name: app
          schema:
            description: Filter guests by app name.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListGuestsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps
        - APIKeyAuth:
            - apps
      summary: List guests
    post:
      description: Creates a new guest with access to a specific externally accessible app and returns a login URL to share with them.
      operationId: create-guest
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateGuestParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateGuestResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:update
        - APIKeyAuth:
            - apps:update
      summary: Create guest
  /guests/{guest_id}:
    delete:
      description: Deletes a guest and revokes their access. Any active sessions will be invalidated.
      operationId: delete-guest
      parameters:
        - description: The ID of the guest to delete.
          in: path
          name: guest_id
          required: true
          schema:
            description: The ID of the guest to delete.
            type: string
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteGuestOutputBody"
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps
        - APIKeyAuth:
            - apps
      summary: Delete guest
  /guests/{guest_id}/login-url:
    post:
      description: Creates a new login URL for an existing guest. Use this if the previous URL expired or was compromised.
      operationId: regenerate-guest-login-url
      parameters:
        - description: The ID of the guest to regenerate the login URL for.
          in: path
          name: guest_id
          required: true
          schema:
            description: The ID of the guest to regenerate the login URL for.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RegenerateGuestLoginURLParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegenerateGuestLoginURLResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps
        - APIKeyAuth:
            - apps
      summary: Regenerate guest login URL
  /login/device:
    get:
      description: Creates a new device login ticket and returns the codes and urls needed for authentication.
      operationId: create-device-login-ticket
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateDeviceLoginTicketResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create device login ticket
  /login/device/claim:
    post:
      description: Claims a device login ticket code for the authenticated user.
      operationId: claim-device-login-ticket
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ClaimDeviceLoginTicketParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClaimDeviceLoginTicketResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Claim a device login ticket
  /login/device/{device_code}:
    get:
      description: Checks if a device login code has been claimed and returns the user session if so.
      operationId: describe-device-login-session
      parameters:
        - description: The device code to check.
          in: path
          name: device_code
          required: true
          schema:
            description: The device code to check.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeDeviceLoginSessionResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Describe device login session
  /organizations/{name}:
    put:
      description: Update an organization's name. Only the current owner can perform this operation.
      operationId: update-organization
      parameters:
        - description: The current name of the organization to update
          in: path
          name: name
          required: true
          schema:
            description: The current name of the organization to update
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateOrganizationParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateOrganizationResponse"
          description: OK
        "403":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Forbidden
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Not Found
        "409":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Conflict
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Internal Server Error
      security:
        - AccessTokenAuth:
            - orgs:update
        - APIKeyAuth:
            - orgs:update
      summary: Update organization
  /plan:
    get:
      description: Get the current plan for the account.
      operationId: describe-plan
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribePlanResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth: []
        - APIKeyAuth: []
      summary: Describe plan
    put:
      operationId: update-plan
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePlanParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdatePlanResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth: []
        - APIKeyAuth: []
      summary: Update plan
  /runners:
    get:
      description: Get all self-hosted runners for the current account.
      operationId: list-runners
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListRunnersResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runners:read
        - APIKeyAuth:
            - runners:read
      summary: List runners
  /runners/credentials:
    post:
      description: Uses your current authentication context to generate runner credentials that are used for authenticating runner requests
      operationId: generate-runner-credentials
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateRunnerCredentialsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runners:credentials:create
        - APIKeyAuth:
            - runners:credentials:create
      summary: Generate runner credentials
  /runs:
    get:
      description: Search, filter, and list runs across all of the apps in your account.
      operationId: search-runs
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
        - description: Filter runs by status(es). Define multiple with a comma-separated list. Supplying none will return all statuses.
          explode: false
          in: query
          name: status
          schema:
            default:
              - pending
              - starting
              - running
              - crashed
              - errored
              - exited
              - cancelled
              - retrying
            description: Filter runs by status(es). Define multiple with a comma-separated list. Supplying none will return all statuses.
            items:
              enum:
                - pending
                - starting
                - running
                - crashed
                - errored
                - exited
                - cancelled
                - retrying
              type: string
            type: array
        - description: Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format.
          explode: false
          in: query
          name: start_at
          schema:
            description: Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format.
            format: date-time
            type: string
        - description: Filter runs scheduled before or at this datetime (inclusive). Provide timestamps in ISO-8601 format.
          explode: false
          in: query
          name: end_at
          schema:
            description: Filter runs scheduled before or at this datetime (inclusive). Provide timestamps in ISO-8601 format.
            format: date-time
            type: string
        - description: Filter runs by environment. If not provided, all environments will be included.
          explode: false
          in: query
          name: environment
          schema:
            description: Filter runs by environment. If not provided, all environments will be included.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchRunsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: Search runs
      x-shoulder-tap-events:
        - runs.*
  /sandbox/secrets:
    post:
      description: Creates secrets with Tower-provided default values for the specified keys in the given environment.
      operationId: create-sandbox-secrets
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSandboxSecretsParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSandboxSecretsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - sandbox:secrets:create
        - APIKeyAuth:
            - sandbox:secrets:create
      summary: Create Tower-provided sandbox secrets
  /schedules:
    delete:
      description: Delete an existing schedule for an app.
      operationId: delete-schedule
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteScheduleParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteScheduleResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - schedules:delete
        - APIKeyAuth:
            - schedules:delete
      summary: Delete schedule
    get:
      description: Lists all schedules for the current account, optionally filtered by environment and app.
      operationId: list-schedules
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
        - description: Filter schedules by environment. If not provided, all environments will be included.
          explode: false
          in: query
          name: environment
          schema:
            description: Filter schedules by environment. If not provided, all environments will be included.
            type: string
        - description: Filter schedules by app name. If not provided, schedules across all apps will be included.
          explode: false
          in: query
          name: app
          schema:
            description: Filter schedules by app name. If not provided, schedules across all apps will be included.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListSchedulesResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - schedules:read
        - APIKeyAuth:
            - schedules:read
      summary: List schedules
    post:
      description: Create a new schedule for an app.
      operationId: create-schedule
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateScheduleParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateScheduleResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - schedules:create
        - APIKeyAuth:
            - schedules:create
      summary: Create schedule
  /schedules/activate:
    patch:
      description: Activate multiple schedules to enable their execution.
      operationId: activate-schedules
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchScheduleParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchScheduleResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - schedules:update
        - APIKeyAuth:
            - schedules:update
      summary: Activate multiple schedules
  /schedules/deactivate:
    patch:
      description: Deactivate multiple schedules to disable their execution.
      operationId: deactivate-schedules
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchScheduleParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchScheduleResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - schedules:update
        - APIKeyAuth:
            - schedules:update
      summary: Deactivate multiple schedules
  /schedules/{idOrName}:
    put:
      description: Update an existing schedule for an app.
      operationId: update-schedule
      parameters:
        - description: The ID or name of the schedule to update.
          in: path
          name: idOrName
          required: true
          schema:
            description: The ID or name of the schedule to update.
            type: string
        - description: Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.
          in: header
          name: X-Tower-Request-Number
          schema:
            description: Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateScheduleParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateScheduleResponse"
          description: OK
          headers:
            X-Tower-Request-Number:
              schema:
                description: Echoes the accepted account fence sequence when the request supplied a token.
                format: int64
                type:
                  - integer
                  - "null"
        "412":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Precondition Failed
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Internal Server Error
      security:
        - AccessTokenAuth:
            - schedules:update
        - APIKeyAuth:
            - schedules:update
      summary: Update schedule
  /secrets:
    get:
      description: Lists all the secrets associated with your current account.
      operationId: list-secrets
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
        - description: The environment to filter by.
          explode: false
          in: query
          name: environment
          schema:
            description: The environment to filter by.
            type: string
        - description: Whether to fetch all secrets or only the ones that are not marked as deleted.
          explode: false
          in: query
          name: all
          schema:
            description: Whether to fetch all secrets or only the ones that are not marked as deleted.
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListSecretsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - secrets:read
        - APIKeyAuth:
            - secrets:read
      summary: List secrets
    post:
      description: Creates a new secret and associates it with the current account.
      operationId: create-secret
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSecretParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSecretResponse"
          description: Created
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unauthorized
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Conflict
        "412":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Validation Error (Precondition Failed)
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Internal Server Error
      security:
        - AccessTokenAuth:
            - secrets:create
        - APIKeyAuth:
            - secrets:create
      summary: Create secret
  /secrets/environments:
    get:
      description: Lists all the environments associated with secrets.
      operationId: list-secret-environments
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListSecretEnvironmentsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - secrets:read
        - APIKeyAuth:
            - secrets:read
      summary: List secret environments
  /secrets/export:
    post:
      description: Lists all the secrets in your current account and re-encrypt them with the public key you supplied.
      operationId: export-secrets
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExportSecretsParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExportSecretsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - secrets:read
        - APIKeyAuth:
            - secrets:read
      summary: Export secrets
  /secrets/key:
    get:
      description: Gets the encryption key used for encrypting secrets that you want to create in Tower.
      operationId: describe-secrets-key
      parameters:
        - description: The format to return the key in. Options are 'pkcs1' and 'spki'.
          explode: false
          in: query
          name: format
          schema:
            description: The format to return the key in. Options are 'pkcs1' and 'spki'.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeSecretsKeyResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - secrets:read
        - APIKeyAuth:
            - secrets:read
      summary: Describe encryption key
  /secrets/{name}:
    delete:
      description: Delete a secret by name.
      operationId: delete-secret
      parameters:
        - description: The name of the secret to delete.
          in: path
          name: name
          required: true
          schema:
            description: The name of the secret to delete.
            type: string
        - description: The environment of the secret to delete.
          explode: false
          in: query
          name: environment
          schema:
            description: The environment of the secret to delete.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteSecretResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - secrets:delete
        - APIKeyAuth:
            - secrets:delete
      summary: Delete secret
    put:
      description: Updates a secret that has previously been created in your account
      operationId: update-secret
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSecretParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateSecretResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - secrets:update
        - APIKeyAuth:
            - secrets:update
      summary: Update secret
  /service-accounts:
    get:
      description: List all service accounts in the current account. Team admin only.
      operationId: list-service-accounts
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListServiceAccountsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:read
        - APIKeyAuth:
            - service_accounts:read
      summary: List service accounts
    post:
      description: Create a new service account in the current account. Team admin only.
      operationId: create-service-account
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateServiceAccountParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateServiceAccountResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:create
        - APIKeyAuth:
            - service_accounts:create
      summary: Create service account
  /service-accounts/{idOrName}:
    delete:
      description: "Tombstones a service account: revokes API keys, disables owned schedules, cancels in-flight runs, then soft-deletes the SA. Team admin only."
      operationId: delete-service-account
      parameters:
        - description: The ID or name of the service account to delete.
          in: path
          name: idOrName
          required: true
          schema:
            description: The ID or name of the service account to delete.
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:delete
        - APIKeyAuth:
            - service_accounts:delete
      summary: Delete service account
    get:
      description: Fetch a single service account by ID or name. Team admin only.
      operationId: describe-service-account
      parameters:
        - description: The ID or name of the service account.
          in: path
          name: idOrName
          required: true
          schema:
            description: The ID or name of the service account.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeServiceAccountResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:read
        - APIKeyAuth:
            - service_accounts:read
      summary: Describe service account
    patch:
      description: Update one or more fields on an existing service account. Team admin only.
      operationId: update-service-account
      parameters:
        - description: The ID or name of the service account to update.
          in: path
          name: idOrName
          required: true
          schema:
            description: The ID or name of the service account to update.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateServiceAccountParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateServiceAccountResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:update
        - APIKeyAuth:
            - service_accounts:update
      summary: Update service account
  /service-accounts/{idOrName}/api-keys:
    delete:
      description: Revoke an API key bound to a service account. Team admin only.
      operationId: delete-service-account-api-key
      parameters:
        - description: The ID or name of the service account.
          in: path
          name: idOrName
          required: true
          schema:
            description: The ID or name of the service account.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteServiceAccountAPIKeyParams"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:update
        - APIKeyAuth:
            - service_accounts:update
      summary: Delete API key for service account
    get:
      description: List API keys bound to a service account. Team admin only.
      operationId: list-service-account-api-keys
      parameters:
        - description: The ID or name of the service account.
          in: path
          name: idOrName
          required: true
          schema:
            description: The ID or name of the service account.
            type: string
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListServiceAccountAPIKeysResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:read
        - APIKeyAuth:
            - service_accounts:read
      summary: List API keys for service account
    post:
      description: Mint a new API key bound to a service account. The full identifier is only returned on this response. Team admin only.
      operationId: create-service-account-api-key
      parameters:
        - description: The ID or name of the service account this key authenticates as.
          in: path
          name: idOrName
          required: true
          schema:
            description: The ID or name of the service account this key authenticates as.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateServiceAccountAPIKeyParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateServiceAccountAPIKeyResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - service_accounts:update
        - APIKeyAuth:
            - service_accounts:update
      summary: Create API key for service account
  /session:
    delete:
      description: Terminate a session and revoke the access keys associated with it.
      operationId: delete-session
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteSessionParams"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteSessionResponse"
          description: OK
          headers:
            Set-Cookie:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Delete session
    get:
      description: Validate your current session and return the user information associated with the session.
      operationId: describe-session
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeSessionResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Describe session
      x-shoulder-tap-events:
        - users.updated
    post:
      description: Create a new session and return it.
      operationId: create-session
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSessionParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSessionResponse"
          description: OK
          headers:
            Set-Cookie:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create session
  /session/refresh:
    post:
      description: If your access tokens expire, this API endpoint takes a Refresh Token and returns a new set of Access Tokens for your session. Note that we don't rotate the Refresh Token itself, and it's not returned by this API endpoint.
      operationId: refresh-session
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RefreshSessionParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RefreshSessionResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth: []
        - APIKeyAuth: []
      summary: Refresh session
  /shouldertaps/stream:
    get:
      description: Stream events over SSE that notify you of potential data staleness
      operationId: stream-shouldertaps
      responses:
        "200":
          content:
            text/event-stream:
              schema:
                description: Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
                items:
                  oneOf:
                    - properties:
                        data:
                          $ref: "#/components/schemas/ShoulderTap"
                        event:
                          const: shouldertap
                          description: The event name.
                          type: string
                        id:
                          description: The event ID.
                          type: integer
                        retry:
                          description: The retry time in milliseconds.
                          type: integer
                      required:
                        - data
                        - event
                      title: Event shouldertap
                      type: object
                    - properties:
                        data:
                          $ref: "#/components/schemas/SSEWarning"
                        event:
                          const: warning
                          description: The event name.
                          type: string
                        id:
                          description: The event ID.
                          type: integer
                        retry:
                          description: The retry time in milliseconds.
                          type: integer
                      required:
                        - data
                        - event
                      title: Event warning
                      type: object
                title: Server Sent Events
                type: array
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth: []
        - APIKeyAuth: []
      summary: Stream shouldertaps
  /stats/apps:
    get:
      description: Generates current statistics about apps
      operationId: generate-app-statistics
      parameters:
        - description: The environment to filter the statistics by. If not provided, statistics for all environments will be returned.
          explode: false
          in: query
          name: environment
          schema:
            description: The environment to filter the statistics by. If not provided, statistics for all environments will be returned.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateAppStatisticsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - apps:read
        - APIKeyAuth:
            - apps:read
      summary: Generate app statistics
  /stats/runs:
    get:
      description: Generates statistics about runs over a specified time period.
      operationId: generate-run-statistics
      parameters:
        - description: Filter runs by status(es). Define multiple with a comma-separated list. Supplying none will return all statuses.
          explode: false
          in: query
          name: status
          schema:
            default:
              - pending
              - starting
              - running
              - crashed
              - errored
              - exited
              - cancelled
              - retrying
            description: Filter runs by status(es). Define multiple with a comma-separated list. Supplying none will return all statuses.
            items:
              enum:
                - pending
                - starting
                - running
                - crashed
                - errored
                - exited
                - cancelled
                - retrying
              type: string
            type: array
        - description: Start date and time for statistics (inclusive)
          explode: false
          in: query
          name: start_at
          required: true
          schema:
            description: Start date and time for statistics (inclusive)
            format: date-time
            type: string
        - description: End date and time for statistics (inclusive)
          explode: false
          in: query
          name: end_at
          required: true
          schema:
            description: End date and time for statistics (inclusive)
            format: date-time
            type: string
        - description: Timezone for the statistics (e.g., 'Europe/Berlin'). Defaults to UTC.
          explode: false
          in: query
          name: timezone
          schema:
            default: UTC
            description: Timezone for the statistics (e.g., 'Europe/Berlin'). Defaults to UTC.
            type: string
        - description: Filter runs by environment. If not provided, all environments will be included.
          explode: false
          in: query
          name: environment
          schema:
            description: Filter runs by environment. If not provided, all environments will be included.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateRunStatisticsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - runs:read
        - APIKeyAuth:
            - runs:read
      summary: Generate run statistics
      x-shoulder-tap-events:
        - runs.*
        - statistics.updated
  /storage/catalogs/default:
    get:
      description: |-
        Returns the team's default catalog, provisioning it lazily if it does not yet exist.

        When two concurrent first calls race to provision the catalog, the loser receives 202 Accepted; retry after a few seconds and the catalog will be ready.
      operationId: describe-default-catalog
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeCatalogResponse"
          description: OK
        "202":
          description: Provisioning is in progress; retry after a few seconds.
      security:
        - AccessTokenAuth:
            - catalogs:read
        - APIKeyAuth:
            - catalogs:read
      summary: Describe default catalog
  /team-invites:
    get:
      description: List your pending invitations for teams
      operationId: list-my-team-invitations
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListMyTeamInvitationsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - users:me
        - APIKeyAuth:
            - users:me
      summary: List my team invitations
    put:
      description: Update a team invitation that you have pending
      operationId: update-my-team-invitation
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMyTeamInvitationParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateMyTeamInvitationResponse"
          description: OK
        "404":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Not Found
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Internal Server Error
      security:
        - AccessTokenAuth:
            - users:me
        - APIKeyAuth:
            - users:me
      summary: Update my team invitation
  /teams:
    delete:
      description: Delete a new team
      operationId: delete-team
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteTeamParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteTeamResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:delete
        - APIKeyAuth:
            - teams:delete
      summary: Delete team
    get:
      description: List all the teams that you are a member of.
      operationId: list-teams
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTeamsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:read
        - APIKeyAuth:
            - teams:read
      summary: List teams
    post:
      description: Create a new team
      operationId: create-team
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTeamParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateTeamResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:create
        - APIKeyAuth:
            - teams:create
      summary: Create team
  /teams/{name}:
    get:
      description: Get details about a team, including its members and invitations.
      operationId: describe-team
      parameters:
        - description: The name of the team to fetch.
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to fetch.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeTeamResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:read
        - APIKeyAuth:
            - teams:read
      summary: Describe team
    put:
      description: Update a team with a new name or name. Note that updating the team with a new name will cause all your URLs to change!
      operationId: update-team
      parameters:
        - description: The name of the team to update
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to update
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTeamParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateTeamResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:update
        - APIKeyAuth:
            - teams:update
      summary: Update team
  /teams/{name}/invites:
    delete:
      description: Delete a pending team invitation that you have previously sent
      operationId: delete-team-invitation
      parameters:
        - description: The name of the team to remove someone from
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to remove someone from
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteTeamInvitationParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteTeamInvitationResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:update
        - APIKeyAuth:
            - teams:update
      summary: Delete team invitation
    get:
      description: List the pending invitations for a team
      operationId: list-team-invitations
      parameters:
        - description: The name of the team to list members for
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to list members for
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTeamInvitationsResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:read
        - APIKeyAuth:
            - teams:read
      summary: List team invitations
    post:
      description: Invite a new team
      operationId: invite-team-member
      parameters:
        - description: The name of the team to invite someone to
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to invite someone to
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/InviteTeamMemberParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InviteTeamMemberResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:update
        - APIKeyAuth:
            - teams:update
      summary: Invite team member
  /teams/{name}/invites/resend:
    post:
      description: Resend a team invitation to a user if they need a reminder or if they lost it
      operationId: resend-team-invitation
      parameters:
        - description: The name of the team to invite someone to
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to invite someone to
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResendTeamInvitationParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResendTeamInvitationResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:update
        - APIKeyAuth:
            - teams:update
      summary: Resend team invitation
  /teams/{name}/leave:
    post:
      description: Remove yourself from a team. If you're the last member of a team, you cannot remove yourself. You should delete the team instead.
      operationId: leave-team
      parameters:
        - description: The name of the team to leave
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to leave
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LeaveTeamResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:leave
        - APIKeyAuth:
            - teams:leave
      summary: Leave team
  /teams/{name}/members:
    delete:
      operationId: remove-team-member
      parameters:
        - description: The name of the team to remove someone from
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to remove someone from
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveTeamMemberParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoveTeamMemberResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:update
        - APIKeyAuth:
            - teams:update
      summary: Remove team member
    get:
      description: List the members of a team
      operationId: list-team-members
      parameters:
        - description: The name of the team to list members for
          in: path
          name: name
          required: true
          schema:
            description: The name of the team to list members for
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTeamMembersResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:read
        - APIKeyAuth:
            - teams:read
      summary: List team members
    put:
      operationId: update-team-member
      parameters:
        - description: The name of the team
          in: path
          name: name
          required: true
          schema:
            description: The name of the team
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTeamMemberParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateTeamMemberResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - teams:update
        - APIKeyAuth:
            - teams:update
      summary: Update team member
  /usage:
    get:
      description: Describe usage statistics for the user's organization for the current billing cycle.
      operationId: describe-organization-usage
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrganizationUsage"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - orgs
        - APIKeyAuth:
            - orgs
      summary: Describe organization usage
  /usage/time-series:
    get:
      description: Get the previous 30 days of usage as a time series.
      operationId: generate-organization-usage-time-series
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateOrganizationUsageTimeSeriesResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - orgs
        - APIKeyAuth:
            - orgs
      summary: Generate organization usage
  /user:
    put:
      description: Updates your current user profile.
      operationId: update-user
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateUserParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateUserResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Update user profile
  /user/auth-context:
    get:
      description: This API endpoint returns information about the current authentication context for the user that's used for various internal processes in Tower UI.
      operationId: describe-authentication-context
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeAuthenticationContextBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Describe authentication context
  /user/email-preferences:
    get:
      description: Describes the current user's email preferences.
      operationId: describe-email-preferences
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeEmailPreferencesBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Describe email preferences
    put:
      description: Updates the set of email preferences the current user has. If a partial set of preferences is submitted, it will be updated accordingly.
      operationId: update-email-preferences
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateEmailPreferencesBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateEmailPreferencesBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Update email preferences
  /webhooks:
    get:
      operationId: list-webhooks
      parameters:
        - description: The page number to fetch.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: The page number to fetch.
            format: int64
            type: integer
        - description: The number of records to fetch on each page.
          explode: false
          in: query
          name: page_size
          schema:
            default: 20
            description: The number of records to fetch on each page.
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWebhooksResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - webhooks:read
        - APIKeyAuth:
            - webhooks:read
      summary: List webhooks
    post:
      operationId: create-webhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWebhookParams"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateWebhookResponse"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - webhooks:create
        - APIKeyAuth:
            - webhooks:create
      summary: Create webhook
  /webhooks/{name}:
    delete:
      operationId: delete-webhook
      parameters:
        - description: The name of the webhook.
          in: path
          name: name
          required: true
          schema:
            description: The name of the webhook.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteWebhookResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - webhooks:delete
        - APIKeyAuth:
            - webhooks:delete
      summary: Delete webhook
    get:
      operationId: describe-webhook
      parameters:
        - description: The name of the webhook.
          in: path
          name: name
          required: true
          schema:
            description: The name of the webhook.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeWebhookResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - webhooks:read
        - APIKeyAuth:
            - webhooks:read
      summary: Describe webhook
    put:
      description: "Updates webhook. Note: it is not possible to update the URL. To do so, you should delete and recreate the webhook instead."
      operationId: update-webhook
      parameters:
        - description: The name of the webhook.
          in: path
          name: name
          required: true
          schema:
            description: The name of the webhook.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWebhookParams"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateWebhookResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - webhooks:update
        - APIKeyAuth:
            - webhooks:update
      summary: Update webhook
  /webhooks/{name}/test:
    post:
      operationId: check-webhook
      parameters:
        - description: The name of the webhook.
          in: path
          name: name
          required: true
          schema:
            description: The name of the webhook.
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TestWebhookResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - webhooks:update
        - APIKeyAuth:
            - webhooks:update
      summary: Check webhook
  /whoami:
    get:
      description: Returns an RS256-signed identity JWT for the authenticated user. The token's signature can be verified using the public keys served at /.well-known/jwks.json. Intended for downstream consumers (e.g. Convex) that need a verifiable user identity.
      operationId: describe-whoami
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DescribeWhoamiResponse"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security:
        - AccessTokenAuth:
            - session
        - APIKeyAuth:
            - session
      summary: Describe whoami
servers:
  - url: https://api.tower.dev/v1
