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

# Soft-deactivate an office (sets deactivatedAt)

> Sets `deactivatedAt`/`deactivatedBy` on the office. Does NOT cascade to the office's agents — office-level deactivate is scoped to the office record only. Returns 409 `OFFICE_ALREADY_DEACTIVATED` if the office is already deactivated. With `?requireEmpty=true`, returns 409 `OFFICE_HAS_ACTIVE_AGENTS` (`details.activeAgentCount`) while any active agent still has this as their primary office. Agents cannot be moved INTO a deactivated office (409 `OFFICE_DEACTIVATED` on agent create, PATCH and bulk-reassign). Honors `If-Match` for optimistic concurrency.



## OpenAPI

````yaml /api-reference/v2/openapi.json post /offices/{id}/deactivate
openapi: 3.0.3
info:
  title: Windermere Atlas API
  description: V2 data API — Project Atlas
  version: 2.0.0
servers:
  - url: https://api.windermere.com/v2/api
security:
  - bearerAuth: []
tags:
  - name: agents
    description: Agent profile read endpoints
  - name: offices
    description: Office read endpoints
  - name: teams
    description: Team read endpoints
  - name: listings
    description: Listings (RESO Data Dictionary Property records; active + sold)
  - name: reso
    description: >-
      RESO Web API Core (OData 4.0) facade over listings — Property, Media,
      OpenHouse, Lookup
  - name: brokerages
    description: Brokerage read endpoints
  - name: regions
    description: Region read endpoints
  - name: dnc
    description: Do-not-contact list read endpoints
  - name: directory
    description: Denormalized public directory (partner-safe)
  - name: webhooks
    description: Partner webhook subscriptions (partner-only)
  - name: health
    description: Liveness and readiness probes
paths:
  /offices/{id}/deactivate:
    post:
      tags:
        - offices
      summary: Soft-deactivate an office (sets deactivatedAt)
      description: >-
        Sets `deactivatedAt`/`deactivatedBy` on the office. Does NOT cascade to
        the office's agents — office-level deactivate is scoped to the office
        record only. Returns 409 `OFFICE_ALREADY_DEACTIVATED` if the office is
        already deactivated. With `?requireEmpty=true`, returns 409
        `OFFICE_HAS_ACTIVE_AGENTS` (`details.activeAgentCount`) while any active
        agent still has this as their primary office. Agents cannot be moved
        INTO a deactivated office (409 `OFFICE_DEACTIVATED` on agent create,
        PATCH and bulk-reassign). Honors `If-Match` for optimistic concurrency.
      parameters:
        - schema:
            anyOf:
              - type: boolean
              - type: string
                enum:
                  - 'true'
                  - 'false'
          in: query
          name: requireEmpty
          required: false
          description: >-
            When true, refuse (409 `OFFICE_HAS_ACTIVE_AGENTS`, with
            `details.activeAgentCount`) while any active agent still has this as
            their primary office.
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
        - schema:
            type: string
          in: header
          name: if-match
          required: false
          description: >-
            Optional. When provided, the server enforces optimistic concurrency:
            the request is rejected with 412 Precondition Failed if the resource
            was modified since this ETag was issued. Omit for last-write-wins
            behavior.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  legacyMoxiOfficeId:
                    type: string
                    nullable: true
                  brokerageId:
                    type: string
                    format: uuid
                    nullable: true
                  code:
                    type: string
                    nullable: true
                  internalOfficeId:
                    type: string
                    nullable: true
                    description: >-
                      Short V1 internal office number (V1 client_office_id, e.g.
                      "80000"). Unique when set. Distinct from
                      legacyMoxiOfficeId (Moxi GUID) and code.
                  mlsMemberships:
                    type: array
                    items:
                      type: object
                      properties:
                        mlsAbbreviation:
                          type: string
                        mlsName:
                          type: string
                          nullable: true
                        officeMlsId:
                          type: string
                      required:
                        - mlsAbbreviation
                        - mlsName
                        - officeMlsId
                      additionalProperties: false
                  name:
                    type: string
                    description: >-
                      Legal entity name of the office (e.g. "Windermere Services
                      Company"). Display name is `commonName`.
                  commonName:
                    type: string
                    nullable: true
                  legalName:
                    type: string
                    nullable: true
                    description: >-
                      DEPRECATED: use `name` (the office legal entity name).
                      Null for V1-sourced offices; still returned and accepted,
                      will be removed in a later release.
                  displayLegalName:
                    type: boolean
                  regionId:
                    type: string
                    format: uuid
                    nullable: true
                  secondaryRegionId:
                    type: string
                    format: uuid
                    nullable: true
                  region:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                    nullable: true
                  secondaryRegion:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                    nullable: true
                  timezone:
                    type: string
                    nullable: true
                  managerAgentId:
                    type: string
                    format: uuid
                    nullable: true
                  manager:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                    nullable: true
                  phone:
                    type: string
                    nullable: true
                  altPhone:
                    type: string
                    nullable: true
                  fax:
                    type: string
                    nullable: true
                  email:
                    type: string
                    nullable: true
                  officeWebsite:
                    type: string
                    nullable: true
                  address:
                    type: string
                    nullable: true
                  address2:
                    type: string
                    nullable: true
                  city:
                    type: string
                    nullable: true
                  county:
                    type: string
                    nullable: true
                  state:
                    type: string
                    nullable: true
                  zipCode:
                    type: string
                    nullable: true
                  mailingAddress:
                    type: string
                    nullable: true
                  mailingAddress2:
                    type: string
                    nullable: true
                  mailingCity:
                    type: string
                    nullable: true
                  mailingState:
                    type: string
                    nullable: true
                  mailingZip:
                    type: string
                    nullable: true
                  social:
                    type: object
                    additionalProperties:
                      type: string
                      nullable: true
                  displayPublic:
                    type: boolean
                  tags:
                    type: array
                    items:
                      type: string
                  imageUrl:
                    type: string
                    nullable: true
                  logoUrl:
                    type: string
                    nullable: true
                  externalPartnerIds:
                    type: array
                    items:
                      type: object
                      properties:
                        partnerName:
                          type: string
                        partnerId:
                          type: string
                      required:
                        - partnerName
                        - partnerId
                      additionalProperties: false
                    description: >-
                      Partner-system identifiers. Filtered by: partnerIdsFilter
                      (staff see all; partners see entries matching their
                      canonical partner_name and any granted_names).
                  isSystem:
                    type: boolean
                  deactivatedAt:
                    type: string
                    format: date-time
                    nullable: true
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  brokerage:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                    nullable: true
                  agentCount:
                    type: integer
                    minimum: 0
                  agentsPendingTos:
                    type: integer
                    minimum: 0
                  mlsUserCount:
                    type: integer
                    minimum: 0
                  officeWoboEnabled:
                    type: boolean
                  woboEligibleRoles:
                    type: array
                    items:
                      type: string
                  woboSetBy:
                    type: string
                    nullable: true
                  woboSetAt:
                    type: string
                    format: date-time
                    nullable: true
                  sharedInboxConsent:
                    type: object
                    properties:
                      authorized:
                        type: boolean
                      signedBy:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                        required:
                          - id
                          - name
                        additionalProperties: false
                        nullable: true
                      signedAt:
                        type: string
                        format: date-time
                        nullable: true
                    required:
                      - authorized
                      - signedBy
                      - signedAt
                    additionalProperties: false
                required:
                  - id
                  - legacyMoxiOfficeId
                  - brokerageId
                  - code
                  - internalOfficeId
                  - mlsMemberships
                  - name
                  - commonName
                  - legalName
                  - displayLegalName
                  - regionId
                  - secondaryRegionId
                  - region
                  - secondaryRegion
                  - timezone
                  - managerAgentId
                  - manager
                  - phone
                  - altPhone
                  - fax
                  - email
                  - officeWebsite
                  - address
                  - address2
                  - city
                  - county
                  - state
                  - zipCode
                  - mailingAddress
                  - mailingAddress2
                  - mailingCity
                  - mailingState
                  - mailingZip
                  - social
                  - displayPublic
                  - tags
                  - imageUrl
                  - logoUrl
                  - externalPartnerIds
                  - isSystem
                  - deactivatedAt
                  - createdAt
                  - updatedAt
                  - brokerage
                  - officeWoboEnabled
                  - woboEligibleRoles
                  - woboSetBy
                  - woboSetAt
                  - sharedInboxConsent
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Microsoft Entra ID JWT (staff) or OAuth2 client-credentials token issued
        by APIM (partners).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.