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

# Close Organization



## OpenAPI

````yaml /api-reference/preview.json post /gb/organizations/{organization_id}/close
openapi: 3.2.0
info:
  description: Intermezzo's global payroll apis, organized by country
  summary: Global Payroll Platform
  title: Intermezzo Global Payroll
  version: '2026-11-18'
  x-logo:
    url: /static/icon.svg
servers:
  - description: Preview
    url: https://preview.intermezzo.ai
security: []
paths:
  /gb/organizations/{organization_id}/close:
    post:
      tags:
        - Great Britain
        - Organizations
      summary: Close Organization
      operationId: gb_organization_close
      parameters:
        - in: path
          name: organization_id
          required: true
          schema:
            title: Organization Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GBOrganizationResponse'
          description: Successful Response
        '404':
          content:
            application/json:
              examples:
                HUB_NOT_FOUND:
                  summary: >-
                    Raised when a hub does not exist under the parent named in
                    the path.
                  value:
                    errors:
                      - code: HUB_NOT_FOUND
                        message: >-
                          Raised when a hub does not exist under the parent
                          named in the path.
              schema:
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      description: >-
                        Represents an error that occurred during processing.


                        Designed for client-side i18n:

                        - code: Use this to look up translation (e.g.,
                        "HUB_NOT_FOUND")

                        - message: English fallback if translation not available

                        - field: Field name for form validation highlighting

                        - params: Dynamic values for translation interpolation
                      properties:
                        code:
                          description: Unique error code for i18n lookup
                          enum:
                            - HUB_NOT_FOUND
                          title: Code
                          type: string
                        field:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Field that caused the error
                          title: Field
                        message:
                          description: English fallback error message
                          title: Message
                          type: string
                        params:
                          anyOf:
                            - additionalProperties: true
                              type: object
                            - type: 'null'
                          description: Parameters for translation interpolation
                          title: Params
                      required:
                        - code
                        - message
                      title: ErrorDetail
                      type: object
                    type: array
                required:
                  - errors
                title: ErrorResponse
                type: object
          description: >-
            - `HUB_NOT_FOUND`: Raised when a hub does not exist under the parent
            named in the path.
        '409':
          content:
            application/json:
              examples:
                HUB_CLOSED:
                  summary: >-
                    Raised on a write to a closed hub: it stays readable, its
                    satellites take no writes.
                  value:
                    errors:
                      - code: HUB_CLOSED
                        message: >-
                          Raised on a write to a closed hub: it stays readable,
                          its satellites take no writes.
                OPEN_CHILDREN:
                  summary: >-
                    Raised on closing a hub that still has open children: close
                    them first.
                  value:
                    errors:
                      - code: OPEN_CHILDREN
                        message: >-
                          Raised on closing a hub that still has open children:
                          close them first.
              schema:
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      description: >-
                        Represents an error that occurred during processing.


                        Designed for client-side i18n:

                        - code: Use this to look up translation (e.g.,
                        "HUB_NOT_FOUND")

                        - message: English fallback if translation not available

                        - field: Field name for form validation highlighting

                        - params: Dynamic values for translation interpolation
                      properties:
                        code:
                          description: Unique error code for i18n lookup
                          enum:
                            - HUB_CLOSED
                            - OPEN_CHILDREN
                          title: Code
                          type: string
                        field:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Field that caused the error
                          title: Field
                        message:
                          description: English fallback error message
                          title: Message
                          type: string
                        params:
                          anyOf:
                            - additionalProperties: true
                              type: object
                            - type: 'null'
                          description: Parameters for translation interpolation
                          title: Params
                      required:
                        - code
                        - message
                      title: ErrorDetail
                      type: object
                    type: array
                required:
                  - errors
                title: ErrorResponse
                type: object
          description: >-
            - `HUB_CLOSED`: Raised on a write to a closed hub: it stays
            readable, its satellites take no writes.

            - `OPEN_CHILDREN`: Raised on closing a hub that still has open
            children: close them first.
        '422':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      description: >-
                        Represents an error that occurred during processing.


                        Designed for client-side i18n:

                        - code: Use this to look up translation (e.g.,
                        "HUB_NOT_FOUND")

                        - message: English fallback if translation not available

                        - field: Field name for form validation highlighting

                        - params: Dynamic values for translation interpolation
                      properties:
                        code:
                          description: Unique error code for i18n lookup
                          enum:
                            - FIELD_REQUIRED
                            - FIELD_INVALID_TYPE_STRING
                            - FIELD_INVALID_TYPE_INT
                            - FIELD_INVALID_TYPE_FLOAT
                            - FIELD_INVALID_TYPE_BOOL
                            - FIELD_INVALID_TYPE_DICT
                            - FIELD_INVALID_TYPE_LIST
                            - FIELD_STRING_TOO_SHORT
                            - FIELD_STRING_TOO_LONG
                            - FIELD_STRING_PATTERN_MISMATCH
                            - FIELD_VALUE_TOO_SMALL
                            - FIELD_VALUE_TOO_LARGE
                            - FIELD_INVALID_DATE
                            - FIELD_INVALID_DATETIME
                            - FIELD_INVALID_TIME
                            - FIELD_INVALID_DATE_FORMAT
                            - FIELD_INVALID_DATETIME_FORMAT
                            - FIELD_INVALID_ENUM_VALUE
                            - FIELD_INVALID_EMAIL
                            - FIELD_INVALID_URL
                            - FIELD_LIST_TOO_SHORT
                            - FIELD_LIST_TOO_LONG
                            - FIELD_UNKNOWN
                            - FIELD_VALIDATION_ERROR
                          title: Code
                          type: string
                        field:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Field that caused the error
                          title: Field
                        message:
                          description: English fallback error message
                          title: Message
                          type: string
                        params:
                          anyOf:
                            - additionalProperties: true
                              type: object
                            - type: 'null'
                          description: Parameters for translation interpolation
                          title: Params
                      required:
                        - code
                        - message
                      title: ErrorDetail
                      type: object
                    type: array
                required:
                  - errors
                title: ErrorResponse
                type: object
          description: >-
            The request failed validation. Type and format errors use the
            generic FIELD_* codes.
      security:
        - BearerToken: []
components:
  schemas:
    GBOrganizationResponse:
      additionalProperties: false
      description: >-
        The organization with every satellite as it reads on one date. A
        satellite never

        written, or with no slice on an explicit date, is null.
      properties:
        address:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationAddressSatellite'
            - type: 'null'
        bank:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationBankSatellite'
            - type: 'null'
        client_id:
          readOnly: true
          title: Client Id
          type: string
        contact:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationContactSatellite'
            - type: 'null'
        core:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationCoreSatellite'
            - type: 'null'
        country_code:
          const: GB
          readOnly: true
          title: Country Code
          type: string
        created_at:
          format: date-time
          readOnly: true
          title: Created At
          type: string
        created_by:
          description: >-
            Who created the hub: the acting user (`X-Acting-User`, else the
            access credential), `system` for our own writes, or
            `<authority>:<notice>` for a write on an authority's behalf, e.g.
            `hmrc:P6`.
          readOnly: true
          title: Created By
          type: string
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the hub was closed
          readOnly: true
          title: Deleted At
        external_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: External Ref
        id:
          title: Id
          type: string
        insurance:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationInsuranceSatellite'
            - type: 'null'
        status:
          $ref: '#/components/schemas/GBOrganizationStatus'
        tax:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationTaxSatellite'
            - type: 'null'
      required:
        - id
        - external_ref
        - created_at
        - created_by
        - deleted_at
        - client_id
        - country_code
        - status
      title: GBOrganizationResponse
      type: object
    GBOrganizationAddressSatellite:
      additionalProperties: false
      properties:
        address:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationUKAddressRead'
            - type: 'null'
        correspondence_address:
          anyOf:
            - $ref: '#/components/schemas/GBOrganizationUKAddressRead'
            - type: 'null'
        created_at:
          format: date-time
          readOnly: true
          title: Created At
          type: string
        created_by:
          description: >-
            Who wrote the edition: the acting user (`X-Acting-User`, else the
            access credential), `system` for our own writes, or
            `<authority>:<notice>` for a write on an authority's behalf, e.g.
            `hmrc:P6`.
          readOnly: true
          title: Created By
          type: string
        edition:
          readOnly: true
          title: Edition
          type: integer
        valid_from:
          format: date
          title: Valid From
          type: string
        valid_to:
          format: date
          title: Valid To
          type: string
      required:
        - edition
        - valid_from
        - valid_to
        - created_at
        - created_by
      title: GBOrganizationAddressSatellite
      type: object
    GBOrganizationBankSatellite:
      additionalProperties: false
      properties:
        accounts:
          items:
            $ref: '#/components/schemas/GBOrganizationBankAccountRead'
          title: Accounts
          type: array
        bacs_service_user_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Bacs Service User Number
        created_at:
          format: date-time
          readOnly: true
          title: Created At
          type: string
        created_by:
          description: >-
            Who wrote the edition: the acting user (`X-Acting-User`, else the
            access credential), `system` for our own writes, or
            `<authority>:<notice>` for a write on an authority's behalf, e.g.
            `hmrc:P6`.
          readOnly: true
          title: Created By
          type: string
        edition:
          readOnly: true
          title: Edition
          type: integer
        valid_from:
          format: date
          title: Valid From
          type: string
        valid_to:
          format: date
          title: Valid To
          type: string
      required:
        - edition
        - valid_from
        - valid_to
        - created_at
        - created_by
      title: GBOrganizationBankSatellite
      type: object
    GBOrganizationContactSatellite:
      additionalProperties: false
      properties:
        contacts:
          items:
            $ref: '#/components/schemas/GBOrganizationContactEntryRead'
          title: Contacts
          type: array
        created_at:
          format: date-time
          readOnly: true
          title: Created At
          type: string
        created_by:
          description: >-
            Who wrote the edition: the acting user (`X-Acting-User`, else the
            access credential), `system` for our own writes, or
            `<authority>:<notice>` for a write on an authority's behalf, e.g.
            `hmrc:P6`.
          readOnly: true
          title: Created By
          type: string
        edition:
          readOnly: true
          title: Edition
          type: integer
        hmrc_sender_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Hmrc Sender Email
        valid_from:
          format: date
          title: Valid From
          type: string
        valid_to:
          format: date
          title: Valid To
          type: string
      required:
        - edition
        - valid_from
        - valid_to
        - created_at
        - created_by
      title: GBOrganizationContactSatellite
      type: object
    GBOrganizationCoreSatellite:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          readOnly: true
          title: Created At
          type: string
        created_by:
          description: >-
            Who wrote the edition: the acting user (`X-Acting-User`, else the
            access credential), `system` for our own writes, or
            `<authority>:<notice>` for a write on an authority's behalf, e.g.
            `hmrc:P6`.
          readOnly: true
          title: Created By
          type: string
        dba_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Dba Name
        edition:
          readOnly: true
          title: Edition
          type: integer
        incorporation_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Incorporation Date
        legal_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Name
        logo_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Id
        shutdown_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Shutdown Date
        valid_from:
          format: date
          title: Valid From
          type: string
        valid_to:
          format: date
          title: Valid To
          type: string
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
      required:
        - edition
        - valid_from
        - valid_to
        - created_at
        - created_by
      title: GBOrganizationCoreSatellite
      type: object
    GBOrganizationInsuranceSatellite:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          readOnly: true
          title: Created At
          type: string
        created_by:
          description: >-
            Who wrote the edition: the acting user (`X-Acting-User`, else the
            access credential), `system` for our own writes, or
            `<authority>:<notice>` for a write on an authority's behalf, e.g.
            `hmrc:P6`.
          readOnly: true
          title: Created By
          type: string
        edition:
          readOnly: true
          title: Edition
          type: integer
        employment_allowance_eligible:
          default: false
          title: Employment Allowance Eligible
          type: boolean
        valid_from:
          format: date
          title: Valid From
          type: string
        valid_to:
          format: date
          title: Valid To
          type: string
      required:
        - edition
        - valid_from
        - valid_to
        - created_at
        - created_by
      title: GBOrganizationInsuranceSatellite
      type: object
    GBOrganizationStatus:
      additionalProperties: false
      description: >-
        The read-only status satellite. It carries no fields; it exists so that
        every

        organization read has a `status` object.
      properties: {}
      title: GBOrganizationStatus
      type: object
    GBOrganizationTaxSatellite:
      additionalProperties: false
      properties:
        accounts_office_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Accounts Office Reference
        corporation_tax_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Corporation Tax Reference
        created_at:
          format: date-time
          readOnly: true
          title: Created At
          type: string
        created_by:
          description: >-
            Who wrote the edition: the acting user (`X-Acting-User`, else the
            access credential), `system` for our own writes, or
            `<authority>:<notice>` for a write on an authority's behalf, e.g.
            `hmrc:P6`.
          readOnly: true
          title: Created By
          type: string
        edition:
          readOnly: true
          title: Edition
          type: integer
        paye_reference_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Paye Reference Number
        valid_from:
          format: date
          title: Valid From
          type: string
        valid_to:
          format: date
          title: Valid To
          type: string
      required:
        - edition
        - valid_from
        - valid_to
        - created_at
        - created_by
      title: GBOrganizationTaxSatellite
      type: object
    GBOrganizationUKAddressRead:
      additionalProperties: false
      description: The address as stored; every field is nullable.
      properties:
        address_line_1:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Line 1
        address_line_2:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Line 2
        address_line_3:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Line 3
        address_line_4:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Line 4
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        county:
          anyOf:
            - type: string
            - type: 'null'
          title: County
        postcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Postcode
        town:
          anyOf:
            - type: string
            - type: 'null'
          title: Town
      title: GBOrganizationUKAddressRead
      type: object
    GBOrganizationBankAccountRead:
      additionalProperties: false
      description: >-
        An account as stored. Accounts moved from before the bank satellite were
        not

        checked against the UK formats, so a read does not check them either.
      properties:
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
        financial_institution_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Financial Institution Name
        is_active:
          default: true
          title: Is Active
          type: boolean
        is_primary:
          default: false
          title: Is Primary
          type: boolean
        sort_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Sort Code
      title: GBOrganizationBankAccountRead
      type: object
    GBOrganizationContactEntryRead:
      additionalProperties: false
      properties:
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        is_primary:
          default: false
          title: Is Primary
          type: boolean
        name:
          examples:
            - Jane Smith
          minLength: 1
          title: Name
          type: string
        phone:
          anyOf:
            - $ref: '#/components/schemas/ContactPhoneNumber'
            - type: 'null'
        roles:
          items:
            type: string
          title: Roles
          type: array
      required:
        - name
      title: GBOrganizationContactEntryRead
      type: object
    ContactPhoneNumber:
      additionalProperties: false
      properties:
        phone_number:
          format: phone
          title: Phone Number
          type: string
        phone_type:
          $ref: '#/components/schemas/PhoneType'
      required:
        - phone_number
        - phone_type
      title: ContactPhoneNumber
      type: object
    PhoneType:
      enum:
        - MOBILE
        - HOME
        - WORK
      title: PhoneType
      type: string
  securitySchemes:
    BearerToken:
      bearerFormat: JWT
      description: Get token from Auth0 and paste it here
      scheme: bearer
      type: http

````

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