> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boat.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Set the active organization

> Set the wallet new sandboxes bill when a request names none, for this account on every client: the API, the CLI (`boat org switch` sets the same value) and the dashboard. Pass an organization id or name you belong to, or `personal` (or `null`) for your own account. `GET /limits` follows it. Sandboxes already running keep the wallet they were created with; leaving or deleting the organization resets the account to personal.



## OpenAPI

````yaml openapi/boat-v1.yaml PATCH /orgs/active
openapi: 3.1.0
info:
  title: Boat Public API v1
  version: 1.0.0
  description: >
    Public JSON API for creating, operating, prompting, observing, and exposing
    sandboxes from backend services, CI jobs, hosted workers, and Boat
    automation products.


    The v1 reference intentionally documents the developer integration surface
    only. Dashboard billing actions are not part of v1.
servers:
  - url: https://boat.dev/api/v1
security:
  - BoatBearerAuth: []
tags:
  - name: Boat
    description: >-
      Unified Boat account, setup, lifecycle, prompting, event history, desktop
      access, and SSH operations.
paths:
  /orgs/active:
    patch:
      tags:
        - Boat
      summary: Set the active organization
      description: >-
        Set the wallet new sandboxes bill when a request names none, for this
        account on every client: the API, the CLI (`boat org switch` sets the
        same value) and the dashboard. Pass an organization id or name you
        belong to, or `personal` (or `null`) for your own account. `GET /limits`
        follows it. Sandboxes already running keep the wallet they were created
        with; leaving or deleting the organization resets the account to
        personal.
      operationId: setActiveOrganization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActiveOrgUpdateRequest'
            examples:
              byName:
                value:
                  org: acme
              personal:
                value:
                  org: personal
      responses:
        '200':
          description: The wallet now active.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveOrgResponse'
              examples:
                org:
                  value:
                    ok: true
                    type: org.active_updated
                    active:
                      id: team_583fd89e-6d29-4007-b48d-52477656cb0f
                      name: acme
                      type: org
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            `not_org_member`: no organization with that id or name that you
            belong to.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: >-
            `ambiguous_org`: several of your organizations share that name; pass
            the id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ActiveOrgUpdateRequest:
      type: object
      required:
        - org
      properties:
        org:
          type:
            - string
            - 'null'
          description: >-
            Organization id or name you belong to; `personal`, your own id or
            `null` for personal.
    ActiveOrgResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessBase'
        - type: object
          required:
            - active
          properties:
            type:
              type: string
              const: org.active_updated
            active:
              type: object
              required:
                - id
                - name
                - type
              properties:
                id:
                  type: string
                name:
                  type: string
                type:
                  type: string
                  enum:
                    - personal
                    - org
    ErrorEnvelope:
      type: object
      required:
        - ok
        - type
        - status
        - code
        - message
        - error
        - requestId
      properties:
        ok:
          type: boolean
          examples:
            - false
        type:
          type: string
          examples:
            - sandbox.error
        status:
          type: integer
          examples:
            - 409
        code:
          type: string
          examples:
            - provider_not_configured
        message:
          type: string
          examples:
            - Prompting is locked until Codex is configured on the Agents page.
        requestId:
          type: string
          examples:
            - req_01HX...
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            details:
              type: object
              additionalProperties: true
    SuccessBase:
      type: object
      required:
        - ok
        - type
      properties:
        ok:
          type: boolean
          examples:
            - true
        type:
          type: string
          description: Stable success envelope discriminator added by v1.
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            invalid:
              value:
                ok: false
                type: sandbox.error
                status: 400
                code: invalid_json
                message: Request body must be valid JSON.
                error:
                  code: invalid_json
                  message: Request body must be valid JSON.
                  status: 400
                requestId: req_01HX...
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            unauthorized:
              value:
                ok: false
                type: sandbox.error
                status: 401
                code: unauthorized
                message: Unauthorized
                error:
                  code: unauthorized
                  message: Unauthorized
                  status: 401
                requestId: req_01HX...
  securitySchemes:
    BoatBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sandbox_api_key
      description: >-
        Boat bearer token in the form `boat_...`. Service API keys authenticate
        sandbox operations.

````