openapi: 3.0.0
info:
  title: Accounts API
  description: >-
    REST API to manage accounts.


    **DEPRECATED**: Version 1 of the WatchGuard Accounts API is deprecated and
    will no longer accept requests after 17 September 2026. Although v1
    endpoints continue to accept requests, we strongly recommend that you use
    Version 2 of the WatchGuard Accounts API.
  version: 1.4.2
  contact:
    name: API Support
    url: https://www.watchguard.com/wgrd-support/contact-support
  termsOfService: 
    https://www.watchguard.com/help/docs/api/Content/en-US/license_agreement.html?cshid=18007
paths:
  /health:
    get:
      description: HealthCheck URL
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/healthResponse'
  /v1/accounts/{accountId}/children:
    get:
      deprecated: true
      tags:
        - Accounts
      summary: Lists your managed accounts.
      description: >-
        Returns a list of your managed accounts.


        **DEPRECATED**: Version 1 of the WatchGuard Accounts API is deprecated and
        will no longer accept requests after 17 September 2026. Although v1
        endpoints continue to accept requests, we strongly recommend that you use
        Version 2 of the WatchGuard Accounts API.
      parameters:
        - name: accountId
          in: path
          description: >-
            Identifies your WatchGuard Cloud account. Example: WGC-1-123abc456 or
            ACC-1234567.
          required: true
          schema:
            type: string
        - name: type
          in: query
          description: |
            Type of account. This can be one of these values:
              - 0 - Returns all accounts.
              - 1 - Returns Service Provider accounts.
              - 2 - Returns Subscriber accounts.
          required: false
          schema:
            type: integer
            enum:
              - 0 # Returns all accounts.
              - 1 # Returns Service Provider accounts.
              - 2 # Returns Subscriber accounts.
            default: 0
        - name: sortBy
          in: query
          description: |
            Specifies how to sort results. This can be one of these values:
              - Name - Sort results by account name.
              - Type - Sort results by account type.
          required: false
          schema:
            type: string
            enum:
              - name
              - type
            default: name
        - name: sortOrder
          in: query
          description: |
            Specifies the order of the sorted results. This can be one of these values:
              - asc - Show results in ascending order.
              - desc - Show results in descending order.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: offset
          in: query
          description: Number of the first record to include in the results.
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: |
            Number of records to show on each page. A value of -1 shows all records.
          required: false
          schema:
            type: integer
            default: 25
            minimum: -1
        - name: name
          in: query
          description: Name of the account(s) to search for.
          required: false
          schema:
            type: string
        - name: includeDelegatedAccounts
          in: query
          description: |
            Specifies whether to retrieve delegated accounts. This can be one of these values:
            - true - Retrieve delegated accounts.
            - false - Do not retrieve delegated accounts.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful Response.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/listChildAccountsResponse'
        default:
          description: Unexpected error.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /v1/accounts/{accountId}:
    get:
      deprecated: true
      tags:
        - Accounts
      summary: Returns account information.
      description: >-
        Returns information for a specific account.


        **DEPRECATED**: Version 1 of the WatchGuard Accounts API is deprecated and
        will no longer accept requests after 17 September 2026. Although v1
        endpoints continue to accept requests, we strongly recommend that you use
        Version 2 of the WatchGuard Accounts API.
      parameters:
        - name: accountId
          in: path
          description: >-
            Identifies your WatchGuard Cloud account. Example: WGC-1-123abc456 or
            ACC-1234567.
          required: true
          schema:
            type: string
        - name: fields
          in: query
          description: |
            Specify one or more account field names separated by commas to return specific information about the specified WatchGuard Cloud account. Example: /v1/accounts/ACC-1234567?fields=contacts,addresses.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
      responses:
        '200':
          description: Account information.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAccountInfoResponse'
        default:
          description: Unexpected error.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    post:
      deprecated: true
      tags:
        - Accounts
      summary: Create an account.
      description: >-
        Add a managed account.


        **DEPRECATED**: Version 1 of the WatchGuard Accounts API is deprecated and
        will no longer accept requests after 17 September 2026. Although v1
        endpoints continue to accept requests, we strongly recommend that you use
        Version 2 of the WatchGuard Accounts API.
      parameters:
        - name: accountId
          in: path
          description: >-
            Identifies your WatchGuard Cloud account. Example: WGC-1-123abc456 or
            ACC-1234567.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/addAccountObject'
      responses:
        '200':
          description: Account information.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/addAccountResponse'
        default:
          description: Unexpected error.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    delete:
      deprecated: true
      tags:
        - Accounts
      summary: Delete an account.
      description: >-
        Delete a managed account.


        **DEPRECATED**: Version 1 of the WatchGuard Accounts API is deprecated and
        will no longer accept requests after 17 September 2026. Although v1
        endpoints continue to accept requests, we strongly recommend that you use
        Version 2 of the WatchGuard Accounts API.
      parameters:
        - name: accountId
          in: path
          description: >-
            Identifies the WatchGuard Cloud account to be deleted. Example:  WGC-1-123abc456
            or ACC-1234567.
          required: true
          schema:
            type: string
        - in: query
          name: force
          description: |
            Specifies whether to delete the account if it manages other accounts. This can be one of these values:
              - true - If true, delete the account and any accounts it manages.
              - false - If false, do not delete any accounts.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: The account and its managed accounts were successfully 
            deleted.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delAccountResponse'
        '204':
          description: The account was successfully deleted.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
        default:
          description: Unexpected error.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    patch:
      deprecated: true
      tags:
        - Accounts
      summary: Update a managed account.
      description: >-
        Update a managed account.


        **DEPRECATED**: Version 1 of the WatchGuard Accounts API is deprecated and
        will no longer accept requests after 17 September 2026. Although v1
        endpoints continue to accept requests, we strongly recommend that you use
        Version 2 of the WatchGuard Accounts API.
      parameters:
        - name: accountId
          in: path
          description: >-
            Identifies the WatchGuard Cloud account to be updated. Example: WGC-1234567.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateAccountObject'
      responses:
        '204':
          description: The account was successfully updated.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
        default:
          description: Unexpected error.
          headers:
            Warning:
              $ref: '#/components/headers/DeprecationWarning'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
components:
  headers:
    DeprecationWarning:
      description: |
        Specifies the WatchGuard Accounts API deprecation warning.
      schema:
        type: string
        example: >-
          299 - "Version 1 of all the WatchGuard Accounts APIs is deprecated and will
          no longer accept requests after 17 September 2026.
          Although v1 endpoints continue to accept requests, we strongly recommend
          that you use Version 2 of the WatchGuard Accounts API.".
  schemas:
    errorResponse:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: An absolute URI that identifies the type of error.
          default: about:blank
        title:
          type: string
          description: A descriptive title for the error.
        status:
          type: integer
          description: The HTTP status code generated by the server.
          minimum: 100
          maximum: 600
          exclusiveMaximum: true
          example: 503
        detail:
          type: string
          description: A description of the error.
          example: Connection to the database timed out.
        instance:
          type: string
          format: uri
          description: An absolute URI that identifies the error.
    healthResponse:
      type: object
      required:
        - healthy
      properties:
        healthy:
          type: boolean
          default: false
        message:
          type: string
    childAccountInfo:
      type: object
      properties:
        accountId:
          description: WatchGuard Cloud account ID of the managed account.
          type: string
        name:
          description: Name of the managed account.
          type: string
        type:
          description: |
            Indicates the type of WatchGuard Cloud account. 
            - 1: Tier-n Service Provider
            - 2: Tier-n Subscriber
            - 3: Tier-1 Service Provider
            - 4: Tier-1 Subscriber
          type: integer
        parentAccess:
          description: Indicates whether the Service Provider has access to the 
            managed account.
          type: boolean
        relationType:
          description: Indicates the relationship between the Service Provider 
            and the managed account.
          type: string
        relationName:
          description: Name of the relationship between the Service Provider and
            managed account.
          type: string
        totalOperators:
          description: Number of operators the account has.
          type: integer
        childrenList:
          description: Lists the Service Provider's managed accounts.
          type: array
          items:
            $ref: '#/components/schemas/childAccountInfo'
    listChildAccountsResponse:
      description: List of managed accounts.
      type: object
      properties:
        items:
          description: A list with information about your managed accounts.
          type: array
          items:
            $ref: '#/components/schemas/childAccountInfo'
        pageControls:
          $ref: '#/components/schemas/pageControls'
    pageControls:
      description: Settings that specify how to paginate search results.
      type: object
      properties:
        limit:
          description: Number of records to show per page. A value of -1 shows 
            all records.
          type: integer
        offset:
          description: Number of the first record to include in the results.
          type: integer
        totalItems:
          description: Total number of records available.
          type: integer
    getAccountInfoResponse:
      description: Account information.
      type: object
      required:
        - accountInfo
      properties:
        accountInfo:
          $ref: '#/components/schemas/accountObject'
    accountObject:
      allOf:
        - $ref: '#/components/schemas/accountBaseObject'
        - type: object
          required:
            - accountId
            - type
          properties:
            accountId:
              type: string
              description: WatchGuard Cloud account ID of the managed account.
            type:
              description: |
                Type of WatchGuard Cloud account. 
                - 1: Tier-n Service Provider
                - 2: Tier-n Subscriber
                - 3: Tier-1 Service Provider
                - 4: Tier-1 Subscriber
              type: integer
              enum:
                - 1
                - 2
                - 3
                - 4
            parent:
              $ref: '#/components/schemas/parentObject'
    accountBaseObject:
      type: object
      description: Account information.
      required:
        - name
        - status
      properties:
        name:
          description: Name of the account.
          type: string
        status:
          description: |
            Status of the account:
            - 0: The account is not active.
            - 1: The account is active.
          type: integer
          format: int64
          enum:
            - 0
            - 1
        contacts:
          description: List of contacts for the account.
          type: array
          items:
            $ref: '#/components/schemas/contactObject'
        delegatedParent:
          $ref: '#/components/schemas/delegatedParentObject'
        addresses:
          type: object
          properties:
            mailingAddress:
              $ref: '#/components/schemas/addressObject'
            billingAddress:
              $ref: '#/components/schemas/addressObject'
        serviceProperties:
          $ref: '#/components/schemas/servicePropertiesObject'
    delegatedParentObject:
      type: object
      properties:
        id:
          type: string
          description: Account ID of the Service Provider that manages this 
            delegated account.
        expirationDate:
          type: string
          description: Date that delegated access ends.
        name:
          type: string
          description: Name of the Service Provider account that manages this 
            delegated account.
        phone:
          type: string
          description: Phone number of the Service Provider account that manages
            this delegated account.
        email:
          type: string
          description: Email address of the Service Provider account that 
            manages this delegated account.
    addressObject:
      type: object
      description: Address.
      required:
        - address1
        - city
        - country
        - state
        - postalCode
      properties:
        address1:
          type: string
          description: Primary street address.
        address2:
          type: string
          description: Secondary street address.
        city:
          type: string
          description: City name.
        state:
          type: string
          description: State or province.
        country:
          type: string
          description: Country name.
        postalCode:
          type: string
          description: Zip or postal code.
    contactObject:
      type: object
      description: Contact details.
      required:
        - firstName
        - lastName
        - email
      properties:
        primaryContactId:
          type: string
          description: Contact ID.
        firstName:
          type: string
          description: First name of the primary contact.
        lastName:
          type: string
          description: Last name of the primary contact.
        email:
          type: string
          description: Email address of the primary contact.
        phone:
          type: string
          description: Phone number of the primary contact.
    parentObject:
      description: Parent account information.
      required:
        - id
      properties:
        id:
          type: string
          description: Account ID of the Service Provider that manages this 
            account.
          default: WGC
        access:
          type: boolean
          description: Indicates whether the account has parent access to child 
            accounts.
          default: false
    servicePropertiesObject:
      type: object
      properties:
        ssourlname:
          type: string
          description: Identifier for SSO.
    addAccountObject:
      type: object
      description: Information used to create a new managed account.
      required:
        - type
        - name
        - firstName
        - lastName
        - email
      properties:
        type:
          description: |
            Type of account to create. This can be one of these values:
              - 1 - Service Provider.
              - 2 - Subscriber.
          type: integer
          enum:
            - 1
            - 2
        name:
          description: Name of the new account.
          type: string
        firstName:
          type: string
          description: First name of the primary contact.
        lastName:
          type: string
          description: Last name of the primary contact.
        email:
          type: string
          description: Email address of the primary contact.
    addAccountResponse:
      type: object
      description: WatchGuard Cloud account ID of the newly created account.
      required:
        - accountId
      properties:
        accountId:
          type: string
          description: Created WatchGuard Cloud account ID.
          example: WGC-1-123abc456
    delAccountResponse:
      type: object
      description: List of deleted managed accounts.
      properties:
        childIds:
          type: array
          items:
            type: string
            description: WatchGuard Cloud account ID of the deleted account.
            example: WGC-1-123abc456
    updateAccountObject:
      type: object
      description: Information used to update a managed account.
      required:
        - name
        - firstName
        - lastName
        - email
      properties:
        name:
          type: string
          description: Name of the updated account.
        firstName:
          type: string
          description: First name of the primary contact.
        lastName:
          type: string
          description: Last name of the primary contact.
        email:
          type: string
          description: Email address of the primary contact.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: WatchGuard-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
servers:
  - url: https://api.usa.cloud.watchguard.com/rest/platform/accounts
    description: Prod USA Region
  - url: https://api.deu.cloud.watchguard.com/rest/platform/accounts
    description: Prod DEU region
  - url: https://api.jpn.cloud.watchguard.com/rest/platform/accounts
    description: Prod JPN region
security:
  - ApiKeyAuth: []
    BearerAuth: []
externalDocs:
  description: Additional documentation
  url: https://www.watchguard.com/help/docs/api/Content/en-US/home.html
